File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -244,18 +244,16 @@ protected function setHeaderOptions(array $options):array{
244244
245245 }
246246
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- }
247+ // If the Expect header is not present (it isn't), prevent curl from adding it
248+ $ headers [] = 'Expect: ' ;
253249
254250 // cURL sometimes adds a content-type by default. Prevent this.
255251 if (!$ this ->request ->hasHeader ('Content-Type ' )){
256- $ options [ CURLOPT_HTTPHEADER ] [] = 'Content-Type: ' ;
252+ $ headers [] = 'Content-Type: ' ;
257253 }
258254
255+ $ options [CURLOPT_HTTPHEADER ] = $ headers ;
256+
259257 return $ options ;
260258 }
261259
You can’t perform that action at this time.
0 commit comments