Mailing List Archive

[6.0] 1c086fbab vtc_http2: Print headers as "name: value"
commit 1c086fbabf7167fa976d2d4bba9b63de0815010a
Author: Dridi Boukelmoune <dridi.boukelmoune@gmail.com>
Date: Wed Mar 27 11:54:43 2024 +0100

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.

diff --git a/bin/varnishtest/vtc_http2.c b/bin/varnishtest/vtc_http2.c
index 491a1d072..7c6a4e563 100644
--- a/bin/varnishtest/vtc_http2.c
+++ b/bin/varnishtest/vtc_http2.c
@@ -436,22 +436,20 @@ decode_hdr(struct http *hp, struct hpk_hdr *h, const struct vsb *vsb)
r = HPK_DecHdr(iter, h + n);
if (r == hpk_err )
break;
- vtc_log(hp->vl, 4,
- "header[%2d]: %s : %s",
- n,
- h[n].key.ptr,
- h[n].value.ptr);
+ vtc_log(hp->vl, 4, "header[%2d]: %s: %s",
+ n, h[n].key.ptr, h[n].value.ptr);
n++;
if (r == hpk_done)
break;
}

- if (r != hpk_done)
+ if (r != hpk_done) {
vtc_log(hp->vl, hp->fatal ? 4 : 0,
- "Header decoding failed (%d) %d", r, hp->fatal);
- else if (n == MAX_HDR)
+ "Header decoding failed (%d) %d", r, hp->fatal);
+ } else if (n == MAX_HDR) {
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);
}
_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit