Commit e32ab13b authored by Dag Haavi Finstad's avatar Dag Haavi Finstad Committed by Dridi Boukelmoune

h2: Relax "no //" URLs requirement

This requirement was dropped in the updated rfc 9113.

Fixes: #3911
parent 3643aab3
......@@ -134,10 +134,9 @@ h2h_addhdr(struct h2h_decode *d, struct http *hp, char *b, size_t namelen,
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);
......
......@@ -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
......
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