[prev in list] [next in list] [prev in thread] [next in thread]
List: varnish-commit
Subject: [master] de11d7d9e h2: Relax "no //" URLs requirement
From: Nils Goroll <nils.goroll () uplex ! de>
Date: 2023-04-24 13:55:07
Message-ID: 20230424135507.26541111258 () lists ! varnish-cache ! org
[Download RAW message or body]
commit de11d7d9e898a5668d3d5dc9e7eb55fc826b40da
Author: Dag Haavi Finstad <daghf@varnish-software.com>
Date: Mon Apr 3 10:26:51 2023 +0200
h2: Relax "no //" URLs requirement
This requirement was dropped in the updated rfc 9113.
Fixes: #3911
diff --git a/bin/varnishd/http2/cache_http2_hpack.c \
b/bin/varnishd/http2/cache_http2_hpack.c index 36570a751..8384856dd 100644
--- a/bin/varnishd/http2/cache_http2_hpack.c
+++ b/bin/varnishd/http2/cache_http2_hpack.c
@@ -135,10 +135,9 @@ h2h_addhdr(struct http *hp, char *b, size_t namelen, size_t len)
n = HTTP_HDR_URL;
disallow_empty = 1;
- // rfc7540,l,3060,3071
- if (((len > 0 && *b != '/') ||
- (len > 1 && *(b+1) == '/')) &&
- (strncmp(b, "*", len) != 0)) {
+ // rfc9113,l,2693,2705
+ if (len > 0 && *b != '/' &&
+ strncmp(b, "*", len) != 0) {
VSLb(hp->vsl, SLT_BogoHeader,
"Illegal :path pseudo-header %.*s",
(int)len, b);
diff --git a/bin/varnishtest/tests/a02027.vtc b/bin/varnishtest/tests/a02027.vtc
index ff34b0071..e9dcf6619 100644
--- a/bin/varnishtest/tests/a02027.vtc
+++ b/bin/varnishtest/tests/a02027.vtc
@@ -22,8 +22,8 @@ client c1 {
client c1 {
stream 1 {
txreq -noadd -hdr ":authority" "foo.com" -hdr ":path" "//foo" -hdr ":scheme" \
"http" -hdr ":method" "GET"
- rxrst
- expect rst.err == PROTOCOL_ERROR
+ rxresp
+ expect resp.status == 200
} -run
} -run
_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic