We currently use Network.HTTP2.Client.responseBodySize to figure out if we are in the trailers-only case or not, which in turn is based on the HTTP Content-Length header (https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length). This is doubly wrong:
There might be servers who use the Trailers-Only case but do not set the Content-Length header, although such a server would not conform to the HTTP spec: "An origin server SHOULD send a Content-Length header field when the content size is known prior to sending the complete header section".
We currently use
Network.HTTP2.Client.responseBodySize
to figure out if we are in the trailers-only case or not, which in turn is based on the HTTPContent-Length
header (https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length). This is doubly wrong:Content-Length
header, although such a server would not conform to the HTTP spec: "An origin server SHOULD send a Content-Length header field when the content size is known prior to sending the complete header section".Content-Length
header even when it's not the Trailers-Only case (e.g., see https://github.com/grpc/grpc-web/issues/1101 / https://github.com/envoyproxy/envoy/issues/5554).