fix a typo

master
Chunting Gu 5 years ago
parent 1b8b0b24ac
commit ad5c868ca4

@ -36,10 +36,10 @@ Error Client::Request(RequestPtr request, bool connect, bool stream) {
// - If request.Accept-Encoding is "identity", the response will have
// Content-Length.
if (request->method() == methods::kHead) {
response_parser_.set_ignroe_body(true);
response_parser_.set_ignore_body(true);
} else {
// Reset in case the connection is persistent.
response_parser_.set_ignroe_body(false);
response_parser_.set_ignore_body(false);
}
io_context_.restart();

@ -73,7 +73,7 @@ bool ResponseParser::ParseStartLine(const std::string& line) {
}
bool ResponseParser::ParseContent(const char* data, std::size_t length) {
if (ignroe_body_) {
if (ignore_body_) {
Finish();
return true;
}

@ -16,8 +16,8 @@ public:
void Init(Response* response, bool stream = false);
void set_ignroe_body(bool ignroe_body) {
ignroe_body_ = ignroe_body;
void set_ignore_body(bool ignore_body) {
ignore_body_ = ignore_body;
}
private:
@ -37,7 +37,7 @@ private:
// The response for HEAD request could also have `Content-Length` header,
// set this flag to ignore it.
bool ignroe_body_ = false;
bool ignore_body_ = false;
};
} // namespace webcc

Loading…
Cancel
Save