@@ -24,6 +24,13 @@ function getContents(
24
24
25
25
// TODO: consider url validation at this point
26
26
27
+ $ config = [
28
+ 'useragent ' => Configuration::getConfig ('http ' , 'useragent ' ),
29
+ 'timeout ' => Configuration::getConfig ('http ' , 'timeout ' ),
30
+ 'retries ' => Configuration::getConfig ('http ' , 'retries ' ),
31
+ 'curl_options ' => $ curlOptions ,
32
+ ];
33
+
27
34
$ httpHeadersNormalized = [];
28
35
foreach ($ httpHeaders as $ httpHeader ) {
29
36
$ parts = explode (': ' , $ httpHeader );
@@ -69,13 +76,7 @@ function getContents(
69
76
'TE ' => 'trailers ' ,
70
77
];
71
78
72
- $ config = [
73
- 'useragent ' => Configuration::getConfig ('http ' , 'useragent ' ),
74
- 'timeout ' => Configuration::getConfig ('http ' , 'timeout ' ),
75
- 'retries ' => Configuration::getConfig ('http ' , 'retries ' ),
76
- 'headers ' => array_merge ($ defaultHttpHeaders , $ httpHeadersNormalized ),
77
- 'curl_options ' => $ curlOptions ,
78
- ];
79
+ $ config ['headers ' ] = array_merge ($ defaultHttpHeaders , $ httpHeadersNormalized );
79
80
80
81
$ maxFileSize = Configuration::getConfig ('http ' , 'max_filesize ' );
81
82
if ($ maxFileSize ) {
0 commit comments