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.

Reply via email to