zendframework/zf2 — pull request #887 by rsandrea (2012-03-05 00:51:43+00:00)
Title: The fromString function fail as the http headers returned by $_SERVER variable 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.