aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar David G. Quintas <dgq@google.com>2015-12-10 14:39:59 -0800
committerGravatar David G. Quintas <dgq@google.com>2015-12-10 14:39:59 -0800
commitce4bbbce7673396a86f1e4965b8701f8d113a748 (patch)
tree545492e4552be42eb151a292c04a712573499f49
parent4b6974ca8cd8cfc967d25980e9285f97409babb7 (diff)
parent8ea10c8dd4a380ba6b9445b8f94f007fa0ec573a (diff)
Merge pull request #4402 from ctiller/hpack_enc
Use assert instead of writing out something very similar
-rw-r--r--src/core/transport/chttp2/hpack_encoder.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/transport/chttp2/hpack_encoder.c b/src/core/transport/chttp2/hpack_encoder.c
index 7575031e58..06f603db9c 100644
--- a/src/core/transport/chttp2/hpack_encoder.c
+++ b/src/core/transport/chttp2/hpack_encoder.c
@@ -365,10 +365,9 @@ static void hpack_enc(grpc_chttp2_hpack_compressor *c, grpc_mdelem *elem,
GPR_ASSERT(GPR_SLICE_LENGTH(elem->key->slice) > 0);
if (GPR_SLICE_START_PTR(elem->key->slice)[0] != ':') { /* regular header */
st->seen_regular_header = 1;
- } else if (st->seen_regular_header != 0) { /* reserved header */
- gpr_log(GPR_ERROR,
- "Reserved header (colon-prefixed) happening after regular ones.");
- abort();
+ } else {
+ GPR_ASSERT(st->seen_regular_header == 0 &&
+ "Reserved header (colon-prefixed) happening after regular ones.");
}
inc_filter(HASH_FRAGMENT_1(elem_hash), &c->filter_elems_sum, c->filter_elems);