The fromString function fail as the http headers returned by $_SERVER variables are of the form HTTP_USER_AGENT.
The fromString function fail as the http headers returned by $_SERVER variables are of the form HTTP_USER_AGENT.

I do not know if this is the right way to do it, but line 19 won't validate as the headers are cleaned up for the HTTP_ prefix but the _ signs are never replaced by -, hence the validation fail.

I took the str_replace(array('_', ' ', '.'), '-', strtolower($name)) idea from the file Zend/Http/Headers.php on line 284 as this is the way the $key variable is created.

If anyone finds a better way to do it please message me.
Maks3w/zend-http,zendframework/zend-http,netroby/zend-http,malinink/zend-http,asgrim/zend-http,weierophinney/zend-http