Summary: | Print http response headers when in verbose mode. | ||
---|---|---|---|
Product: | elfutils | Reporter: | Frank Ch. Eigler <fche> |
Component: | debuginfod | Assignee: | Noah Sanci <nsanci> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | elfutils-devel, mark, mliska, nsanci, woodard |
Priority: | P2 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: |
Description
Frank Ch. Eigler
2021-01-29 16:31:27 UTC
I see the suggested functionality quite handy! Thanks. A related idea: extend the webapi so that returned content includes response headers that identify the archive & file name where the content was extracted from. For server privacy, maybe pass back just the basename. The client API would need to be extended to store those headers as extra strings a client could query. All this can be used by smarter clients to identify in user-friendly ways the origin of the buildid. For example: % debuginfod-find describe BUILDID [runs HEAD query, listens to extra Headers] length: 2879342938423 server: https://foo/bar x-archive: foo-bar-2.3.rpm x-file: bin/sudifusdf The initial #c0 impetus is now pretty moot with env DEBUGINFOD_MAXSIZE=0 support. The server should give us a 404 or a 406 depending on whether the file exists, but not download content. The #c2 "debuginfod-find describe ..." idea still may be interesting. 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 commit ff5056c7d78b925fbd49997dc88183f6c859ac7f Author: Noah Sanci <nsanci@redhat.com> Date: Tue Aug 10 11:21:35 2021 -0400 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 <nsanci@redhat.com> |