nginx patch pull request about spaces in headers

김진녕 jn.kim at navercorp.com
Fri Sep 4 07:58:28 UTC 2015


Dear nginx developers, 
 
This is JinNyung Kim, a developer at Naver Korea corporation. (http://www.naver.com)
I'm writing in regards to spaces in header field in nginx. 
Actually when I modified use from apache-tomcat to nginx-tomcat last Tuesday, I had a trouble with spaces in authorization header. 
I know the field name including spaces is not permitted, but it's problem that apache didn't ignore this and passed to tomcat.
So, I need spaces in headers option and think that this will be helpful for the people who modify use from apache to nginx like me. 
Also, I developed the logging option in error.log.
 
spaces_in_headers will likely act underscores_in_headers. 
 
spaces_in_headers  default off
log_spaces_in_headers default off
 
When I request this two commands, nginx ignore the Authorization header in the second command.
But this patch trims trailing spaces in header fields. (I couldn't check the spdy request)
 
> curl -H "Authorization: test" http://x.x.x/SimpleHttp;
> curl -H "Authorization   : test" http://x.x.x/SimpleHttp;
 
When log_spaces_in_headers option is set to on, you can see this log in error.log.
 
2015/09/03 16:30:24 [error] 9107#0: *18 [Spaces in Header] Authorization=test  while reading client request headers, client: 0.0.0.0, server: x.x.x., request: "GET /SimpleHttp HTTP/1.1", host: "1.1.1.1"
 
 
 
I look forward to hearing from you about whether patch is accepted or not. 
 
Thank you for reading my email.
 
Yours Sincerely
JinNyung Kim
 





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20150904/67735173/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nginx.patch
Type: application/octet-stream
Size: 9290 bytes
Desc: not available
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20150904/67735173/attachment.obj>


More information about the nginx-devel mailing list