Skip to content

Commit ec5a8ae

Browse files
committed
StreamClient: explode headers by ':' only (without space)
Some developer local proxies modifies spaces around semicolon. It is allowed by RFC2616. One space is only recomended.
1 parent 2de95e7 commit ec5a8ae

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Github/Http/StreamClient.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ protected function fileGetContents($url, array $contextOptions)
103103

104104
$headers = [];
105105
foreach ($http_response_header as $header) {
106-
list($name, $value) = explode(': ', $header, 2) + [NULL, NULL];
107-
$headers[$name] = $value;
106+
list($name, $value) = explode(':', $header, 2) + [NULL, NULL];
107+
$headers[trim($name)] = trim($value);
108108
}
109109

110110
return [$m[1], $headers, $content];

0 commit comments

Comments
 (0)