Skip to content

Commit

Permalink
Better parsing header values
Browse files Browse the repository at this point in the history
  • Loading branch information
akDeveloper committed Sep 8, 2024
1 parent 6740dc1 commit 1d86bc0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Http/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ private function resolveResponseHeaders(string $headers): array
}, ARRAY_FILTER_USE_BOTH);

foreach ($headers as $header) {
$info = explode(': ', $header, 2);
$headerArray[$info[0]] = explode(', ', $info[1]);
$info = explode(':', $header, 2);
$headerArray[$info[0]] = explode(', ', trim($info[1] ?? ''));
}

return $headerArray;
Expand Down

0 comments on commit 1d86bc0

Please sign in to comment.