summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--src/input/plugins/CurlInputPlugin.cxx4
-rw-r--r--src/storage/plugins/CurlStorage.cxx4
3 files changed, 10 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 74e975f31..b0f393f57 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,8 @@
ver 0.22.7 (not yet released)
* protocol
- don't use glibc extension to parse time stamps
+* input
+ - curl: send user/password in the first request, save one roundtrip
* decoder
- ffmpeg: fix build problem with FFmpeg 3.4
- gme: support RSN files
diff --git a/src/input/plugins/CurlInputPlugin.cxx b/src/input/plugins/CurlInputPlugin.cxx
index 86647f550..b3b6a9652 100644
--- a/src/input/plugins/CurlInputPlugin.cxx
+++ b/src/input/plugins/CurlInputPlugin.cxx
@@ -421,6 +421,10 @@ CurlInputStream::InitEasy()
request->SetOption(CURLOPT_MAXREDIRS, 5L);
request->SetOption(CURLOPT_FAILONERROR, 1L);
+ /* this option eliminates the probe request when
+ username/password are specified */
+ request->SetOption(CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
+
if (proxy != nullptr)
request->SetOption(CURLOPT_PROXY, proxy);
diff --git a/src/storage/plugins/CurlStorage.cxx b/src/storage/plugins/CurlStorage.cxx
index 731f7e7b9..80c4dcdf3 100644
--- a/src/storage/plugins/CurlStorage.cxx
+++ b/src/storage/plugins/CurlStorage.cxx
@@ -262,6 +262,10 @@ public:
request.SetOption(CURLOPT_FOLLOWLOCATION, 1L);
request.SetOption(CURLOPT_MAXREDIRS, 1L);
+ /* this option eliminates the probe request when
+ username/password are specified */
+ request.SetOption(CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
+
request_headers.Append(StringFormat<40>("depth: %u", depth));
request_headers.Append("content-type: text/xml");