mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
curlhttpsink: Don't set Content-Length to 0 for proxy
The Content-Length header would unconditionally be included when the proxy property was set. This would result in requests with both Content-Length and Transfer-Encoding header. Now we rely on the use-content-length property in the proxy case aswell. This also makes sure that Content-Type is set correctly, since before that would be skipped if proxy was used. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7935>
This commit is contained in:
parent
89c23137d3
commit
e9d32abf98
2 changed files with 0 additions and 15 deletions
|
@ -188,9 +188,7 @@ gst_curl_http_sink_init (GstCurlHttpSink * sink)
|
|||
sink->discovered_content_type = NULL;
|
||||
|
||||
sink->proxy_port = DEFAULT_PROXY_PORT;
|
||||
sink->proxy_headers_set = FALSE;
|
||||
sink->proxy_auth = FALSE;
|
||||
sink->use_proxy = FALSE;
|
||||
sink->proxy_conn_established = FALSE;
|
||||
sink->proxy_resp = -1;
|
||||
}
|
||||
|
@ -334,13 +332,6 @@ gst_curl_http_sink_set_header_unlocked (GstCurlBaseSink * bcsink)
|
|||
sink->header_list = NULL;
|
||||
}
|
||||
|
||||
if (!sink->proxy_headers_set && sink->use_proxy) {
|
||||
sink->header_list = curl_slist_append (sink->header_list,
|
||||
"Content-Length: 0");
|
||||
sink->proxy_headers_set = TRUE;
|
||||
goto set_headers;
|
||||
}
|
||||
|
||||
if (sink->use_content_length) {
|
||||
/* if content length is used we assume that every buffer is one
|
||||
* entire file, which is the case when uploading several jpegs */
|
||||
|
@ -375,8 +366,6 @@ gst_curl_http_sink_set_header_unlocked (GstCurlBaseSink * bcsink)
|
|||
}
|
||||
|
||||
|
||||
set_headers:
|
||||
|
||||
if (bcsink->file_name) {
|
||||
tmp = g_strdup_printf ("Content-Disposition: attachment; filename="
|
||||
"\"%s\"", bcsink->file_name);
|
||||
|
@ -579,7 +568,5 @@ proxy_setup (GstCurlBaseSink * bcsink)
|
|||
}
|
||||
}
|
||||
|
||||
sink->use_proxy = TRUE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -52,8 +52,6 @@ struct _GstCurlHttpSink
|
|||
gboolean use_content_length;
|
||||
gchar *content_type;
|
||||
gchar *discovered_content_type;
|
||||
gboolean use_proxy;
|
||||
gboolean proxy_headers_set;
|
||||
gboolean proxy_auth;
|
||||
gboolean proxy_conn_established;
|
||||
glong proxy_resp;
|
||||
|
|
Loading…
Reference in a new issue