Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4aa9536

Browse filesBrowse files
Armandonicolas-grekas
Armando
authored andcommitted
[HttpClient] Fix strict parsing of response status codes
1 parent 1d25a25 commit 4aa9536
Copy full SHA for 4aa9536

File tree

1 file changed

+1
-1
lines changed
Filter options

1 file changed

+1
-1
lines changed

‎src/Symfony/Component/HttpClient/Response/ResponseTrait.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpClient/Response/ResponseTrait.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ private static function initialize(self $response): void
223223
private static function addResponseHeaders(array $responseHeaders, array &$info, array &$headers, string &$debug = ''): void
224224
{
225225
foreach ($responseHeaders as $h) {
226-
if (11 <= \strlen($h) && '/' === $h[4] && preg_match('#^HTTP/\d+(?:\.\d+)? ([12345]\d\d) .*#', $h, $m)) {
226+
if (11 <= \strlen($h) && '/' === $h[4] && preg_match('#^HTTP/\d+(?:\.\d+)? ([12345]\d\d)(?: |$)#', $h, $m)) {
227227
if ($headers) {
228228
$debug .= "< \r\n";
229229
$headers = [];

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.