public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: "mark at klomp dot org" <sourceware-bugzilla@sourceware.org>
To: elfutils-devel@sourceware.org
Subject: [Bug debuginfod/29469] Add /buildid/BUILDID/header WEBAPI
Date: Thu, 11 Aug 2022 09:49:37 +0000	[thread overview]
Message-ID: <bug-29469-10460-wRml1mIKZF@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-29469-10460@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=29469

--- Comment #3 from Mark Wielaard <mark at klomp dot org> ---
(In reply to Martin Liska from comment #2)
> (In reply to Mark Wielaard from comment #1)
> > Do you mean support for an HTTP HEAD (instead of GET) request?
> 
> Yep, that's what I'm seeking for :)
> 
> > Or do you actually want/need a new URL ending in /header to get the
> > information?
> 
> $ wget --method=HEAD
> https://debuginfod.opensuse.org/buildid/
> 929d83693f513cefd1c38e5075f2b10b12a9f322/debuginfo
> Spider mode enabled. Check if remote file exists.
> --2022-08-11 11:16:46-- 
> https://debuginfod.opensuse.org/buildid/
> 929d83693f513cefd1c38e5075f2b10b12a9f322/debuginfo
> Resolving debuginfod.opensuse.org (debuginfod.opensuse.org)...
> 91.193.113.65, 2a07:de40:401::65
> Connecting to debuginfod.opensuse.org
> (debuginfod.opensuse.org)|91.193.113.65|:443... connected.
> HTTP request sent, awaiting response... 400 Bad Request
> Remote file does not exist -- broken link!!!

Right, that is this code:

      if (string(method) != "GET")
        throw reportable_exception(400, "we support GET only");

in debuginfod.cxx (handler_cb).

I think if you just change that to also allow "HEAD" it will just work. But it
does mean the debuginfod server might do more work than strictly necessary. But
libmicrohttpd should just send the headers and ignore the body content.

(Sorry, haven't actually tested any of this, I am currently on a desert island,
ehe mountain, with spotty interweb access and compute resources)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2022-08-11  9:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-11  8:27 [Bug debuginfod/29469] New: " mliska at suse dot cz
2022-08-11  9:13 ` [Bug debuginfod/29469] " mark at klomp dot org
2022-08-11  9:17 ` mliska at suse dot cz
2022-08-11  9:49 ` mark at klomp dot org [this message]
2022-08-11 12:50 ` fche at redhat dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-29469-10460-wRml1mIKZF@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=elfutils-devel@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).