[vlc-commits] http: remove --http2 option

Rémi Denis-Courmont git at videolan.org
Sat Mar 4 18:56:02 CET 2017


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Mar  4 19:53:12 2017 +0200| [bed86f64dd322575663a4fad9184c601967bb8a6] | committer: Rémi Denis-Courmont

http: remove --http2 option

This was not implemented properly and of questionable usefulness.

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

 modules/access/http/access.c  | 7 +------
 modules/access/http/connmgr.c | 5 +----
 modules/access/http/connmgr.h | 4 +---
 3 files changed, 3 insertions(+), 13 deletions(-)

diff --git a/modules/access/http/access.c b/modules/access/http/access.c
index 56f9577..4c772d5 100644
--- a/modules/access/http/access.c
+++ b/modules/access/http/access.c
@@ -178,9 +178,7 @@ static int Open(vlc_object_t *obj)
     vlc_UrlParse(&crd_url, access->psz_url);
     vlc_credential_init(&crd, &crd_url);
 
-    bool h2c = var_InheritBool(obj, "http2");
-
-    sys->manager = vlc_http_mgr_create(obj, jar, h2c);
+    sys->manager = vlc_http_mgr_create(obj, jar);
     if (sys->manager == NULL)
         goto error;
 
@@ -295,9 +293,6 @@ vlc_module_begin()
     add_shortcut("https", "http")
     set_callbacks(Open, Close)
 
-    add_bool("http2", false, N_("Force HTTP/2"),
-             N_("Force HTTP version 2.0 over TCP."), true)
-
     add_bool("http-continuous", false, N_("Continuous stream"),
              N_("Keep reading a resource that keeps being updated."), true)
         change_safe()
diff --git a/modules/access/http/connmgr.c b/modules/access/http/connmgr.c
index 5e38442..ab4b20b 100644
--- a/modules/access/http/connmgr.c
+++ b/modules/access/http/connmgr.c
@@ -117,7 +117,6 @@ struct vlc_http_mgr
     vlc_tls_creds_t *creds;
     struct vlc_http_cookie_jar_t *jar;
     struct vlc_http_conn *conn;
-    bool use_h2c;
 };
 
 static struct vlc_http_conn *vlc_http_mgr_find(struct vlc_http_mgr *mgr,
@@ -273,8 +272,7 @@ struct vlc_http_cookie_jar_t *vlc_http_mgr_get_jar(struct vlc_http_mgr *mgr)
 }
 
 struct vlc_http_mgr *vlc_http_mgr_create(vlc_object_t *obj,
-                                         struct vlc_http_cookie_jar_t *jar,
-                                         bool h2c)
+                                         struct vlc_http_cookie_jar_t *jar)
 {
     struct vlc_http_mgr *mgr = malloc(sizeof (*mgr));
     if (unlikely(mgr == NULL))
@@ -284,7 +282,6 @@ struct vlc_http_mgr *vlc_http_mgr_create(vlc_object_t *obj,
     mgr->creds = NULL;
     mgr->jar = jar;
     mgr->conn = NULL;
-    mgr->use_h2c = h2c;
     return mgr;
 }
 
diff --git a/modules/access/http/connmgr.h b/modules/access/http/connmgr.h
index a0d7e3c..41b9cd1 100644
--- a/modules/access/http/connmgr.h
+++ b/modules/access/http/connmgr.h
@@ -60,11 +60,9 @@ struct vlc_http_cookie_jar_t *vlc_http_mgr_get_jar(struct vlc_http_mgr *);
  *
  * @param obj parent VLC object
  * @param jar HTTP cookies jar (NULL to disable cookies)
- * @param h2c Favor unencrypted HTTP/2 over HTTP/1.1
  */
 struct vlc_http_mgr *vlc_http_mgr_create(vlc_object_t *obj,
-                                         struct vlc_http_cookie_jar_t *jar,
-                                         bool h2c);
+                                         struct vlc_http_cookie_jar_t *jar);
 
 /**
  * Destroys an HTTP connection manager



More information about the vlc-commits mailing list