Opened 5 years ago

Last modified 3 years ago

#1316 new defect

$http_ variables only contain the first field-value

Reported by: vfaronov@… Owned by:
Priority: minor Milestone:
Component: nginx-core Version: 1.13.x
Keywords: Cc:
uname -a: Linux pergamon 4.4.0-83-generic #106-Ubuntu SMP Mon Jun 26 17:54:43 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
nginx -V: nginx version: nginx/1.13.3
built by gcc 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4)
configure arguments: --prefix=/home/vasiliy/tmp/nginx-1.13.3/prefix --with-debug


The value of the $http_X variable is the field-value of the first request header field named X. Further field-values, if any, are not included in the variable.

For example, given a request like:

GET / HTTP/1.1
Forwarded: for=
Forwarded: for=

the value of $http_forwarded is for=

A more useful value would be for=,for= (per RFC 7230 § 3.2.2).

Failing that, at least the current behavior should be documented.

Change History (1)

comment:1 by Maxim Dounin, 3 years ago

See also #1762.

Note: See TracTickets for help on using tickets.