Bug 25797 - DEBUGINFOD_URLS should accept scheme-free urls
Summary: DEBUGINFOD_URLS should accept scheme-free urls
Status: RESOLVED FIXED
Alias: None
Product: elfutils
Classification: Unclassified
Component: debuginfod (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Alice Zhang
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-07 12:01 UTC by Frank Ch. Eigler
Modified: 2020-07-05 15:19 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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>