Skip to content
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

Closed
bergos opened this issue Aug 7, 2016 · 5 comments
Closed

Case-insensitive header field names #64

bergos opened this issue Aug 7, 2016 · 5 comments

Comments

@bergos
Copy link

bergos commented Aug 7, 2016

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?

@me-no-dev
Copy link
Owner

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.

@ClaudioHutte
Copy link

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.

@penfold42
Copy link

+1 for toLowerCase in the library.

It neatly forces some standards compliance on my code

@me-no-dev
Copy link
Owner

maybe equalsIgnoreCase should be used throughout the lib so case would not matter. I do not really want to force either situation.

me-no-dev pushed a commit that referenced this issue Sep 2, 2016
Connected to: #64
Eliminates: #70
@me-no-dev
Copy link
Owner

Should be resolved in the above commit

Bmooij pushed a commit to Bmooij/ESPAsyncWebServer that referenced this issue Oct 14, 2019
Fix crash caused by a race condition when the _lwip_fin function is called
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants