Skip to content

Commit 509ea92

Browse files
committed
Fix for headers in HTTP Curl Adapter
1 parent 0a834cc commit 509ea92

File tree

1 file changed

+5
-1
lines changed
  • lib/internal/Magento/Framework/HTTP/Adapter

1 file changed

+5
-1
lines changed

lib/internal/Magento/Framework/HTTP/Adapter/Curl.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,11 @@ public function write($method, $url, $http_ver = '1.1', $headers = [], $body = '
190190
}
191191

192192
if (is_array($headers)) {
193-
curl_setopt($this->_getResource(), CURLOPT_HTTPHEADER, $headers);
193+
$curlHeaders = [];
194+
foreach ($headers as $key => $value) {
195+
$curlHeaders[] = $key . ': ' . $value;
196+
}
197+
curl_setopt($this->_getResource(), CURLOPT_HTTPHEADER, $curlHeaders);
194198
}
195199

196200
/**

0 commit comments

Comments
 (0)