diff --git a/ixwebsocket/IXHttpClient.cpp b/ixwebsocket/IXHttpClient.cpp index 861d8ce4..d20f1c4d 100644 --- a/ixwebsocket/IXHttpClient.cpp +++ b/ixwebsocket/IXHttpClient.cpp @@ -204,11 +204,13 @@ namespace ix if (verb == kPost || verb == kPut || verb == kPatch || _forceBody) { // Set request compression header +#ifdef IXWEBSOCKET_USE_ZLIB if (args->compressRequest) { ss << "Content-Encoding: gzip" << "\r\n"; } +#endif ss << "Content-Length: " << body.size() << "\r\n"; @@ -580,10 +582,12 @@ namespace ix multipartBoundary, httpFormDataParameters, httpParameters); } +#ifdef IXWEBSOCKET_USE_ZLIB if (args->compressRequest) { body = gzipCompress(body); } +#endif return request(url, verb, body, args); }