projects
/
m6w6
/
ext-http
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
|
inline
| side by side (from parent 1:
9467cc0
)
since we use the curl write handler we can use curl's decoder
author
Michael Wallner
<mike@php.net>
Thu, 5 Feb 2015 15:25:27 +0000
(16:25 +0100)
committer
Michael Wallner
<mike@php.net>
Thu, 5 Feb 2015 15:25:27 +0000
(16:25 +0100)
php_http_client_curl.c
patch
|
blob
|
history
diff --git
a/php_http_client_curl.c
b/php_http_client_curl.c
index 501681d3ec9e96df9a5101c04e72a3d504055ee7..8aaeaa069019b6936408d54d8bad95ff465e07e2 100644
(file)
--- a/
php_http_client_curl.c
+++ b/
php_http_client_curl.c
@@
-948,9
+948,10
@@
static STATUS php_http_curle_option_set_lastmodified(php_http_option_t *opt, zva
static STATUS php_http_curle_option_set_compress(php_http_option_t *opt, zval *val, void *userdata)
{
php_http_client_curl_handler_t *curl = userdata;
static STATUS php_http_curle_option_set_compress(php_http_option_t *opt, zval *val, void *userdata)
{
php_http_client_curl_handler_t *curl = userdata;
+ CURL *ch = curl->handle;
- if (
Z_BVAL_P(val
)) {
-
curl->options.headers = curl_slist_append(curl->options.headers, "Accept-Encoding: gzip;q=1.0,deflate;q=0.5")
;
+ if (
CURLE_OK != curl_easy_setopt(ch, CURLOPT_ACCEPT_ENCODING, Z_BVAL_P(val) ? "" : NULL
)) {
+
return FAILURE
;
}
return SUCCESS;
}
}
return SUCCESS;
}