aboutsummaryrefslogtreecommitdiffstats
path: root/debuginfod
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@redhat.com>2020-03-26 11:12:49 -0400
committerFrank Ch. Eigler <fche@redhat.com>2020-03-26 11:12:49 -0400
commit610149d32081c44f13901cdd86ab951f5bfe7fe8 (patch)
tree921b28a88896081eb1005704b9712fa474a3a022 /debuginfod
parentd63a809da467e646480c273b8eb276401679d2bb (diff)
downloadplatform_external_elfutils-610149d32081c44f13901cdd86ab951f5bfe7fe8.tar.gz
platform_external_elfutils-610149d32081c44f13901cdd86ab951f5bfe7fe8.tar.bz2
platform_external_elfutils-610149d32081c44f13901cdd86ab951f5bfe7fe8.zip
PR25548: CURLOPT_PATH_AS_IS backward compatibility
libcurl < 7.42 lacks the CURLOPT_PATH_AS_IS flag, but extraneous client-side canonicalization is mostly harmless. Signed-off-by: Frank Ch. Eigler <fche@redhat.com> Reported-by: Mark Wielaard <mark@klomp.org>
Diffstat (limited to 'debuginfod')
-rw-r--r--debuginfod/ChangeLog5
-rw-r--r--debuginfod/debuginfod-client.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/debuginfod/ChangeLog b/debuginfod/ChangeLog
index 7518e886..60d912a3 100644
--- a/debuginfod/ChangeLog
+++ b/debuginfod/ChangeLog
@@ -1,3 +1,8 @@
+2020-03-26 Frank Ch. Eigler <fche@redhat.com>
+
+ * debuginfod-client.c (debuginfod_query_server): Don't
+ set CURLOPT_PATH_AS_IS on old curl. Mostly harmless.
+
2020-03-24 Frank Ch. Eigler <fche@redhat.com>
* debuginfod-client.c (debuginfod_query_server): Set
diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c
index 251047ca..f1b63160 100644
--- a/debuginfod/debuginfod-client.c
+++ b/debuginfod/debuginfod-client.c
@@ -716,7 +716,12 @@ debuginfod_query_server (debuginfod_client *c,
curl_easy_setopt(data[i].handle, CURLOPT_FOLLOWLOCATION, (long) 1);
curl_easy_setopt(data[i].handle, CURLOPT_FAILONERROR, (long) 1);
curl_easy_setopt(data[i].handle, CURLOPT_NOSIGNAL, (long) 1);
+#if CURL_AT_LEAST_VERSION(7,42,0)
curl_easy_setopt(data[i].handle, CURLOPT_PATH_AS_IS, (long) 1);
+#else
+ /* On old curl; no big deal, canonicalization here is almost the
+ same, except perhaps for ? # type decorations at the tail. */
+#endif
curl_easy_setopt(data[i].handle, CURLOPT_AUTOREFERER, (long) 1);
curl_easy_setopt(data[i].handle, CURLOPT_ACCEPT_ENCODING, "");
add_extra_headers(data[i].handle);