This repository was archived by the owner on Jan 30, 2020. It is now read-only.
Commit 5f4d01d
committed
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.50 parents d34a814 + 9b0ae41 + 472f06d + 35405a2 + 515476d + 26e6cb2 + 0772403 + e0b6d8c + 4620d34 + 128c4da + 92f5c68 + c7d790d + 2549b87 + 47be447 + b60e5b4 + 328746d + 29a4a76 + ef5ed67 + 76e4ea4 + 70330aa + 10f278f + 252fdc8 + 023de10 + 85fcc7b + 5d8866f + 634bb62 + 453bb28 + c8dba7b + f7017f6 + 6979e44 + d1673d5 + 5a530d5 + c10ba52 + eb5e8ac + 1377bc0 + f548f30 + e9e4fec + 367be36 + bcbdf6c + da3d16c + d997a89 + 22ab842 + 82c6dd5 + ad566ab + da76193 + cc72526 + d355d29 + fe95073 + 9d12961 + 4d5f5a3 commit 5f4d01d
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
0 commit comments