Skip to content

Commit 1e6adb4

Browse files
committed
Header handling fix
1 parent 9eccea6 commit 1e6adb4

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Semantic versioning 2.0 is followed.
55
# 1.1.0
66

77
- Use php://temp stream wrapper for storing responses
8+
- Response headers were not parsed correctly
89

910
# 1.0.1
1011

src/Client.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,7 @@ static function (CurlHandle $curl, string $header) use ($responseData): int {
142142
return $len;
143143
}
144144
$headerName = strtolower(trim($headerArray[0]));
145-
if (!str_contains($headerArray[1], ',')) {
146-
$responseData->headers[$headerName] = [trim($headerArray[1])];
147-
return $len;
148-
}
149-
$responseData->headers[$headerName] = array_map(
150-
'trim',
151-
explode(',', $headerArray[1])
152-
);
145+
$responseData->headers[$headerName] = [trim($headerArray[1])];
153146

154147
return $len;
155148
}

0 commit comments

Comments
 (0)