Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#117 closed defect (invalid)

ignore_invalid_headers is ignored in server context

Reported by: Tair Sabirgaliev Owned by: somebody
Priority: minor Milestone:
Component: nginx-core Version: 1.0.x
Keywords: Cc:
uname -a: Linux **** 2.6.32-220.2.1.el6.x86_64 #1 SMP Fri Dec 23 02:21:33 CST 2011 x86_64 x86_64 x86_64 GNU/Linux
nginx -V: nginx version: nginx/1.0.12
built by gcc 4.4.4 20100726 (Red Hat 4.4.4-13) (GCC)
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx/ --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/ --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-mail --with-mail_ssl_module --with-file-aio --with-ipv6 --with-cc-opt='-O2 -g'


According to docs ignore_invalid_headers may be set in http and server contexts. However ignore_invalid_headers=off doesn't have effect when specified in server context, while setting it at http works as expected.

Change History (4)

comment:1 by Maxim Dounin, 12 years ago

Resolution: invalid
Status: newclosed

The "ignore_invalid_headers" directive only make sense in default server for a given listen socket, but not in pure virtual servers. This is because parsing of request headers happens before nginx is able to select a virtual server based on a Host header.

comment:2 by Tair Sabirgaliev, 12 years ago

Hmm.. IMHO, documentation should make that clear for a n00b like me :)

comment:3 by Maxim Dounin, 12 years ago

Sure, we'll update docs to make this clear (like it's already done for the merge_slashes directive).

comment:4 by Ruslan Ermilov, 12 years ago

The docs have just been updated.

Note: See TracTickets for help on using tickets.