diff --git a/src/http_client_casablanca.cpp b/src/http_client_casablanca.cpp index 30e31354e0..ddd4f01f70 100644 --- a/src/http_client_casablanca.cpp +++ b/src/http_client_casablanca.cpp @@ -89,6 +89,9 @@ class gzip_compression_support : public http::http_pipeline_stage return next_stage()->propagate(request).then([](http::http_response response) -> pplx::task { + if (response.headers().content_type() == _XPLATSTR("application/octet-stream")) + return pplx::task_from_result(response); // don't try to decompress binary data + string_t encoding; if (response.headers().match(http::header_names::content_encoding, encoding) && encoding == _XPLATSTR("gzip")) {