Ask Your Question
0

Content-Length vs Packet Length

asked 2020-10-05 16:12:48 +0000

jes gravatar image

updated 2020-10-05 16:13:12 +0000

Hi, I've a small confusion:

Content-Length header - Number denoting an the exact byte length of the HTTP body.

Packet Length - Specifies the length of the entire IP packet

While analysing a capture, I see Content-Length = 96544 and packet length = 22310 on Wireshark.

Question: If Packet Length has the length of entire packet (including Content-Length), how come Content-Length is bigger than Packet Length? am I missing something?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-10-05 16:29:18 +0000

grahamb gravatar image

Protocol PDU's may be split over multiple transport layer segments and then reassembled by the receiver. Wireshark can do the same and show you the reassembled result.

When reassembly takes place (controlled by dissector preferences) you should see an entry in the packet details just above the "Hypertext Transfer Protocol" item showing the TCP segments (assuming HTTP over TCP) and packets that were reassembled to show the complete HTTP message.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-10-05 16:12:48 +0000

Seen: 3,673 times

Last updated: Oct 05 '20