Created
February 17, 2016 17:23
-
-
Save xcir/2d3b418c7e63d7148b5a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/bin/varnishtest/vtc_http2.c b/bin/varnishtest/vtc_http2.c | |
index 208db11..8b942ac 100644 | |
--- a/bin/varnishtest/vtc_http2.c | |
+++ b/bin/varnishtest/vtc_http2.c | |
@@ -490,28 +490,30 @@ receive_frame(void *priv) { | |
vtc_log(hp->vl, 4, "s%lu - stream->dependency: %u", s->id, s->dependency); | |
vtc_log(hp->vl, 4, "s%lu - stream->weight: %u", s->id, s->weight); | |
} | |
- iter = HPK_NewIter(s->hp->inctx, f->data + delta, f->size - delta); | |
- | |
- while (s->nhdrs < MAX_HDR) { | |
- r = HPK_DecHdr(iter, s->hdrs + s->nhdrs); | |
- if (r == hpk_err ) | |
- break; | |
- vtc_log(hp->vl, 4, | |
- "s%lu - header: %s : %s (%d)", | |
- s->id, | |
- s->hdrs[s->nhdrs].key.ptr, | |
- s->hdrs[s->nhdrs].value.ptr, | |
- s->nhdrs); | |
- s->nhdrs++; | |
- if (r == hpk_done) | |
- break; | |
- } | |
- //XXX document too many headers errors | |
- if (r != hpk_done) | |
- vtc_log(hp->vl, hp->fatal ? 4 : 0, | |
- "Header decoding failed (%d)", | |
- hp->fatal); | |
- HPK_FreeIter(iter); | |
+ if(f->size) { | |
+ iter = HPK_NewIter(s->hp->inctx, f->data + delta, f->size - delta); | |
+ | |
+ while (s->nhdrs < MAX_HDR) { | |
+ r = HPK_DecHdr(iter, s->hdrs + s->nhdrs); | |
+ if (r == hpk_err ) | |
+ break; | |
+ vtc_log(hp->vl, 4, | |
+ "s%lu - header: %s : %s (%d)", | |
+ s->id, | |
+ s->hdrs[s->nhdrs].key.ptr, | |
+ s->hdrs[s->nhdrs].value.ptr, | |
+ s->nhdrs); | |
+ s->nhdrs++; | |
+ if (r == hpk_done) | |
+ break; | |
+ } | |
+ //XXX document too many headers errors | |
+ if (r != hpk_done) | |
+ vtc_log(hp->vl, hp->fatal ? 4 : 0, | |
+ "Header decoding failed (%d)", | |
+ hp->fatal); | |
+ HPK_FreeIter(iter); | |
+ } | |
} else if (f->type == TYPE_PRIORITY) { | |
char *buf; | |
if (f->size != 5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment