Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Avoid some code duplication
Apply some adjustments to recent patches based off of review by Nils
Goroll at UPLEX (@nigoroll)
  • Loading branch information
mbgrydeland committed Sep 3, 2019
1 parent 3fbb043 commit 406b583
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions bin/varnishd/http1/cache_http1_proto.c
Expand Up @@ -128,15 +128,16 @@ http1_dissect_hdrs(struct http *hp, char *p, struct http_conn *htc,
r++;
continue;
}
if (!vct_iscrlf(r, htc->rxbuf_e)) {
i = vct_iscrlf(r, htc->rxbuf_e);
if (i == 0) {
VSLb(hp->vsl, SLT_BogoHeader,
"Header has ctrl char 0x%02x", *r);
return (400);
}
q = r;
assert(r < htc->rxbuf_e);
r = vct_skipcrlf(r, htc->rxbuf_e);
if (r >= htc->rxbuf_e)
r += i;
assert(r <= htc->rxbuf_e);
if (r == htc->rxbuf_e)
break;
if (vct_iscrlf(r, htc->rxbuf_e))
break;
Expand Down

0 comments on commit 406b583

Please sign in to comment.