After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 555536 - gvfs munges parameters for relative http URIs
gvfs munges parameters for relative http URIs
Status: RESOLVED NOTABUG
Product: gvfs
Classification: Core
Component: client module
unspecified
Other All
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks: 555417
 
 
Reported: 2008-10-08 12:17 UTC by Bastien Nocera
Modified: 2008-10-08 15:30 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24



Description Bastien Nocera 2008-10-08 12:17:32 UTC
+++ This bug was initially created as a clone of Bug #555417 +++

gvfs munges parameters for relative http URIs.

file = g_file_new_for_uri ("http://www.yle.fi/player/");
new_file = g_file_resolve_relative_path (file, "288629.asx?s=1000");

will get you a new file with URI:
http://www.yle.fi/player/288629.asx%3Fs=1000
instead of:
http://www.yle.fi/player/288629.asx?s=1000
Comment 1 Dan Winship 2008-10-08 15:30:40 UTC
<hadess> danw: do you have a sec to look at http://bugzilla.gnome.org/show_bug.cgi?id=555536 ? :)
<danw> hadess: that behavior is correct. if you tell it that "288629.asx?s=1000" is part of the *path*, then it needs to escape the "?" so that the "s=1000" isn't mistakenly interpreted as being part of the query (which is not part of the path)
<danw> hadess: so basically, you don't actually want to be using g_file_resolve_relative_path()
<hadess> danw: what would i want to be using then?
<mclasen> a http library ?
<hadess> danw: should i strip the query, and re-add it after getting the resolved path?
<danw> hadess: i don't know. it looks like the GFile API doesn't deal with URIs with queries or fragments
<hadess> danw: feel free to close the bug then, i'll work around it myself :)