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 7247c6a5 fix (#2373)
7247c6a5 is described below

commit 7247c6a512d7678beaee777e4c1c6b8d83ffdea8
Author: aba_aba_da_duo_duo <[email protected]>
AuthorDate: Wed Oct 25 15:03:19 2023 +0800

    fix (#2373)
---
 src/brpc/policy/http2_rpc_protocol.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/brpc/policy/http2_rpc_protocol.cpp 
b/src/brpc/policy/http2_rpc_protocol.cpp
index c9718f4c..d5f388be 100644
--- a/src/brpc/policy/http2_rpc_protocol.cpp
+++ b/src/brpc/policy/http2_rpc_protocol.cpp
@@ -1568,6 +1568,10 @@ H2UnsentRequest::AppendAndDestroySelf(butil::IOBuf* out, 
Socket* socket) {
     HPackOptions options;
     options.encode_name = FLAGS_h2_hpack_encode_name;
     options.encode_value = FLAGS_h2_hpack_encode_value;
+    if (ctx->remote_settings().header_table_size == 0) {
+        options.index_policy = HPACK_NEVER_INDEX_HEADER;
+    }
+    
     for (size_t i = 0; i < _size; ++i) {
         hpacker.Encode(&appender, _list[i], options);
     }
@@ -1709,6 +1713,9 @@ H2UnsentResponse::AppendAndDestroySelf(butil::IOBuf* out, 
Socket* socket) {
     HPackOptions options;
     options.encode_name = FLAGS_h2_hpack_encode_name;
     options.encode_value = FLAGS_h2_hpack_encode_value;
+    if (ctx->remote_settings().header_table_size == 0) {
+        options.index_policy = HPACK_NEVER_INDEX_HEADER;
+    }
 
     for (size_t i = 0; i < _size; ++i) {
         hpacker.Encode(&appender, _list[i], options);


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to