Bug 25797

Summary: DEBUGINFOD_URLS should accept scheme-free urls
Product: elfutils Reporter: Frank Ch. Eigler <fche>
Component: debuginfodAssignee: Alice Zhang <alizhang>
Status: RESOLVED FIXED    
Severity: normal CC: alizhang, elfutils-devel, mark
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:

Description Frank Ch. Eigler 2020-04-07 12:01:09 UTC
With commit 4c1de9608b, the client code requires a DEBUGINFOD_URL to be started with "http:" or "https:" or "file:", in order to give a successful result code.  But libcurl also accepts "hostname:PORT" or "/path/to/something"  as URLs, as do web browsers.  Using these scheme-free heuristic URLs results in an -ENOENT error, even though the download succeeds.

We should review the file: / http: heuristic processing to be similar or the same as libcurl, and let people abbreviate URLs a little more.
Comment 1 Mark Wielaard 2020-07-05 15:19:49 UTC
commit 8de6f9af46f12fe3b2a0871523f6df13c4b39e34 (HEAD -> master, origin/master, origin/HEAD)
Author: Alice Zhang <alizhang@redhat.com>
Date:   Fri Jul 3 13:37:34 2020 -0400

    debuginfod: DEBUGINFOD_URLS should accept scheme-free urls
    
    Check scheme instead of effective url so that user may abbreviate
    DEBUGINFOD_URL. Add one test for scheme free http url.
    
    Notice that libcurl does not provide an almighty scheme free url
    support, /path/to/something without FILE:// can not be recognized
    in most circumstances, therefore for the neatness of our code
    structure, DEBUGINFOD_ URL of scheme "FILE" must be input as URI.
    
    Signed-off-by: Alice Zhang <alizhang@redhat.com>