diff --git a/web.php b/web.php index 4019ff4f..c40965e0 100644 --- a/web.php +++ b/web.php @@ -359,7 +359,8 @@ protected function _curl($url,$options) { curl_setopt($curl,CURLOPT_POSTFIELDS,$options['content']); if (isset($options['proxy'])) curl_setopt($curl,CURLOPT_PROXY,$options['proxy']); - curl_setopt($curl,CURLOPT_ENCODING,'gzip,deflate'); + curl_setopt($curl,CURLOPT_ENCODING,isset($options['encoding']) + ? $options['encoding'] : 'gzip,deflate'); $timeout=isset($options['timeout'])? $options['timeout']: ini_get('default_socket_timeout'); @@ -617,7 +618,8 @@ function request($url,array $options=NULL) { } $this->subst($options['header'], [ - 'Accept-Encoding: gzip,deflate', + 'Accept-Encoding: '.(isset($options['encoding'])? + $options['encoding']:'gzip,deflate'), 'User-Agent: '.(isset($options['user_agent'])? $options['user_agent']: 'Mozilla/5.0 (compatible; '.php_uname('s').')'),