How can one use '#' in a URL?

Peter Lister, Cranfield Computer Centre ([email protected])
Fri, 18 Jun 93 15:06:33 BST


I've thought for some time that a nice feature in WWW servers would be
the ability to look inside a remote tar (or tar.Z) file (or an ar
library or whatever), i.e. remotely list the contents or just extract
one file. I've been thinking how I could build this into a server like plexus.

So that a normal URL which names a tar file will simply retrieve the
file (as most users want, I assume) there needs to be some way of
referring to the subunit of the file. The obvious way is to use #, e.g.

http://www/foo/bar.tar.Z#blech.c

- this would indicate to the server that it is to unpack blech.c from
/foo/bar.tar.Z and send it back as a normal file. However, I have only
seen the # documented as something which browsers can use for internal
hyperlinks, not as part of the a URL that can be sent to a http server.
Is this a problem?

The question mark would seem better suited to search the list of contents, e.g.

http://www/foo/bar.tar.Z?*.c

would return

blech.c erk.c glug.c

A related question is whether I can have slashes in the test following
the # or ?. e.g. for a tar file with relative filenames

http://www/foo/bar.tar.Z#./blech.c

would be common. Since slashes are meaningful to an http: URL, and the
browser can interpret them, would this cause confusion?

Peter Lister [email protected]
Computer Centre,
Cranfield Institute of Technology, Voice: +44 234 754200 ext 2828
Cranfield, Bedfordshire MK43 0AL England Fax: +44 234 750875