https://bz.apache.org/bugzilla/show_bug.cgi?id=63009

--- Comment #1 from Mark Thomas <ma...@apache.org> ---
Sending the content-length header is optional in HTTP/2. See section 8.1.2.6 of
RFC 7540:
"A request or response that includes a payload body can include a
content-length header field."

The header is not required since HTTP/2 includes sufficient information in the
frame headers for a user agent to determine when a resource has been sent in
full.

What providing the content-length header does do is give the user agent advance
notice of how big the resource is. That may be useful information (e.g. large
resources cached straight to disk, small ones in memory).

I think it makes sense to send the content-length if it has been set or can be
determined (essentially do what we do for HTTP1/1). Note that if the
content-length header and the actual content-length disagree it will be treated
as a protocol error for that stream.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to