Add an example to test server concurrency.

This commit is contained in:
Chunting Gu
2019-12-06 10:34:36 +08:00
parent 2c75644622
commit 7cb5bca0d0
5 changed files with 46 additions and 11 deletions
+4
View File
@@ -84,6 +84,10 @@ public:
return data_;
}
bool compressed() const {
return compressed_;
}
#if WEBCC_ENABLE_GZIP
bool Compress() override;
+3 -1
View File
@@ -55,7 +55,9 @@ bool StringBodyHandler::Finish() {
return false;
}
#else
LOG_WARN("Compressed HTTP content remains untouched.");
if (body->compressed()) {
LOG_WARN("Compressed HTTP content remains untouched.");
}
#endif // WEBCC_ENABLE_GZIP
message_->SetBody(body, false);