GNOME Bugzilla – Bug 44019
NautilusFile unescapes/rescapes file name part of URLs
Last modified: 2004-12-22 21:47:04 UTC
URL's like: http://services.eazel.com:8888/catalog/section?id=1&name=Communications&distro=RedHat62 Get improperly escaped and are sent to the server as: http://services.eazel.com:8888/catalog/section?catalog/section%3Fid%3D1%26name%3DCommunications%26distro%3DRedHat62 This breaks SoftCat. I'm moving this to PR2 myself ------- Additional Comments From mikef@praxis.etla.net 2000-10-24 19:54:46 ---- Pavel, Ramiro, and I have had a few pow-wow's about this. The basics: o You can never re-escape an HTTP URI once it's been un-escaped, because you don't know whether "?"'s and "&"'s should be escaped or not o Nautilus must store only escaped URI's internally, unescaping only for display (although it should not unescape an http URI in the location bar) o nautilus-file currently stores filenames as *unescaped*. A first-pass at changing this breaks many things. ------- Additional Comments From mikef@praxis.etla.net 2000-10-24 20:00:05 ---- I'm sorry. The example should be URL's like: http://services.eazel.com:8888/catalog/section?id=1&name=Communications&distro=RedHat62 Are sent to the server as: http://services.eazel.com:8888/catalog/section%3Fid%3D1%26name%3DCommunications%26distro%3DRedHat62 ------- Additional Comments From darin@bentspoon.com 2000-10-25 09:29:58 ---- I guess the key here is that there is no "file name" really for a web page URL. The URL just has to be used as-is. I think I can make the change to have NautilusFile keep names this way internally, but it's definitely difficult, and I'm not surprised Mike had trouble doing it. The gnome-vfs interface gives you file names for things inside a directory when you do "load_directory", not URL pieces, so there's lots of code that will still need to deal with file names. While I'm sure this needs to be done for PR2, Bud needs to see this, so I'm setting back to undecided. ------- Additional Comments From darin@bentspoon.com 2000-10-25 09:30:32 ---- My first step at fixing this will be to make a Nautilus self-test that fails if this problem is not addressed. ------- Additional Comments From darin@bentspoon.com 2000-10-25 09:49:11 ---- I have some further thoughts on this. Imagine for a moment that we store the full URL with each NautilusFile. This is probably the right direction to fix the problem. The new problem that arises is that in wanting to preserve the unique quoting for each URL, we lose the old ability to notice that two URLs are alternate forms of the same file name. So we'll think that http://services.eazel.com:8888/vault/darin=adler (typed by the user) and http://services:8888/vault/darin%3Dadler (double-clicking on a file) are two different items. I'm not sure what to do about this problem. I'd also like to note that it's easy to hack a solution to this problem. If we simply use a less-zealous escaping algorithm that doesn't touch ?, =, or &, we are probably good enough for PR2 without tackling the underlying design problem. (I'm not 100% sure of this.) ------- Additional Comments From mikef@praxis.etla.net 2000-10-25 10:33:49 ---- *** Bug 43954 has been marked as a duplicate of this bug. *** ------- Additional Comments From darin@bentspoon.com 2000-10-25 12:53:17 ---- The good news is that I fixed the change that caused the Software Catalog from working. So the PR2 crisis for this bug is over. The bad news is that the underlying problem in NautilusFile still exists. So these munged URLs will be used to do various bits of I/O. But a fix to this is not something we need for PR2. ------- Additional Comments From mikef@praxis.etla.net 2000-10-25 16:49:35 ---- *** Bug 44013 has been marked as a duplicate of this bug. *** ------- Additional Comments From ramiro@fateware.com 2000-10-25 22:43:55 ---- *** Bug 43985 has been marked as a duplicate of this bug. *** ------- Additional Comments From tim@eazel.com 2001-02-13 23:53:31 ---- Can't verify this bug, depends on 6390. ------- Bug moved to this database by unknown@bugzilla.gnome.org 2001-09-09 20:44 ------- Bug depends on bug(s) 46390.