@@ -164,7 +164,7 @@ public function exec($context, $post_data = null, $custom_request = null, $tries
164164
165165 $ url = $ this ->createUrlByContext ($ context );
166166 $ this ->log ->addDebug ("Curl [ " .($ custom_request ? $ custom_request : 'GET ' )."] $ url JsonData= " . $ post_data );
167- // echo "Curl [".($custom_request ? $custom_request : 'GET')."] $url JsonData=" . $post_data, "\n";
167+ // echo "Curl [".($custom_request ? $custom_request : 'GET')."] $url JsonData=" . $post_data, "\n";
168168 $ ch = curl_init ();
169169 curl_setopt ($ ch , CURLOPT_ENCODING , 'UTF-8 ' );
170170
@@ -193,7 +193,7 @@ public function exec($context, $post_data = null, $custom_request = null, $tries
193193 curl_setopt ($ ch , CURLOPT_SSL_VERIFYHOST , $ this ->getConfiguration ()->isCurlOptSslVerifyHost ());
194194 curl_setopt ($ ch , CURLOPT_SSL_VERIFYPEER , $ this ->getConfiguration ()->isCurlOptSslVerifyPeer ());
195195 curl_setopt ($ ch , CURLOPT_FOLLOWLOCATION , true );
196- curl_setopt ($ ch , CURLOPT_USERAGENT , self ::$ UserAgent . ($ this ->getConfiguration ()->getUserAgent () ? ' [] ' : '' ));
196+ curl_setopt ($ ch , CURLOPT_USERAGENT , self ::$ UserAgent . ($ this ->getConfiguration ()->getUserAgent () ? ' [ ' . $ this -> getConfiguration ()-> getUserAgent (). ' ] ' : '' ));
197197 curl_setopt ($ ch , CURLOPT_HTTPHEADER ,
198198 array ('Accept: */* ' , 'Content-Type: application/json ' ));
199199 curl_setopt ($ ch , CURLOPT_VERBOSE , $ this ->getConfiguration ()->isCurlOptVerbose ());
@@ -215,6 +215,7 @@ public function exec($context, $post_data = null, $custom_request = null, $tries
215215 $ post_data = null ;
216216 curl_setopt ($ ch , CURLOPT_POST , false );
217217 curl_setopt ($ ch , CURLOPT_URL , $ url );
218+ // echo $url;
218219 }
219220
220221 $ response = $ this ->curlExec ($ ch , $ tries );
@@ -291,6 +292,7 @@ private function createUploadHandle($url, $upload_file)
291292 curl_setopt ($ ch , CURLOPT_SSL_VERIFYHOST , $ this ->getConfiguration ()->isCurlOptSslVerifyHost ());
292293 curl_setopt ($ ch , CURLOPT_SSL_VERIFYPEER , $ this ->getConfiguration ()->isCurlOptSslVerifyPeer ());
293294 curl_setopt ($ ch , CURLOPT_FOLLOWLOCATION , true );
295+ curl_setopt ($ ch , CURLOPT_USERAGENT , self ::$ UserAgent . ($ this ->getConfiguration ()->getUserAgent () ? ' [] ' : '' ));
294296 curl_setopt ($ ch , CURLOPT_HTTPHEADER ,
295297 array (
296298 'Accept: */* ' ,
0 commit comments