Welcome! Log In Create A New Profile

Advanced

nginx patch pull request about spaces in headers

김진녕
September 04, 2015 04:00AM
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






_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

nginx patch pull request about spaces in headers Attachments

김진녕 1181 September 04, 2015 04:00AM

Re: nginx patch pull request about spaces in headers

Maxim Dounin 426 September 04, 2015 10:10AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 207
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready