summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2021-08-15 12:26:38 +0300
committerSebastian Dröge <sebastian@centricular.com>2021-08-15 12:29:06 +0300
commit04963cac86dec703838920b9be1961e83d537d54 (patch)
tree569a71403350964fc9cee9038c4abf9dba8ba278 /ext
parentcfd4a9a6d9a677ac07b5a4dc1678ab250d705a68 (diff)
downloadgstreamer-plugins-good-04963cac86dec703838920b9be1961e83d537d54.tar.gz
souphttpsrc: Always use the content decoder but set `Accept-Encoding: identity` if no compression should be used
Some servers respond with gzip-encoded responses regardless of whether the request allowed it to be used in the response. By always having the content decoder enabled, these invalid responses can be decoded correctly while for well-behaving servers the `compress` property selects between allowing compressed responses or not. Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/833 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1053>
Diffstat (limited to 'ext')
-rw-r--r--ext/soup/gstsouphttpsrc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/soup/gstsouphttpsrc.c b/ext/soup/gstsouphttpsrc.c
index e1f2f6d0e..aba69bec1 100644
--- a/ext/soup/gstsouphttpsrc.c
+++ b/ext/soup/gstsouphttpsrc.c
@@ -1512,8 +1512,10 @@ gst_soup_http_src_build_message (GstSoupHTTPSrc * src, const gchar * method)
soup_message_disable_feature (src->msg, SOUP_TYPE_COOKIE_JAR);
}
- if (!src->compress)
- soup_message_disable_feature (src->msg, SOUP_TYPE_CONTENT_DECODER);
+ if (!src->compress) {
+ soup_message_headers_append (src->msg->request_headers, "Accept-Encoding",
+ "identity");
+ }
soup_message_set_flags (src->msg, SOUP_MESSAGE_OVERWRITE_CHUNKS |
(src->automatic_redirect ? 0 : SOUP_MESSAGE_NO_REDIRECT));