From d298b56dfdfd19ce6faf8fa201f8f1a080ca3e07 Mon Sep 17 00:00:00 2001 From: Valentin Vanelslande Date: Mon, 18 May 2020 17:34:19 -0500 Subject: [PATCH 1/2] Update httplib.h --- httplib.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/httplib.h b/httplib.h index 760820330f..ca0d4a58df 100644 --- a/httplib.h +++ b/httplib.h @@ -2056,6 +2056,7 @@ bool read_content(Stream &strm, T &x, size_t payload_max_length, int &status, return receiver(buf, n); }; +#ifndef CPPHTTPLIB_DO_NOT_DECOMPRESS #ifdef CPPHTTPLIB_ZLIB_SUPPORT decompressor decompressor; @@ -2077,6 +2078,7 @@ bool read_content(Stream &strm, T &x, size_t payload_max_length, int &status, status = 415; return false; } +#endif #endif auto ret = true; From 37d62a5caa4cb36193a4670625ac46cb915e89b3 Mon Sep 17 00:00:00 2001 From: Valentin Vanelslande Date: Mon, 18 May 2020 17:40:58 -0500 Subject: [PATCH 2/2] Add comment --- httplib.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/httplib.h b/httplib.h index ca0d4a58df..0b6d4dec48 100644 --- a/httplib.h +++ b/httplib.h @@ -63,6 +63,8 @@ : 0)) #endif +// if CPPHTTPLIB_DO_NOT_DECOMPRESS is defined, the library will not decompress bodies + /* * Headers */