X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=http_encoding_api.c;h=c0d1140d4d452f5e0d304caea652959836709c1d;hb=d4f8313f211bdc3e62a4788690cad8edef85f7f2;hp=32072641204426fc5724ea5a7f410d37c7c71248;hpb=8480134f621c302c1e1c29ee1aefe6a94f060c2b;p=m6w6%2Fext-http diff --git a/http_encoding_api.c b/http_encoding_api.c index 3207264..c0d1140 100644 --- a/http_encoding_api.c +++ b/http_encoding_api.c @@ -479,7 +479,7 @@ PHP_HTTP_API STATUS _http_encoding_deflate_stream_flush(http_encoding_stream *s, { case Z_OK: case Z_STREAM_END: - *encoded_len = 0x800 - s->stream.avail_out; + *encoded_len = 0x8000 - s->stream.avail_out; *encoded = erealloc_rel(*encoded, *encoded_len + 1); (*encoded)[*encoded_len] = '\0'; return SUCCESS; @@ -538,7 +538,7 @@ PHP_HTTP_API STATUS _http_encoding_inflate_stream_finish(http_encoding_stream *s { int status; - *decoded_len = s->stream.avail_in << 2; + *decoded_len = PHPSTR_LEN(s->stream.opaque) << 2; *decoded = emalloc_rel(*decoded_len); /* inflate remaining input */