mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 13:51:26 +02:00
BUG/MEDIUM: mux-h2: always omit :scheme and :path for the CONNECT method
This is mandated by RFC7540 #8.3, these pseudo-headers must not be emitted with the CONNECT method. This must be backported to 1.9.
This commit is contained in:
parent
1da41ecf5b
commit
5be92ff23f
@ -4425,6 +4425,12 @@ static size_t h2s_htx_bck_make_req_headers(struct h2s *h2s, struct htx *htx)
|
|||||||
goto full;
|
goto full;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* RFC7540 #8.3: the CONNECT method must have :
|
||||||
|
* - :authority set to the URI part (host:port)
|
||||||
|
* - :method set to CONNECT
|
||||||
|
* - :scheme and :path omitted
|
||||||
|
*/
|
||||||
|
if (sl->info.req.meth != HTTP_METH_CONNECT) {
|
||||||
/* encode the scheme which is always "https" (or 0x86 for "http") */
|
/* encode the scheme which is always "https" (or 0x86 for "http") */
|
||||||
if (!hpack_encode_scheme(&outbuf, ist("https"))) {
|
if (!hpack_encode_scheme(&outbuf, ist("https"))) {
|
||||||
/* output full */
|
/* output full */
|
||||||
@ -4440,6 +4446,7 @@ static size_t h2s_htx_bck_make_req_headers(struct h2s *h2s, struct htx *htx)
|
|||||||
goto realign_again;
|
goto realign_again;
|
||||||
goto full;
|
goto full;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* encode all headers, stop at empty name */
|
/* encode all headers, stop at empty name */
|
||||||
for (hdr = 0; hdr < sizeof(list)/sizeof(list[0]); hdr++) {
|
for (hdr = 0; hdr < sizeof(list)/sizeof(list[0]); hdr++) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user