From ad5c868ca466f681985bce0b8de6de673fb8b32d Mon Sep 17 00:00:00 2001 From: Chunting Gu Date: Mon, 1 Feb 2021 09:30:27 +0800 Subject: [PATCH] fix a typo --- webcc/client.cc | 4 ++-- webcc/response_parser.cc | 2 +- webcc/response_parser.h | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/webcc/client.cc b/webcc/client.cc index 69ad674..e0b3b63 100644 --- a/webcc/client.cc +++ b/webcc/client.cc @@ -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(); diff --git a/webcc/response_parser.cc b/webcc/response_parser.cc index 61cee40..0f9bbf9 100644 --- a/webcc/response_parser.cc +++ b/webcc/response_parser.cc @@ -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; } diff --git a/webcc/response_parser.h b/webcc/response_parser.h index 4860295..cef2000 100644 --- a/webcc/response_parser.h +++ b/webcc/response_parser.h @@ -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