mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 07:07:04 +02:00
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".
This commit is contained in:
parent
9d10be33ae
commit
8ba754108d
@ -649,8 +649,11 @@ void httpclient_applet_io_handler(struct appctx *appctx)
|
||||
goto out;
|
||||
|
||||
/* Skipp any 1XX interim responses */
|
||||
if (sl->info.res.status < 200 &&
|
||||
(sl->info.res.status == 100 || sl->info.res.status >= 102)) {
|
||||
if (sl->info.res.status < 200) {
|
||||
/* Upgrade are not supported. Report an error */
|
||||
if (sl->info.res.status == 101)
|
||||
goto error;
|
||||
|
||||
while (blk) {
|
||||
enum htx_blk_type type = htx_get_blk_type(blk);
|
||||
uint32_t sz = htx_get_blksz(blk);
|
||||
|
Loading…
Reference in New Issue
Block a user