Re: url-encoding for http addresses
- From: Alexander Larsson <alexl redhat com>
- To: Walter Landry <wlandry ucsd edu>
- Cc: gnome-vfs-list gnome org
- Subject: Re: url-encoding for http addresses
- Date: Wed, 08 Dec 2004 15:14:38 +0100
On Tue, 2004-12-07 at 22:48 -0500, Walter Landry wrote:
> Peter Harvey <pah06 uow edu au> wrote:
> > On Tue, 2004-12-07 at 21:47 -0500, Walter Landry wrote:
> > > But then you have to have special code in your application to escape
> > > only http uri's. You might as well let gnome-vfs do it for itself.
> >
> > Hate to jump in here, but where are you getting unescaped http uris from
> > in the first place?
>
> 1) From the user.
If its not escaped, its not a uri, and gnome-vfs works on uris. Its as
simple as that.
Now, we *do* have functions like gnome_vfs_make_uri_from_input that lets
you create uris from user input. However, what the user inputed is *not*
a uri.
> 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).
That is not at all right for uris. uris are not pathnames.
Why are you not using gnome_vfs_uri_append_path or
gnome_vfs_uri_append_file_name for this? Thats the way its supposed to
be done. Spaces are invalid even in file: uris, so your method is wrong
for that too. You have to use gnome_vfs_get_uri_from_local_path().
> Not having to give much thought to whether a file is local or remote
> is one of the great advantages of something like gnome-vfs.
Yes. This is what gnome-vfs solves. To do this it treats all file
references as uris.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]