BUG/MINOR: http-client: Reject any 101-switching-protocols response
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 8 Jul 2025 06:57:16 +0000 (08:57 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 26 Aug 2025 06:35:02 +0000 (08:35 +0200)
commit31ff75c23d25eb6b10dbe9f1af09e63083428df2
tree7a206716130322847abb066806ca79713bb15b52
parent39b319f6c9d615c546631ea918daff11684c7b1b
BUG/MINOR: http-client: Reject any 101-switching-protocols response

Protocol updages are not supported by the http-client. So report an error is
a 101-switching-protocols response is received. Of course, it is unexpected
because the API is not designed to support upgrades. But it is better to
properly handle this case.

This patch could be backported as far as 2.6. It depends on the commit
"BUG/MINOR: http-client: Ignore 1XX interim responses in non-HTX mode".

(cherry picked from commit 8ba754108d70d25d796e3dc166155503aab180b2)
Signed-off-by: Amaury Denoyelle <adenoyelle@haproxy.com>
(cherry picked from commit 0bfaef56d630a355d85fcdf2b733e479fee8595b)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/http_client.c