GNOME Bugzilla – Bug 322985
Double slashes in http URL's are eroneously collapsed
Last modified: 2010-12-13 04:15:55 UTC
Enter a url in the location bar with a path that contains double slashes. E.g.: http://some.domain/blah//foo The request-uri actually being used will be '/blah/foo' instead of '/blah//foo' . However, those two are distinct paths. Probably the easiest way to simulate this on Apache is with a rewrite rule: RewriteEngine On RewriteRule ^/blah//(.*) /bar/$1
Also consider this case: >>> gnomevfs.make_uri_canonical ("http://www.example.net/redirect.php?http://www.somewhere.example.org/") 'http://www.example.net/redirect.php?http:/www.somewhere.example.org/'
*** Bug 342248 has been marked as a duplicate of this bug. ***
Created attachment 67311 [details] [review] Removes the slash consilidation So far this seems to be doing ok on my machine. It also fixes this bug for me: http://bugzilla.gnome.org/show_bug.cgi?id=342248 I really think it was a mistake to colapse slashes.
Any word on this from the vfs maintainer? I have been shipping a patched gnome-vfs with dropline gnome for over a month and haven't had/heard of any issues. I think it would be nice to fix this for everyone else as well. (for example it affects podcasts in rhythmbox http://bugzilla.gnome.org/show_bug.cgi?id=342248)
I think this was introduced because it doesn't matter for unix paths. Maybe the slash consolidation could be avoided for no unixy urls ? Anyway, I hope the patch will be applied since it reduces gnome's cool effect when apps like rhythmbox fails because of a bug in the vfs.
After a debugging session I stumbled upon this issue in gnome-vfs in relation to podcast downloads failing as noted before. The issue here seem to actually be two bugs: 1) Regular URI Path being changed/transformed 2) URL Parameters being malformed As there seems to be a requirement for 1) somewhere (Windows URIs?) as the slash collapsing is implemented, I can at least think for a definite solution for case 2) and avoiding total removal of this. In 2), libgnomevfs/gnome-vfs-uri.c:set_uri_element(), is the point where the URI gets malformed. Anything after "?" in a http request URI should not be modified. There is a "FIXME" at that place aswell. The correct solution might be to split the passed URI at "?" on the "http" method(s) and only apply _gnome_vfs_canonicalize_pathname() on the first token as this would preserve regular path's still being "corrected". Another test URI where gnomevfs-info fails (but should not): http://feeds.feedburner.com/~r/ChineseLearnOnline/~5/84356008/redirect.mp3
*** Bug 416352 has been marked as a duplicate of this bug. ***
I can confirm "slashes getting wrong if set as url parameter" is fixed when using gvfs. Bug could be closed?
closing...