symfony: Symfony can't read HTTP headers with dots
Symfony is using $_SERVER superglobal for getting headers.
But if we have header like ‘my.custom.header’, the header is converted (probably by most CGI engines) to $_SERVER['HTTP_MY_CUSTOM_HEADER']
$request->heades->hasHeader('my.custom.header') will return false in this case because Symfony normalizes headers only with strtr(strtolower($key), '_', '-')
Probably, the solution may be: use raw php://input instead of $_SERVER superglobal?
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 24 (16 by maintainers)
So, it seems safe workaround can be used in Symfony to deal with it: normalize dots to underscores.