uNetworking / uWebSockets.js

μWebSockets for Node.js back-ends :metal:
Apache License 2.0
8.09k stars 578 forks source link

Underscores in HTTP header key silently drops request #1018

Closed nccorchard closed 9 months ago

nccorchard commented 9 months ago

There is a remote system that sends HTTP requests to our app with headers that have underscores in a header key. In version 20.14.0, this was not a problem. When we tried to upgrade to the latest version, 20.41.0, that interface stopped working with no errors and no hit in our code. I back traced and found this issue starts when I load version 20.15.0. If I reload 20.14.0, the process works again.

Is there any setting, or other procedure I can use, to accept underscores in the header key names, or pre-process the HTTP request to change them?

uNetworkingAB commented 9 months ago

It's a bug we went from being too loose to being too strict it should accept underscore as well https://www.rfc-editor.org/rfc/rfc9110#name-tokens

This needs a do-over to get it right

nccorchard commented 9 months ago

So ... no fix at this time? Any time frame?

uNetworkingAB commented 9 months ago

https://github.com/uNetworking/uWebSockets/commit/570fe762c82383b53765aeef3cafb65863c3abbc

this will be in next release whenever that happens

nccorchard commented 9 months ago

Thanks