[vlc-commits] httpd: remove dead keep-alive code

Rémi Denis-Courmont git at videolan.org
Sun Oct 8 17:27:56 CEST 2017


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Oct  8 17:43:31 2017 +0300| [399f680f4176c384b5b230ff72887a15aa60abf0] | committer: Rémi Denis-Courmont

httpd: remove dead keep-alive code

No code path inserts the keep-alive token in the response.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=399f680f4176c384b5b230ff72887a15aa60abf0
---

 src/network/httpd.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/network/httpd.c b/src/network/httpd.c
index 902a45748d..6fa6d45cc0 100644
--- a/src/network/httpd.c
+++ b/src/network/httpd.c
@@ -1884,21 +1884,18 @@ static void httpdLoop(httpd_host_t *host)
                     const char *psz_connection = httpd_MsgGet(&cl->answer, "Connection");
                     const char *psz_query = httpd_MsgGet(&cl->query, "Connection");
                     bool b_connection = false;
-                    bool b_keepalive = false;
                     bool b_query = false;
 
                     cl->url = NULL;
                     if (psz_connection) {
                         b_connection = (strcasecmp(psz_connection, "Close") == 0);
-                        b_keepalive = (strcasecmp(psz_connection, "Keep-Alive") == 0);
                     }
 
                     if (psz_query)
                         b_query = (strcasecmp(psz_query, "Close") == 0);
 
                     if (((cl->query.i_proto == HTTPD_PROTO_HTTP) &&
-                                ((cl->query.i_version == 0 && b_keepalive) ||
-                                  (cl->query.i_version == 1 && !b_connection))) ||
+                                (cl->query.i_version == 1 && !b_connection)) ||
                             ((cl->query.i_proto == HTTPD_PROTO_RTSP) &&
                               !b_query && !b_connection)) {
                         httpd_MsgClean(&cl->query);



More information about the vlc-commits mailing list