79124922

Date: 2024-10-25 08:47:55
Score: 1
Natty:
Report link

Based on the info you gave us, you use Windows 2022 with IIS. This version of IIS works with HTTP/2 (https://learn.microsoft.com/en-us/iis/get-started/whats-new-in-iis-10/http2-on-iis).

The Content-Length header is not sent because HTTP/2 and HTTP/3 framing are based on the END_STREAM flag.

HTTP/2/3, being binary protocols with frames, can just encode this information in the last frame for that request/response. It is a HEADERS or DATA frame having the END_STREAM flag set to true that determines if there is request/response content, and if so, what frame carries the last content bytes.

In summary, the Content-Length header is not necessary in HTTP/2 and HTTP/3 because they have a different framing than HTTP/1.1.

This is the original answer that explains why is not set: Why is content-length header not sent over HTTP/3?

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
Posted by: D A