﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	uname	nginx_version
578	X header with underscore is not correctly parsed when put above Host:	Ahmy Yulrizka		"I test this with nginx version 1.4.4 and 1.6.0


When setting up nginx as a load balancer, i notice some weird behavior

Step to reproduce

1. enable default site '000-default'. create another site to be tested. (i did not see this behavior if there is only one site)

2. create post 

GET /users/current.json HTTP/1.1
Host: lb.somehost.com
X-SESSION_FOO: 9abcdef999999abcde.99999999

nginx will forward X-SESSION_FOO

3. another post with custom session above host

GET /users/current.json HTTP/1.1
X-SESSION_FOO: 9abcdef999999abcde.99999999
Host: lb.somehost.com

nginx will NOT forward X-SESSION_FOO

4. another post without underscore

GET /users/current.json HTTP/1.1
X-SESSION-FOO: 9abcdef999999abcde.99999999
Host: lb.somehost.com

nginx will forward X-SESSION-FOO

== Some information ==

# /etc/nginx/sites-enabled/api.local
upstream api_general {
  server 10.0.0.1
;
}


server {
  listen *:80;
  server_name lb lb.somehost.com

  access_log /var/log/nginx/api.local.access.log timed_combined;
  error_log  /var/log/nginx/api.local.error.log;

  underscores_in_headers on;
  add_header Access-Control-Expose-Headers ""X-SESSION_ID, Content-Type, Location"";

  location / {
    proxy_pass http://api_general;
  }
}"	defect	closed	minor		nginx-core	1.5.x	invalid			Linux lb.hostname.com 3.13.0-29-generic #53-Ubuntu SMP Wed Jun 4 21:00:20 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux	"nginx version: nginx/1.6.0
built by gcc 4.8.2 (Ubuntu 4.8.2-19ubuntu1) 
TLS SNI support enabled
configure arguments: --prefix=/opt/nginx-1.6.0 --conf-path=/etc/nginx/nginx.conf --sbin-path=/opt/nginx-1.6.0/sbin/nginx --add-module=/var/chef/cache/headers_more/7e45d5cbe4ed6865b3bce4fcb6c05f13a52a315702335bcedf68691ad41d8294 --with-http_gzip_static_module --with-http_realip_module --with-http_ssl_module"
