You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by ja...@apache.org on 2020/07/21 16:19:59 UTC

[incubator-brpc] branch master updated: fix a typo: COMPLELE -> COMPLETE

This is an automated email from the ASF dual-hosted git repository.

jamesge pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-brpc.git


The following commit(s) were added to refs/heads/master by this push:
     new f67446d  fix a typo: COMPLELE -> COMPLETE
     new 11da9c8  Merge pull request #1116 from wasphin/feature/fix-typo
f67446d is described below

commit f67446d7e123e6f96ad55476309671951be762b5
Author: Xiaofeng Wang <wa...@gmail.com>
AuthorDate: Tue May 19 08:13:30 2020 +0800

    fix a typo: COMPLELE -> COMPLETE
---
 src/brpc/details/http_message.cpp     | 6 +++---
 src/brpc/details/http_message.h       | 6 +++---
 src/brpc/policy/http_rpc_protocol.cpp | 2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/brpc/details/http_message.cpp b/src/brpc/details/http_message.cpp
index 96bb326..d9c590c 100644
--- a/src/brpc/details/http_message.cpp
+++ b/src/brpc/details/http_message.cpp
@@ -134,7 +134,7 @@ int HttpMessage::on_header_value(http_parser *parser,
 
 int HttpMessage::on_headers_complete(http_parser *parser) {
     HttpMessage *http_message = (HttpMessage *)parser->data;
-    http_message->_stage = HTTP_ON_HEADERS_COMPLELE;
+    http_message->_stage = HTTP_ON_HEADERS_COMPLETE;
     // Move content-type into the member field.
     const std::string* content_type = http_message->header().GetHeader("content-type");
     if (content_type) {
@@ -295,12 +295,12 @@ int HttpMessage::OnMessageComplete() {
     _cur_value = NULL;
     if (!_read_body_progressively) {
         // Normal read.
-        _stage = HTTP_ON_MESSAGE_COMPLELE;
+        _stage = HTTP_ON_MESSAGE_COMPLETE;
         return 0;
     }
     // Progressive read.
     std::unique_lock<butil::Mutex> mu(_body_mutex);
-    _stage = HTTP_ON_MESSAGE_COMPLELE;
+    _stage = HTTP_ON_MESSAGE_COMPLETE;
     if (_body_reader != NULL) {
         // Solve the case: SetBodyReader quit at ntry=MAX_TRY with non-empty
         // _body and the remaining _body is just the last part.
diff --git a/src/brpc/details/http_message.h b/src/brpc/details/http_message.h
index 548f61f..e23b201 100644
--- a/src/brpc/details/http_message.h
+++ b/src/brpc/details/http_message.h
@@ -37,9 +37,9 @@ enum HttpParserStage {
     HTTP_ON_STATUS,
     HTTP_ON_HEADER_FIELD, 
     HTTP_ON_HEADER_VALUE,
-    HTTP_ON_HEADERS_COMPLELE,
+    HTTP_ON_HEADERS_COMPLETE,
     HTTP_ON_BODY,
-    HTTP_ON_MESSAGE_COMPLELE
+    HTTP_ON_MESSAGE_COMPLETE
 };
 
 class HttpMessage {
@@ -61,7 +61,7 @@ public:
     // Returns bytes parsed, -1 on failure.
     ssize_t ParseFromIOBuf(const butil::IOBuf &buf);
 
-    bool Completed() const { return _stage == HTTP_ON_MESSAGE_COMPLELE; }
+    bool Completed() const { return _stage == HTTP_ON_MESSAGE_COMPLETE; }
     HttpParserStage stage() const { return _stage; }
 
     HttpHeader &header() { return _header; }
diff --git a/src/brpc/policy/http_rpc_protocol.cpp b/src/brpc/policy/http_rpc_protocol.cpp
index 734eb0f..e955286 100644
--- a/src/brpc/policy/http_rpc_protocol.cpp
+++ b/src/brpc/policy/http_rpc_protocol.cpp
@@ -1099,7 +1099,7 @@ ParseResult ParseHttpMessage(butil::IOBuf *source, Socket *socket,
             }
             return result;
         } else if (socket->is_read_progressive() &&
-                   http_imsg->stage() >= HTTP_ON_HEADERS_COMPLELE) {
+                   http_imsg->stage() >= HTTP_ON_HEADERS_COMPLETE) {
             // header part of a progressively-read http message is complete,
             // go on to ProcessHttpXXX w/o waiting for full body.
             http_imsg->AddOneRefForStage2(); // released when body is fully read


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org