summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoah Sanci <nsanci@redhat.com>2021-08-10 11:21:35 -0400
committerNoah Sanci <nsanci@redhat.com>2021-09-17 10:33:47 -0400
commit5861cfa6513711f5970ad901510c97defc86fb6a (patch)
tree3a28736e4c3c769de76c5634501cf4c518fda3a2
parentff5056c7d78b925fbd49997dc88183f6c859ac7f (diff)
downloadelfutils-nsanci/pr27277.tar.gz
debuginfod: PR27277 - Describe retrieved files when verbosensanci/pr27277
Allow users, with enough verbosity, to print the HTTP response headers upon retrieving a file. These files may include several custome http response headers such as X-DEBUGINFOD-FILE, X-DEBUGINFOD-SIZE, and X-DEBUGINFOD-ARCHIVE. These headers are added from the daemon, in debuginfod.cxx. E.g output: HTTP/1.1 200 OK Connection: Keep-Alive Content-Length: 4095072 Cache-Control: public Last-Modified: Thu, 09 Sep 2021 19:06:40 GMT X-FILE: debuginfod X-FILE-SIZE: 4095072 Content-Type: application/octet-stream Date: Fri, 10 Sep 2021 16:38:06 GMT https://sourceware.org/bugzilla/show_bug.cgi?id=27277 Signed-off-by: Noah Sanci <nsanci@redhat.com>
-rw-r--r--debuginfod/debuginfod-client.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c
index 4d5dbd95..234bc524 100644
--- a/debuginfod/debuginfod-client.c
+++ b/debuginfod/debuginfod-client.c
@@ -1046,6 +1046,7 @@ debuginfod_query_server (debuginfod_client *c,
}
/* Wait 1 second, the minimum DEBUGINFOD_TIMEOUT. */
curl_multi_wait(curlm, NULL, 0, 1000, NULL);
+ CURLMcode curlm_res = curl_multi_perform(curlm, &still_running);
/* If the target file has been found, abort the other queries. */
if (target_handle != NULL)
@@ -1077,7 +1078,7 @@ debuginfod_query_server (debuginfod_client *c,
verbose_reported = true;
}
- CURLMcode curlm_res = curl_multi_perform(curlm, &still_running);
+
if (curlm_res != CURLM_OK)
{
switch (curlm_res)