Opened 11 years ago

Closed 10 years ago

#378 closed defect (fixed)

Nginx directive underscores_in_headers is not valid for the first character in a request header

Reported by: Aviram Cohen Owned by:
Priority: minor Milestone:
Component: nginx-core Version: 1.3.x
Keywords: Cc:
uname -a: 2013 x86_64 x86_64 x86_64 GNU/LinuxLinux ubuntu-12.04 3.5.0-23-generic #35~precise1-Ubuntu SMP Fri
nginx -V: nginx version: nginx/1.4.1
built by gcc 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
TLS SNI support enabled
configure arguments: --with-http_stub_status_module --with-http_ssl_module --with-ld-opt=-lossp-uuid --with-cc-opt=-I/usr/include/ossp --add-module=../ngx_devel_kit-0.2.18 --add-module=../lua-nginx-module --add-module=../nginx-x-rid-header --add-module=../ngx_http_gunzip_filter_module --with-cc=gcc --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --pid-path=/var/run/nginx.pid --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log

Description

The configuration directive 'underscores_in_headers on;' should allow the client to send to Nginx requests with header names that contain underscores.
However, this directive is not valid when the first character of a header name contains an underscore - the header would be dropped.

See the code in ngx_http_parse.c:888 (in Nginx v1.4.1) for reference.

Change History (1)

comment:1 by Maxim Dounin, 10 years ago

Resolution: fixed
Status: newclosed

Fixed by bd91f286ee0a.

Note: See TracTickets for help on using tickets.