Remove usage of http_parse_message
Found a case where http_parse_message failed to parse a valid request header and returned null, which ended up in an uncaught exception being thrown by Guzzle.
This commit is contained in:
parent
0cde24bae7
commit
fe4a97400d
@ -59,18 +59,6 @@ class HttpRequestParser implements MessageInterface {
|
||||
* @return \Psr\Http\Message\RequestInterface
|
||||
*/
|
||||
public function parse($headers) {
|
||||
if (function_exists('http_parse_message')) {
|
||||
$parts = http_parse_message($headers);
|
||||
|
||||
return new gPsr\Request(
|
||||
$parts->requestMethod
|
||||
, $parts->requestUrl
|
||||
, $parts->headers
|
||||
, null
|
||||
, $parts->httpVersion
|
||||
);
|
||||
} else {
|
||||
return gPsr\parse_request($headers);
|
||||
}
|
||||
return gPsr\parse_request($headers);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user