-
Notifications
You must be signed in to change notification settings - Fork 555
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
Header parameter names are converted to lower case by proxy #65
Comments
Hmmm. HttpClient's code (comments) states that headers names are case-insensitive. So it shouldn't matter. That said, I don't think the proxy should be altering the case of the headers. Looking through the proxy I don't see any lower-casing going on. I just added to the test to assert it finds the request headers in the same case. Maybe the servlet container you use is doing it? |
Yes, you are right. We are using Apache Tomcat 7.0 as servlet container. This container seems to convert all header names to lower case. The header names are already lower case when returned by the method servletRequest.getHeaderNames() to your code. Sorry for bothering you. This seems to be a Tomcat issue. |
I submitted this as a Tomcat Bug: https://bz.apache.org/bugzilla/show_bug.cgi?id=58464 |
Apache team has changed the bug to WONTFIX: https://bz.apache.org/bugzilla/show_bug.cgi?id=58464 |
Our internal server ran into problems when it experienced that all parameter names of the HTTP header have been converted to lower case by the proxy. More precisely: The first letter is converted to lower case. A direct request is handled correctly by our server, because it can read the header names as expected. The proxy request is different because the parameters are now lower case:
Direct request:
Http-Header Accept=text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Http-Header Accept-Encoding=gzip, deflate
Http-Header Accept-Language=de,en-US;q=0.7,en;q=0.3
Http-Header Cache-Control=max-age=0
Http-Header Connection=keep-alive
Http-Header Host=136.XXX.XXX.XXX:6600
Http-Header User-Agent=Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0
Via Proxy:
Http-Header X-Forwarded-For=194.xxx.xxx.xxx
Http-Header accept=text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Http-Header accept-encoding=gzip, deflate
Http-Header accept-language=de,en-US;q=0.7,en;q=0.3
Http-Header cache-control=max-age=0
Http-Header host=127.0.0.1:6601
Http-Header user-agent=Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0
Is this a bug or is this specific to the library which is used? Are the parameter names of the HTTP protocol case sensitive?
The text was updated successfully, but these errors were encountered: