Skip to content

Commit 90da199

Browse files
committed
Disable compression when content-type is text/event-stream
1 parent 366d073 commit 90da199

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

httplib.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -2316,7 +2316,8 @@ inline const char *status_message(int status) {
23162316
}
23172317

23182318
inline bool can_compress_content_type(const std::string &content_type) {
2319-
return !content_type.find("text/") || content_type == "image/svg+xml" ||
2319+
return (!content_type.find("text/") && content_type != "text/event-stream") ||
2320+
content_type == "image/svg+xml" ||
23202321
content_type == "application/javascript" ||
23212322
content_type == "application/json" ||
23222323
content_type == "application/xml" ||

0 commit comments

Comments
 (0)