First time here? Check out the FAQ!

Ask Your Question
0

Content-Length vs Packet Length

asked Oct 5 '0

jes gravatar image

updated Oct 5 '0

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?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
0

answered Oct 5 '0

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.

Preview: (hide)
link

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: Oct 5 '0

Seen: 4,585 times

Last updated: Oct 05 '20