]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Fix #5782
authorFlole998 <Flole998@users.noreply.github.com>
Sat, 23 Nov 2019 16:11:58 +0000 (17:11 +0100)
committerJaroslav Kysela <perex@perex.cz>
Thu, 28 Nov 2019 18:11:58 +0000 (19:11 +0100)
src/httpc.c

index 6cb4798cc66c61b68b1465d6b4532042351cfaa4..52ecf6dcea94c682349e7b74e5461a4c3bc5f50d 100644 (file)
@@ -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);