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
+3 -3
View File
@@ -5,7 +5,7 @@
#include "webcc/string.h"
#include "webcc/utility.h"
#if WEBCC_ENABLE_GZIP
#ifdef WEBCC_ENABLE_GZIP
#include "webcc/gzip.h"
#endif
@@ -32,7 +32,7 @@ RequestPtr RequestBuilder::operator()() {
if (body_) {
request->SetContentType(media_type_, charset_);
#if WEBCC_ENABLE_GZIP
#ifdef WEBCC_ENABLE_GZIP
if (gzip_ && body_->Compress()) {
request->SetHeader(headers::kContentEncoding, "gzip");
}
@@ -54,7 +54,7 @@ RequestPtr RequestBuilder::operator()() {
return request;
}
#if WEBCC_ENABLE_GZIP
#ifdef WEBCC_ENABLE_GZIP
// Accept Gzip compressed response data or not.
RequestBuilder& RequestBuilder::AcceptGzip(bool gzip) {