-
Notifications
You must be signed in to change notification settings - Fork 61
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 sensitivity of headers should not matter #262
Comments
Headers are case-insensitive according to RFC2616 so this is a bug, not a feature request, in my opinion. |
I'm not sure what the actual bug is here :) Can someone give me an example? Right now the For example: const options: GaxiosOptions = {
headers: {
'content-type': 'application/json',
'Content-Type': 'text/xml',
},
}, We could look for this situation and throw if we find duplicate keys once lower cased? |
@JustinBeckwith a warning might be enough, but I think a cleaning step that lowercases headers would be good, that way upstream libraries that build on top of gaxios, e.g., google-auth-library need not check every combination of a given header. |
We should adopt the native |
Currently if one were to set a "content-type" header and a "Content-Type" header, the two are not equivalent.
I've seen libraries like
express
approach this differently, such thatheaders
are case-insensitive.The text was updated successfully, but these errors were encountered: