Re: url-encoding for http addresses



Danny Milosavljevic <danny milo gmx net> wrote:
> Hi,
> 
> Am Dienstag, den 07.12.2004, 22:48 -0500 schrieb Walter Landry: 
> > Peter Harvey <pah06 uow edu au> wrote:
> > > Hate to jump in here, but where are you getting unescaped http uris from
> > > in the first place?
> > 
> > 1) From the user.
> 
> I'd like to hear where he got that invalid http uri from. Its not like
> it would have worked anywhere.

It works fine in Mozilla.  I would expect it to work on any browser.

> And even if you want the user to be able to enter unescaped stuff
> [normal stuff from the user's point of view], then escape it before
> storing it in program memory, and store the result into a separate
> variable to be able to show the user the original string without having
> to unescape it again all the time. 
> 
> Although uris are an implementation detail, the user got used to them.

This is definitely false.  Before this thread, if you put a gun to my
head, I still couldn't have told you that a space is %20.

> I know that that is annoying. Uris are by design annoying. 
> But I guess they are supposed to be faster than just passing a struct
> around with all the parts unescaped and in utf-8 as struct members, with
> the uri method as a globally registered number. 
> 
> And one can use a simple "Entry" instead of a complex list editor stuff
> with uris in the UI.
> 
> Guess its the same for normal filesystem paths, they could be passed as
> a normal array of filenames instead of mashed together in one string
> too, but nobody does it since it's slower and since C sucks in passing
> arrays around (by value, with copy-on-write, that is, copy-on-change). 
> 
> > 
> > 2) I have a certain structure in the filesystem, and that structure is
> >    the same whether it is local or remote.  So for local stuff I
> >    prepend file://(path to stuff) and for remote stuff I prepend
> >    http://www.example.org/(path to stuff).
> 
> Yeah. And that works only if 'path to stuff' has already been escaped.

Actually, it works either way for local file systems.  For http uri's
it only works if it is unescaped.

In any case, I don't really care how you do it, as long as you are
consistent.  I prefer giving unescaped sequences to gnome-vfs, but if
you decide to require escaped sequences, please make sure that you
really require them ;)

Cheers,
Walter Landry
wlandry ucsd edu



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]