First time here? Check out the FAQ!
THIS IS A TEST INSTANCE. Feel free to ask and answer questions, but take care to avoid triggering too many notifications.
0

Content-Length vs Packet Length

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?

jes's avatar
5
jes
asked 2020-10-05 16:12:48 +0000, updated 2020-10-05 16:13:12 +0000
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

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.

grahamb's avatar
23.8k
grahamb
answered 2020-10-05 16:29:18 +0000
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer