From f6e4e2d0f332fcf9e8896e4241e6e4e323643cef Mon Sep 17 00:00:00 2001 From: yhirose Date: Sat, 7 Sep 2024 10:15:22 -0400 Subject: [PATCH] Code cleanup --- httplib.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/httplib.h b/httplib.h index c9d8552..0d07961 100644 --- a/httplib.h +++ b/httplib.h @@ -3765,8 +3765,9 @@ inline bool can_compress_content_type(const std::string &content_type) { case "application/protobuf"_t: case "application/xhtml+xml"_t: return true; - default: - return !content_type.rfind("text/", 0) && tag != "text/event-stream"_t; + case "text/event-stream"_t: return false; + + default: return !content_type.rfind("text/", 0); } }