File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ class CurlDispatcher implements DispatcherInterface
2525 ];
2626
2727 private $ config = [
28+ CURLOPT_HTTPHEADER => [],
2829 CURLOPT_MAXREDIRS => 10 ,
2930 CURLOPT_CONNECTTIMEOUT => 10 ,
3031 CURLOPT_TIMEOUT => 10 ,
@@ -94,9 +95,9 @@ public function dispatch(Url $url)
9495 $ extension = $ url ->getExtension ();
9596
9697 if (!empty ($ extension ) && isset (self ::$ acceptHeaders [$ extension ])) {
97- $ options [CURLOPT_HTTPHEADER ] = [ 'Accept: ' .self ::$ acceptHeaders [$ extension] ];
98+ $ options [CURLOPT_HTTPHEADER ][] = 'Accept: ' .self ::$ acceptHeaders [$ extension ];
9899 } else {
99- $ options [CURLOPT_HTTPHEADER ] = [ 'Accept: */* ' ] ;
100+ $ options [CURLOPT_HTTPHEADER ][] = 'Accept: */* ' ;
100101 }
101102
102103 $ response = $ this ->exec ($ url , $ options );
You can’t perform that action at this time.
0 commit comments