[vlc-commits] http: remove secure flag for setting cookies (refs #16174)

Rémi Denis-Courmont git at videolan.org
Thu Sep 8 18:39:52 CEST 2016


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Sep  8 19:37:08 2016 +0300| [662f12f4432de43ae796bce8a4fcd3f62286dc6d] | committer: Rémi Denis-Courmont

http: remove secure flag for setting cookies (refs #16174)

This is only necessary for getting cookies as per the specification.

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

 include/vlc_http.h             | 2 +-
 modules/access/http/message.c  | 4 ++--
 modules/access/http/message.h  | 2 +-
 modules/access/http/resource.c | 2 +-
 src/misc/httpcookies.c         | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/vlc_http.h b/include/vlc_http.h
index 335e0f3..ed7e161 100644
--- a/include/vlc_http.h
+++ b/include/vlc_http.h
@@ -82,7 +82,7 @@ VLC_API void vlc_http_cookies_destroy( vlc_http_cookie_jar_t * p_jar );
  * @return true, if the cookie was added, false otherwise
  */
 VLC_API bool vlc_http_cookies_store( vlc_http_cookie_jar_t *jar,
-    const char *cookie, bool secure, const char *host, const char *path );
+    const char *cookie, const char *host, const char *path );
 
 /**
  * Returns a cookie value that match the given URL.
diff --git a/modules/access/http/message.c b/modules/access/http/message.c
index b9a41d0..279ac5f 100644
--- a/modules/access/http/message.c
+++ b/modules/access/http/message.c
@@ -902,7 +902,7 @@ uintmax_t vlc_http_msg_get_size(const struct vlc_http_msg *m)
 }
 
 void vlc_http_msg_get_cookies(const struct vlc_http_msg *m,
-                              vlc_http_cookie_jar_t *jar, bool secure,
+                              vlc_http_cookie_jar_t *jar,
                               const char *host, const char *path)
 {
     if (jar == NULL)
@@ -910,7 +910,7 @@ void vlc_http_msg_get_cookies(const struct vlc_http_msg *m,
 
     for (unsigned i = 0; i < m->count; i++)
         if (!strcasecmp(m->headers[i][0], "Set-Cookie"))
-            vlc_http_cookies_store(jar, m->headers[i][1], secure, host, path);
+            vlc_http_cookies_store(jar, m->headers[i][1], host, path);
 }
 
 int vlc_http_msg_add_cookies(struct vlc_http_msg *m,
diff --git a/modules/access/http/message.h b/modules/access/http/message.h
index 9693496..83835f2 100644
--- a/modules/access/http/message.h
+++ b/modules/access/http/message.h
@@ -143,7 +143,7 @@ time_t vlc_http_msg_get_mtime(const struct vlc_http_msg *);
 unsigned vlc_http_msg_get_retry_after(const struct vlc_http_msg *);
 
 void vlc_http_msg_get_cookies(const struct vlc_http_msg *,
-                              struct vlc_http_cookie_jar_t *, bool secure,
+                              struct vlc_http_cookie_jar_t *,
                               const char *host, const char *path);
 int vlc_http_msg_add_cookies(struct vlc_http_msg *,
                              struct vlc_http_cookie_jar_t *);
diff --git a/modules/access/http/resource.c b/modules/access/http/resource.c
index 5863314..5b7a95c 100644
--- a/modules/access/http/resource.c
+++ b/modules/access/http/resource.c
@@ -99,7 +99,7 @@ retry:
         return NULL;
 
     vlc_http_msg_get_cookies(resp, vlc_http_mgr_get_jar(res->manager),
-                             res->secure, res->host, res->path);
+                             res->host, res->path);
 
     int status = vlc_http_msg_get_status(resp);
     if (status < 200 || status >= 599)
diff --git a/src/misc/httpcookies.c b/src/misc/httpcookies.c
index 4eb39ad..5eb4d74 100644
--- a/src/misc/httpcookies.c
+++ b/src/misc/httpcookies.c
@@ -294,7 +294,7 @@ void vlc_http_cookies_destroy( vlc_http_cookie_jar_t * p_jar )
 }
 
 bool vlc_http_cookies_store(vlc_http_cookie_jar_t *p_jar, const char *cookies,
-                            bool secure, const char *host, const char *path)
+                            const char *host, const char *path)
 {
     assert(host != NULL);
     assert(path != NULL);



More information about the vlc-commits mailing list