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

--- Comment #9 from Mark Wielaard <mark at klomp dot org> ---
(In reply to Frank Ch. Eigler from comment #8)
> I see that up at #c0, Mark did ask for this sort of thing.  It would allow
> debuginfod to serve its own substantial home page, not just redirect
> somewhere else.  If the idea is that the server be self-contained (not rely
> on an external file/http server) but still serve a configurable home page,
> under the proviso that it will be mime-type text/html and there's only one,
> and no http type optimizations are expected, then it could be okay.
> 
> In that case, maybe fork the command line option
> 
>    --home-redirect URL
>    --home-html FILE
> 
> where the latter case opens the FILE, sets content-type text/html in the
> Response header, and passes its fd to libmicrohttpd to send the contents.
> It would not need to get debuginfod to answer /local.html or whatever, it
> would just answer / with the contents of /local.html.

Yes, my original idea was that if you gave --homepage=file.html the specific
file would be served with something like MHD_create_response_from_buffer or
MHD_create_response_from_fd. If given --homepage=https://... or http://... it
would use something like MHD_add_response_header(r, "Location", "https://...";)
to redirect.

But maybe separate options instead of checking whether the argument starts with
http[s]:// is better/simpler.

I hadn't thought of a whole directory of files to serve, that might be cute
too. But I don't know if there is a simple MHD setup to arrange that.

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

Reply via email to