In last several days I always worked at a project about HTTP2, now I want to be clear about if a TCP packet can contain several HEADERS frames whose function are to create a new stream. As I just saw on the reference, several requests can be compressed into one packet, why I can not find multiple requests in a packet in wireshark?
The HEADERS frame I mentioned above is: associates with a request, has :method: GET or other segments
Please help me!!! Thank you
I can not find multiple requests in a packet in wireshark
Yes, a TCP packet can contain multiple HEADERS frames.
Typically a TCP packet has an MTU of about 1500 bytes, while a typical HEADERS frame containing an HTTP request could be around 200-500 bytes so a TCP packet can contain about 2-8 HEADERS frames.
However, it is typical for clients to issue a TCP write per HTTP request, which is why you see just one HEADERS frame in each TCP packet.
To have the client send multiple HEADERS frames in a single TCP packet, you would need the following:
In summary, the case of multiple HEADERS frames in a single TCP packet depends heavily on the client implementation and the HTTP request send rate.
Jetty's
HttpClientsupports HEADERS frame gathering, so in the right conditions it may issue multiple HEADERS frames in a single TCP packet.