curlhttpsrc: Add curl anyauth option
authorRobert Rosengren <robertr@axis.com>
Fri, 27 Jan 2023 11:45:10 +0000 (12:45 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 25 Feb 2023 10:03:22 +0000 (10:03 +0000)
Add curl anyauth option to support http request to endpoints not using
only basic authentication (as default in curl). Also aligning with
curlhttpsink that already uses this option.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4065>

subprojects/gst-plugins-bad/ext/curl/gstcurlhttpsrc.c

index 781a67f..00ab5de 100644 (file)
@@ -1116,6 +1116,7 @@ gst_curl_http_src_create_easy_handle (GstCurlHttpSrc * s)
   gst_curl_setopt_str (s, handle, CURLOPT_NOPROXY, s->no_proxy_list);
   gst_curl_setopt_str (s, handle, CURLOPT_PROXYUSERNAME, s->proxy_user);
   gst_curl_setopt_str (s, handle, CURLOPT_PROXYPASSWORD, s->proxy_pass);
+  gst_curl_setopt_generic (s, handle, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
 
   for (i = 0; i < s->number_cookies; i++) {
     gst_curl_setopt_str (s, handle, CURLOPT_COOKIELIST, s->cookies[i]);