From 2ffb52499f66f9fde2e33317aa46e34cc1c3ac45 Mon Sep 17 00:00:00 2001 From: Jake Barnes Date: Wed, 19 Feb 2020 15:59:19 +1100 Subject: [PATCH] souphttpsrc: Fix cookies property Disable session sharing and cookie jar when cookies property is set. The cookie jar actually replaces or removes any existing Cookie header set on the message, so the cookies property was effectively being ignored. There doesn't appear to be a way to inject the cookies into the jar without having to specify matching domains etc., so it's not possible to simulate the old behaviour of unconditionally sending the cookies with all messages, besides simply disabling the cookie jar. --- ext/soup/gstsouphttpsrc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ext/soup/gstsouphttpsrc.c b/ext/soup/gstsouphttpsrc.c index 2d4c712784..e8c63de246 100644 --- a/ext/soup/gstsouphttpsrc.c +++ b/ext/soup/gstsouphttpsrc.c @@ -919,6 +919,7 @@ gst_soup_http_src_session_open (GstSoupHTTPSrc * src) if (!src->session) { GstQuery *query; gboolean can_share = (src->timeout == DEFAULT_TIMEOUT) + && (src->cookies == NULL) && (src->ssl_strict == DEFAULT_SSL_STRICT) && (src->tls_interaction == NULL) && (src->proxy == NULL) && (src->tls_database == DEFAULT_TLS_DATABASE) @@ -1502,6 +1503,8 @@ gst_soup_http_src_build_message (GstSoupHTTPSrc * src, const gchar * method) soup_message_headers_append (src->msg->request_headers, "Cookie", *cookie); } + + soup_message_disable_feature (src->msg, SOUP_TYPE_COOKIE_JAR); } if (!src->compress)