httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From George Chelidze <gcheli...@magticom.ge>
Subject Header with trailing space in field name passed to CGI script
Date Tue, 14 Apr 2015 06:09:05 GMT
Hello,

According to the rfc822#section-3.2, SPACE character is not allowed in 
the header field name. I have tested apache httpd version 2.2.16 and 
2.4.12 and with both installations a header with the trailing space in 
the field name is passed to a CGI script's environment (in both cases 
mod_cgid is active if that matters). Attached you can find two simple 
tests and a simple CGI script used for these tests:

in first case used one header:

X-MSISDN<SPACE>:<SPACE>test

it is passed to CGI script as HTTP_X_MSISDN variable.

in the second case I used two headers:

X-MSISDN<SPACE>:<SPACE>test
X-MSISDN:<SPACE>test2

both translate to the same HTTP_X_MSISDN environment variable with two 
values separated by the comma.

Is there any reason to not ignore a header with the trailing space in 
the field name and pass it to the CGI environment?
If not, is it a bug or I am missing something?

Thanks in advance,

-- 
George Chelidze


Mime
View raw message