mirror of
https://github.com/yhirose/cpp-httplib
synced 2024-11-21 14:29:10 -07:00
Disable compression when content-type is text/event-stream
This commit is contained in:
parent
366d073490
commit
90da199aba
1 changed files with 2 additions and 1 deletions
|
@ -2316,7 +2316,8 @@ inline const char *status_message(int status) {
|
|||
}
|
||||
|
||||
inline bool can_compress_content_type(const std::string &content_type) {
|
||||
return !content_type.find("text/") || content_type == "image/svg+xml" ||
|
||||
return (!content_type.find("text/") && content_type != "text/event-stream") ||
|
||||
content_type == "image/svg+xml" ||
|
||||
content_type == "application/javascript" ||
|
||||
content_type == "application/json" ||
|
||||
content_type == "application/xml" ||
|
||||
|
|
Loading…
Reference in a new issue