Closed Bug 1423508 Opened 7 years ago Closed 7 years ago

Broken HTTP2 headers abort load without error

Categories

(Core :: Networking: HTTP, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1411659

People

(Reporter: heftig, Unassigned)

Details

Setup: One NGINX server (tested 1.10.3 on Ubuntu and 1.13.7 on Arch) configured for HTTP2 and so that it puts a linebreak into a header value, such as:

add_header X-Broken "foo
bar";

This is already blatantly broken on HTTP 1.1:

< HTTP/1.1 200 OK
< Server: nginx/1.13.7
< Date: Wed, 06 Dec 2017 08:51:57 GMT
< Content-Type: text/html
< Transfer-Encoding: chunked
< Connection: keep-alive
< X-Broken: foo
< bar
<

When using HTTP2, Curl produces a protocol error:

* http2 error: Invalid HTTP header field was received: frame type: 1, stream: 1, name: [x-broken], value: [foo
bar]
* HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1)

Chrome seems to tolerate this and produces no warnings, while reporting there are two header lines "x-broken: foo" and "x-broken: bar".

Firefox, however, seems to abort the load without an error message. It appears as if the navigation wasn't attempted at all, which is very confusing.

If the URL is already cached, Firefox may fetch from the cache, but I couldn't get this to happen reliably.

Firefox should either tolerate this problem (like Chrome) or make it visible (like Curl).



https://www.defrac.com/ currently suffers from this but probably won't stay in this configuration for much longer.
This is dup of bug 1411659. We plan to make a better error ode for this.

Please take a look at comments in bug 1411659. There is a bug filed for nginx and Chrome.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.