Commit 8d0cb3f5 authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

vtc_http2: Print headers as "name: value"

The extra space before the colon looked uncanny. The rest is just code
indentation improvements.

Better diff with the --ignore-all-space --word-diff options.
parent e676f779
...@@ -467,22 +467,20 @@ decode_hdr(struct http *hp, struct hpk_hdr *h, const struct vsb *vsb) ...@@ -467,22 +467,20 @@ decode_hdr(struct http *hp, struct hpk_hdr *h, const struct vsb *vsb)
r = HPK_DecHdr(iter, h + n); r = HPK_DecHdr(iter, h + n);
if (r == hpk_err ) if (r == hpk_err )
break; break;
vtc_log(hp->vl, 4, vtc_log(hp->vl, 4, "header[%2d]: %s: %s",
"header[%2d]: %s : %s", n, h[n].key.ptr, h[n].value.ptr);
n,
h[n].key.ptr,
h[n].value.ptr);
n++; n++;
if (r == hpk_done) if (r == hpk_done)
break; break;
} }
if (r != hpk_done) if (r != hpk_done) {
vtc_log(hp->vl, hp->fatal ? 4 : 0, vtc_log(hp->vl, hp->fatal ? 4 : 0,
"Header decoding failed (%d) %d", r, hp->fatal); "Header decoding failed (%d) %d", r, hp->fatal);
else if (n == MAX_HDR) } else if (n == MAX_HDR) {
vtc_log(hp->vl, hp->fatal, vtc_log(hp->vl, hp->fatal,
"Max number of headers reached (%d)", MAX_HDR); "Max number of headers reached (%d)", MAX_HDR);
}
HPK_FreeIter(iter); HPK_FreeIter(iter);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment