arturobernalg opened a new pull request, #1248: URL: https://github.com/apache/tomcat/pull/1248
RFC 9113, section 8.1.1 states that a response is malformed if the value of the content-length header field is not the sum of the DATA frame payloads. An application that ends its response having written fewer bytes than the content length it set currently has the stream ended normally, so the client receives a truncated response that looks complete. With HTTP/1.1 the client keeps waiting for the missing bytes instead. This resets the stream with PROTOCOL_ERROR in that case. Responses that have no body, such as those to HEAD requests, are not affected. Checked against a running Tomcat with a raw HTTP/2 client (content-length 10, 5 bytes written): without the change the response was HEADERS, DATA(5), DATA(0, END_STREAM); with it, HEADERS, DATA(5), RST_STREAM(PROTOCOL_ERROR). A response that matches its content length, HEAD, trailers and static files behave as before. The HTTP/2 test suite passes. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
