-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Case-insensitive header field names #64
Comments
this is a good point. I did put some thought on it, no clear resolution in my mind :) You have methods for getting, searching and adding headers and I am not sure how all that will play out and what is the best way to deal with it. |
Even applications that use the web server library should deal with field names as case-insensitive, so providing the names in lower case only fashion could be useful. Not sure about it, though. |
+1 for toLowerCase in the library. It neatly forces some standards compliance on my code |
maybe equalsIgnoreCase should be used throughout the lib so case would not matter. I do not really want to force either situation. |
Should be resolved in the above commit |
Fix crash caused by a race condition when the _lwip_fin function is called
The RFC 7230 3.2 and also the old RFC 2616 4.2 define the field name as case-insensitive. node-fetch sends the content-length header field in lower case. That means the web server doesn't go into that if branch. I tested it with a quick 'n dirty or condition. I would like to make a PR. I think a generic solution, calling
.toLowerCase()
after this line would be the best solution, but that would also cause changes in many other places in the code and maybe even applications that use the web server library. What do you prefer?The text was updated successfully, but these errors were encountered: