From 221c29b40b1e53ae09a69d9458442dd4fea665f5 Mon Sep 17 00:00:00 2001 From: Flole998 Date: Sat, 23 Nov 2019 17:11:58 +0100 Subject: [PATCH] Fix #5782 --- src/httpc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/httpc.c b/src/httpc.c index 6cb4798cc..52ecf6dce 100644 --- a/src/httpc.c +++ b/src/httpc.c @@ -1093,7 +1093,9 @@ header: } p = http_arg_get(&hc->hc_args, "Connection"); if (p && ver != RTSP_VERSION_1_0) { - if (strcasecmp(p, "close") == 0) + if (strcasecmp(p, "close") == 0 || strcasecmp(p, "upgrade") == 0) /* Some servers + send the upgrade header to switch to http2 even though we did not request this. + Assume that we can not keep alive the connection in that case */ hc->hc_keepalive = 0; else if (strcasecmp(p, "keep-alive")) /* no change for keep-alive */ return http_client_flush(hc, -EINVAL); -- 2.47.2