This is an automated email from the ASF dual-hosted git repository.
wwbmmm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brpc.git
The following commit(s) were added to refs/heads/master by this push:
new 806f4d46 Fix comment of http parser and some typos (#2445)
806f4d46 is described below
commit 806f4d46c9393f6aeb92aa558d95fe95d1784355
Author: Bright Chen <[email protected]>
AuthorDate: Wed Nov 15 11:39:54 2023 +0800
Fix comment of http parser and some typos (#2445)
---
src/brpc/details/http_parser.h | 4 +++-
src/brpc/policy/baidu_rpc_protocol.cpp | 4 ++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/brpc/details/http_parser.h b/src/brpc/details/http_parser.h
index cd4c5cc7..b64eb00d 100644
--- a/src/brpc/details/http_parser.h
+++ b/src/brpc/details/http_parser.h
@@ -208,7 +208,9 @@ struct http_parser {
unsigned int index : 8; /* index into current matcher */
uint32_t nread; /* # bytes read in various scenarios */
- uint64_t content_length; /* # bytes in body (0 if no Content-Length header)
*/
+ uint64_t content_length; /* # bytes in body. `(uint64_t) -1` (all bits one)
+ * if no Content-Length header.
+ */
/** READ-ONLY **/
unsigned short http_major;
diff --git a/src/brpc/policy/baidu_rpc_protocol.cpp
b/src/brpc/policy/baidu_rpc_protocol.cpp
index 7fafa218..d8342619 100644
--- a/src/brpc/policy/baidu_rpc_protocol.cpp
+++ b/src/brpc/policy/baidu_rpc_protocol.cpp
@@ -236,7 +236,7 @@ void SendRpcResponse(int64_t correlation_id,
span->set_response_size(res_buf.size());
}
// Send rpc response over stream even if server side failed to create
- // stream for some reasons.
+ // stream for some reason.
if(cntl->has_remote_stream()){
// Send the response over stream to notify that this stream connection
// is successfully built.
@@ -255,7 +255,7 @@ void SendRpcResponse(int64_t correlation_id,
}
if(stream_ptr) {
- // Now it's ok the mark this server-side stream as connectted as
all the
+ // Now it's ok the mark this server-side stream as connected as
all the
// written user data would follower the RPC response.
((Stream*)stream_ptr->conn())->SetConnected();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]