aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/transport
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lib/transport')
-rw-r--r--src/core/lib/transport/metadata.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/lib/transport/metadata.h b/src/core/lib/transport/metadata.h
index 277c257933..77c32c72de 100644
--- a/src/core/lib/transport/metadata.h
+++ b/src/core/lib/transport/metadata.h
@@ -146,8 +146,10 @@ void grpc_mdelem_unref(grpc_mdelem *md);
const char *grpc_mdstr_as_c_string(grpc_mdstr *s);
#define GRPC_MDSTR_LENGTH(s) (GPR_SLICE_LENGTH(s->slice))
+
+/* We add 32 bytes of padding as per RFC-7540 section 6.5.2. */
#define GRPC_MDELEM_LENGTH(e) (GRPC_MDSTR_LENGTH(e->key) + \
- GRPC_MDSTR_LENGTH(e->value))
+ GRPC_MDSTR_LENGTH(e->value) + 32)
int grpc_mdstr_is_legal_header(grpc_mdstr *s);
int grpc_mdstr_is_legal_nonbin_header(grpc_mdstr *s);