<div style="font-family: 나눔고딕,NanumGothic,Sans-serif; font-size: 10pt;"><p>Dear nginx developers, </p><p> </p><p>This is JinNyung Kim, a developer at Naver Korea corporation. (<a href="http://www.naver.com" target="_blank">http://www.naver.com</a>)</p><p>I'm writing in regards to spaces in header field in nginx. </p><p>Actually when I modified use from apache-tomcat to nginx-tomcat last Tuesday, I had a trouble with spaces in authorization header. </p><p>I know the field name including spaces is not permitted, but it's problem that apache didn't ignore this and passed to tomcat.</p><p>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. </p><p>Also, I developed the logging option in error.log.</p><p> </p><p>spaces_in_headers will likely act underscores_in_headers. </p><p> </p><p>spaces_in_headers default off</p><p>log_spaces_in_headers default off</p><p> </p><p>When I request this two commands, nginx ignore the Authorization header in the second command.</p><p>But this patch trims trailing spaces in header fields. (I couldn't check the spdy request)</p><p> </p><p>> curl -H <strong>"Authorization: test" </strong><a href="http://x.x.x/SimpleHttp" target="_blank">http://x.x.x/SimpleHttp</a>;<br>> curl -H <strong>"Authorization : test"</strong> <a href="http://x.x.x/SimpleHttp" target="_blank">http://x.x.x/SimpleHttp</a>;</p><p> </p><p>When log_spaces_in_headers option is set to on, you can see this log in error.log.</p><p> </p><p>2015/09/03 16:30:24 [error] 9107#0: *18 <strong>[Spaces in Header] Authorization=test</strong> 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"</p><p> </p><p> </p><p> </p><p>I look forward to hearing from you about whether patch is accepted or not. </p><p> </p><p>Thank you for reading my email.</p><p> </p><p>Yours Sincerely</p><p>JinNyung Kim</p> </div>