Open danclien opened 7 years ago
Which is better?
I prefer failing fast by throwing an error if broken headers are found, but I know that can also break other people's code.
@kazu-yamamoto I could set up a PR that adds a middleware to wai-extra
to address this? This middleware could also validate header values, both keys and values are not allowed to contain any control characters iirc (i can research the RFC, just need to hear if you'd be willing to merge something like that).
@pbrinkmeier Sorry for the delay. Yes, please.
I will do it in the next few days, thanks for getting back to me :)
Closing.
General
wai
allows HTTP header names with spaces which breaks Chrome (returns anERR_SPDY_PROTOCOL_ERROR
error) when using HTTP/2.We discovered this while using an AWS Application Load Balancer (ALB) which automatically upgrades the connection between the browser and the ALB to HTTP/2. The connection between the ALB and the server was HTTP/1.1.
Relevant RFCs
Example