mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 22:01:31 +02:00
BUG/MEDIUM: h1: Don't compare host and authority if only h1 headers are parsed
When only request headers are parsed, the host header should not be compared to the request authority because no start-line was parsed. Thus there is no authority. Till now this bug was hidden because this parsing mode was only used for the response in the FCGI multiplexer. Since the HTTP checks refactoring, the request headers may now also be parsed without the start-line. This patch fixes the issue #610. It must be backported to 2.1.
This commit is contained in:
parent
6318d33ce6
commit
7032a3fd0a
2
src/h1.c
2
src/h1.c
@ -830,7 +830,7 @@ int h1_headers_to_hdr_list(char *start, const char *stop,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!(h1m->flags & H1_MF_RESP) && isteqi(n, ist("host"))) {
|
else if (!(h1m->flags & (H1_MF_HDRS_ONLY|H1_MF_RESP)) && isteqi(n, ist("host"))) {
|
||||||
if (host_idx == -1) {
|
if (host_idx == -1) {
|
||||||
struct ist authority;
|
struct ist authority;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user