From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 67548 invoked by alias); 25 Feb 2020 22:25:24 -0000 Mailing-List: contact elfutils-devel-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: elfutils-devel-owner@sourceware.org Received: (qmail 66755 invoked by uid 48); 25 Feb 2020 22:25:17 -0000 From: "fche at redhat dot com" To: elfutils-devel@sourceware.org Subject: [Bug debuginfod/25600] New: debuginfo-client should handle file:// URLs Date: Tue, 25 Feb 2020 22:25:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: elfutils X-Bugzilla-Component: debuginfod X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: fche at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2020-q1/txt/msg00145.txt https://sourceware.org/bugzilla/show_bug.cgi?id=3D25600 Bug ID: 25600 Summary: debuginfo-client should handle file:// URLs Product: elfutils Version: unspecified Status: NEW Severity: normal Priority: P2 Component: debuginfod Assignee: unassigned at sourceware dot org Reporter: fche at redhat dot com CC: elfutils-devel at sourceware dot org Target Milestone: --- While this may be useful only for local testing, it's still good to have. It's being blocked by error handling logic in -client.c line 728ish, as identified by kkleine, because the 200 response code is only valid for http. file:// scheme returns 0 for success here. So this code would need to do some scheme-sensitive logic, such as curl's own src/tool_operate.c: if(CURLE_OK =3D=3D result) { char *effective_url =3D NULL; curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &effective_ur= l); if(effective_url && curl_strnequal(effective_url, "http", 4)) { /* This was HTTP(S) */ curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response); if(response !=3D 200 && response !=3D 206) { i.e., if result was CURLE_OK, assume success, unless http and we have a bad response code. --=20 You are receiving this mail because: You are on the CC list for the bug.