Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.

Commit 9809630

Browse files
committed
Merge branch 'master' of https://github.com/rsandrea/zf2 into hotfix/http-user-agent
Conflicts: library/Zend/Http/Header/UserAgent.php

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Header/UserAgent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public static function fromString($headerLine)
1616
list($name, $value) = preg_split('#: #', $headerLine, 2);
1717

1818
// check to ensure proper header type for this factory
19-
if (strtolower($name) !== 'user-agent') {
19+
if (str_replace(array('_', ' ', '.'), '-', strtolower($name)) !== 'user-agent') {
2020
throw new Exception\InvalidArgumentException('Invalid header line for User-Agent string: "' . $name . '"');
2121
}
2222

0 commit comments

Comments
 (0)