Skip to content

Commit 5e7801e

Browse files
committed
Header formatting
1 parent 9e46691 commit 5e7801e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/VCR/Util/HttpUtil.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,13 @@ public static function formatHeadersForCurl(array $headers)
9595
{
9696
$curlHeaders = array();
9797

98-
foreach ($headers as $key => $value) {
99-
$curlHeaders[] = $key . ': ' . $value;
98+
foreach ($headers as $key => $values) {
99+
if (is_array($values)) {
100+
foreach ($values as $value) {
101+
$curlHeaders[] = $key . ': ' . $value;
102+
}
103+
}
104+
$curlHeaders[] = $key . ': ' . $values;
100105
}
101106

102107
return $curlHeaders;

0 commit comments

Comments
 (0)