Open rcanavan opened 7 years ago
Hm, yeah, that origins from importing headers from the (CGI) environment where header names look like HTTP_ACCEPT_ENCODING
.
Looks like Apache as well as nginx drop headers with underscores.
At least for nginx, you can explicitly allow underscores by setting underscores_in_headers on
.
for apache, afaik, it's only a limitation in mod_proxy that applies to fcgi/fpm setups. mod_php should get underscore headers.
For Apache+mod_php: only with apache_request_headers()
, but not through the environment, i.e. $_SERVER
.
RFC 7320 permits a number of "special" characters in the field-name of header fields, including both minus (-) and underscore (_):
ext-http however forces a conversion from _ to - by setting xhyphen to true in php_http_pretty_key() whenever new headers are merged. I believe the following test should work, but currently does not due to the aforementioned conversion: