We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7340ce8 commit fb921c7Copy full SHA for fb921c7
1 file changed
src/CurlUtils/CurlHandle.php
@@ -244,18 +244,16 @@ protected function setHeaderOptions(array $options):array{
244
245
}
246
247
- $options[CURLOPT_HTTPHEADER] = $headers;
248
-
249
- // If the Expect header is not present, prevent curl from adding it
250
- if(!$this->request->hasHeader('Expect')){
251
- $options[CURLOPT_HTTPHEADER][] = 'Expect:';
252
- }
+ // If the Expect header is not present (it isn't), prevent curl from adding it
+ $headers[] = 'Expect:';
253
254
// cURL sometimes adds a content-type by default. Prevent this.
255
if(!$this->request->hasHeader('Content-Type')){
256
- $options[CURLOPT_HTTPHEADER][] = 'Content-Type:';
+ $headers[] = 'Content-Type:';
257
258
+ $options[CURLOPT_HTTPHEADER] = $headers;
+
259
return $options;
260
261
0 commit comments