mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-23 19:53:47 +00:00
Added support for gzip stream to http.request
This commit is contained in:
@@ -310,9 +310,10 @@ duk_ret_t ILibDuktape_CompressedStream_decompressor(duk_context *ctx)
|
||||
cs->Z.opaque = Z_NULL;
|
||||
cs->Z.avail_in = 0;
|
||||
cs->Z.next_in = Z_NULL;
|
||||
if (duk_is_number(ctx, 0) && duk_require_int(ctx, 0)==1)
|
||||
if (duk_is_object(ctx, 0))
|
||||
{
|
||||
if (inflateInit2(&(cs->Z), -MAX_WBITS) != Z_OK) { return(ILibDuktape_Error(ctx, "zlib error")); }
|
||||
int wbits = Duktape_GetIntPropertyValue(ctx, 0, "WBITS", -15);
|
||||
if (inflateInit2(&(cs->Z), wbits) != Z_OK) { return(ILibDuktape_Error(ctx, "zlib error")); }
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user