X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_methods.c;h=1b2d80b786dc9c1a701fbcb66f33338e4b522d3e;hp=1c3b99c599528e2d7d10eb9add79a62680657c3a;hb=0ac32c9b8590e88a5f110cc8b3154001d5c0c089;hpb=5c295d7204cd8e961b5c44a54e87563df1b058dc diff --git a/http_methods.c b/http_methods.c index 1c3b99c..1b2d80b 100644 --- a/http_methods.c +++ b/http_methods.c @@ -21,9 +21,14 @@ #include "php.h" #include "php_http.h" +#include "php_http_std_defs.h" #include "php_http_api.h" +#include "php_http_cache_api.h" #include "php_http_curl_api.h" -#include "php_http_std_defs.h" +#include "php_http_date_api.h" +#include "php_http_headers_api.h" +#include "php_http_send_api.h" +#include "php_http_url_api.h" #ifdef ZEND_ENGINE_2 @@ -438,6 +443,11 @@ PHP_METHOD(HttpResponse, send) do_cache = GET_PROP(obj, cache); do_gzip = GET_PROP(obj, gzip); + /* gzip */ + if (Z_LVAL_P(do_gzip)) { + php_start_ob_buffer_named("ob_gzhandler", 0, 1 TSRMLS_CC); + } + /* caching */ if (Z_LVAL_P(do_cache)) { zval *cctrl, *etag, *lmod, *ccraw; @@ -458,11 +468,6 @@ PHP_METHOD(HttpResponse, send) } } - /* gzip */ - if (Z_LVAL_P(do_gzip)) { - /* ... */ - } - /* content type */ { zval *ctype = GET_PROP(obj, contentType);