Hi, i discovered that quiche implementation doesn't entirely follows rfc in terms of headers: Upgrade, Transfer-encoding: chunked, modifying Content-length header.
RFC says:
Transfer-encoding: chunked
The "chunked" transfer encoding defined in Section 7.1 of [HTTP11]
MUST NOT be used.
...
The only exception to this is the TE header field, which MAY be
present in an HTTP/3 request header; when it is, it MUST NOT contain
any value other than "trailers".
Content-Length:
A request or response that includes a payload body can include a
Content-Length header field. A request or response is also malformed
if the value of a content-length header field does not equal the sum of the DATA frame payload lengths that form the body
Upgrade:
HTTP/3 does not support the HTTP Upgrade mechanism (Section 9.9 of
[HTTP11]) or 101 (Switching Protocols) informational status code
(Section 9.2.2 of [SEMANTICS]).
I created comparation table of google.com cloudflare-quic.com and my server with nginx+quic (quic 0.7.0) responses:
Upgrade: (http3)
Upgrade: (http1.1)
Transfer-encoding: (http3)
Transfer-encoding: (http1.1)
Content-length >: (http3)
Content-length >: (http1.1)
Content-length <: (http3)
Content-length <: (http1.1)
Content-length =: (http3)
Content-length =: (http1.1)
Content-length xxx: (http3)
Content-length xxx: (http1.1)
google.com
HTTP/3 400
HTTP/1.1 200 OK
hangs
HTTP/1.1 405 Method Not Allowed
HTTP/3 400
hangs
HTTP/3 400
HTTP/1.1 405 Method Not Allowed
HTTP/3 405
HTTP/1.1 405 Method Not Allowed
HTTP/3 400
Error 400 (Bad Request)
cloudflare-quic.com
HTTP/3 200
HTTP/1.1 200 OK
hangs
HTTP/1.1 200 OK
HTTP/3 400
hangs
HTTP/3 400
HTTP/1.1 200 OK
HTTP/3 200
HTTP/1.1 200 OK
HTTP/3 400
HTTP/1.1 400 Bad Request
my_domain
HTTP/3 200
HTTP/1.1 200 OK
hangs
HTTP/1.1 200 OK
hangs
hangs
hangs
HTTP/1.1 200 OK
HTTP/3 200
HTTP/1.1 200 OK
HTTP/3 400
HTTP/1.1 400 Bad Request
in this table let's assume google.com response 405 is 200/OK response.
Upgrade: google.com response is 400 Bad request, but Quiche implementation ignores this header. (is it ok with rfc?)
Transfer-encoding: hangs on all implementations, but rfc says it should be treated as malwared request so I belive server response should be 400.
Content-length with greater value is treated as bad request in google.com and cloudflare-quic.com server, but only on my nginx+quic server it will hang (is it nginx patch issue?)
Content-length with smaller value is treated as bad request only in google implementation. Quiche implementation truncates data frame, but it should be treated as bad request.
Hi, i discovered that quiche implementation doesn't entirely follows rfc in terms of headers: Upgrade, Transfer-encoding: chunked, modifying Content-length header. RFC says: Transfer-encoding: chunked
Content-Length:
Upgrade:
I created comparation table of google.com cloudflare-quic.com and my server with nginx+quic (quic 0.7.0) responses:
in this table let's assume google.com response 405 is 200/OK response. Upgrade: google.com response is 400 Bad request, but Quiche implementation ignores this header. (is it ok with rfc?) Transfer-encoding: hangs on all implementations, but rfc says it should be treated as malwared request so I belive server response should be 400. Content-length with greater value is treated as bad request in google.com and cloudflare-quic.com server, but only on my nginx+quic server it will hang (is it nginx patch issue?) Content-length with smaller value is treated as bad request only in google implementation. Quiche implementation truncates data frame, but it should be treated as bad request.
How i tested this:
Last interesting note about content-length: when cloudflare-quic.com gets malwared content-length header will return different responses, i.e:
but correct content-length response is:
My configuration:
Nginx 1.16.1 with latest quiche patch.