Bug 45857

Summary: xdg-open fails to open web browser for file:/// urls with a query string
Product: Portland Reporter: Sam Tobin-Hochstadt [:samth] <samth>
Component: xdg-utilsAssignee: Portland Bugs <portland-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: freedesktop, zanchey
Version: unspecified   
Hardware: Other   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: fix for anchors and variables in urls (i.e. # and ? after file names)

Description Sam Tobin-Hochstadt [:samth] 2012-02-09 13:25:37 UTC
If foo.html exists, then:

$ xdg-open foo.html

opens a web browser, but

$ xdg-open foo.html?a=b

gvfs-open: file:///home/samth/tmp/time/racket-full-5.2.1.5/collects/typed-racket/foo.html%3Fa=b: error opening location: Error stating file '/home/samth/tmp/time/racket-full-5.2.1.5/collects/typed-racket/foo.html?a=b': No such file or directory

Note that:

$ firefox foo.html?a=b

works correctly
Comment 1 dragomang87 2014-04-26 21:43:23 UTC
Created attachment 98059 [details] [review]
fix for anchors and variables in urls (i.e. # and ? after file names)

The interesting lines are 649, 650.
The additional changes are just modified variable names, since using "command" as a variable name breaks vim syntax highlighting
Comment 2 dragomang87 2014-04-26 21:49:43 UTC
Comment on attachment 98059 [details] [review]
fix for anchors and variables in urls (i.e. # and ? after file names)

based on arch package version: 1.1.0.git20140207-1
Comment 3 Rex Dieter 2014-04-26 22:06:10 UTC
I'd prefer not conflating the fix for this bug and renaming variables.

Is the core fix mostly in the final hunk of the proposed patch?
Comment 5 Rex Dieter 2014-04-26 22:22:12 UTC
*** Bug 50715 has been marked as a duplicate of this bug. ***

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.