fix a typo
This commit is contained in:
+2
-2
@@ -36,10 +36,10 @@ Error Client::Request(RequestPtr request, bool connect, bool stream) {
|
|||||||
// - If request.Accept-Encoding is "identity", the response will have
|
// - If request.Accept-Encoding is "identity", the response will have
|
||||||
// Content-Length.
|
// Content-Length.
|
||||||
if (request->method() == methods::kHead) {
|
if (request->method() == methods::kHead) {
|
||||||
response_parser_.set_ignroe_body(true);
|
response_parser_.set_ignore_body(true);
|
||||||
} else {
|
} else {
|
||||||
// Reset in case the connection is persistent.
|
// Reset in case the connection is persistent.
|
||||||
response_parser_.set_ignroe_body(false);
|
response_parser_.set_ignore_body(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
io_context_.restart();
|
io_context_.restart();
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ bool ResponseParser::ParseStartLine(const std::string& line) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool ResponseParser::ParseContent(const char* data, std::size_t length) {
|
bool ResponseParser::ParseContent(const char* data, std::size_t length) {
|
||||||
if (ignroe_body_) {
|
if (ignore_body_) {
|
||||||
Finish();
|
Finish();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ public:
|
|||||||
|
|
||||||
void Init(Response* response, bool stream = false);
|
void Init(Response* response, bool stream = false);
|
||||||
|
|
||||||
void set_ignroe_body(bool ignroe_body) {
|
void set_ignore_body(bool ignore_body) {
|
||||||
ignroe_body_ = ignroe_body;
|
ignore_body_ = ignore_body;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -37,7 +37,7 @@ private:
|
|||||||
|
|
||||||
// The response for HEAD request could also have `Content-Length` header,
|
// The response for HEAD request could also have `Content-Length` header,
|
||||||
// set this flag to ignore it.
|
// set this flag to ignore it.
|
||||||
bool ignroe_body_ = false;
|
bool ignore_body_ = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webcc
|
} // namespace webcc
|
||||||
|
|||||||
Reference in New Issue
Block a user