Fix header-size computation to comply with the HTTP/2 RFC.

pull/6320/head
Mark D. Roth 9 years ago
parent 0c6070f68d
commit c2de452309
  1. 4
      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);

Loading…
Cancel
Save