From ff5056c7d78b925fbd49997dc88183f6c859ac7f Mon Sep 17 00:00:00 2001 From: Noah Sanci Date: Tue, 10 Aug 2021 11:21:35 -0400 Subject: debuginfod: PR27277 - Describe retrieved files when verbose 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 --- doc/debuginfod.8 | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc/debuginfod.8') diff --git a/doc/debuginfod.8 b/doc/debuginfod.8 index f9a418d1..fde06bb8 100644 --- a/doc/debuginfod.8 +++ b/doc/debuginfod.8 @@ -258,6 +258,15 @@ Unknown buildid / request combinations result in HTTP error codes. This file service resemblance is intentional, so that an installation can take advantage of standard HTTP management infrastructure. +Upon finding a file in an archive or simply in the database, some +custom http headers are added to the response. For files in the +database X-DEBUGINFOD-FILE and X-DEBUGINFOD-SIZE are added. +X-DEBUGINFOD-FILE is simply the unescaped filename and +X-DEBUGINFOD-SIZE is the size of the file. For files found in archives, +in addition to X-DEBUGINFOD-FILE and X-DEBUGINFOD-SIZE, +X-DEBUGINFOD-ARCHIVE is added. X-DEBUGINFOD-ARCHIVE is the name of the +archive the file was found in. + There are three requests. In each case, the buildid is encoded as a lowercase hexadecimal string. For example, for a program \fI/bin/ls\fP, look at the ELF note GNU_BUILD_ID: -- cgit v1.2.1