refine the usage of build options

This commit is contained in:
Chunting Gu
2021-02-01 09:23:53 +08:00
parent 233aa5910c
commit 1b8b0b24ac
19 changed files with 48 additions and 45 deletions
+2 -2
View File
@@ -109,7 +109,7 @@ public:
// Add the `Date` header to the response.
ResponseBuilder& Date();
#if WEBCC_ENABLE_GZIP
#ifdef WEBCC_ENABLE_GZIP
ResponseBuilder& Gzip(bool gzip = true) {
gzip_ = gzip;
return *this;
@@ -131,7 +131,7 @@ private:
// Character set of the body (e.g., "utf-8").
std::string charset_;
#if WEBCC_ENABLE_GZIP
#ifdef WEBCC_ENABLE_GZIP
// Compress the body data (only for string body).
bool gzip_ = false;
#endif // WEBCC_ENABLE_GZIP