Skip to content

Commit 52b83f9

Browse files
try change order opt curl
1 parent 251cd72 commit 52b83f9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/php/libsdk/SDK/FileOps.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ protected function download(string $url, string $dest_fn = NULL) : ?string
137137
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
138138
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
139139
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
140-
curl_setopt($ch, CURLOPT_USERAGENT, Config::getSdkUserAgentName());
141140
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
142141
curl_setopt($ch, CURLOPT_VERBOSE, 1);
143142

@@ -146,6 +145,9 @@ protected function download(string $url, string $dest_fn = NULL) : ?string
146145
echo "**** define authorization header ! ****\n";
147146
var_dump(curl_setopt($ch, CURLOPT_HTTPHEADER, ['Accept: text/plain','X-custom-header: top1','Authorization: Bearer '.$token]));
148147
}
148+
149+
curl_setopt($ch, CURLOPT_USERAGENT, Config::getSdkUserAgentName());
150+
149151
echo "curl_error=". curl_error($ch) ."\n";
150152

151153

0 commit comments

Comments
 (0)