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

[gopher] Re: Getting file info from an URI??

> > Well, this isn't *really* true. The first character is always the item type.
> Well, that may be common current practice, but that's not quite required
> behaviour from either the Gopher or the Gopher+-standards, is it?
> If so, determining the file type by looking at the first character may
> now work in 99% of the cases, until someone develops a "new, improved"
> Gopher server which uses different selectors that gets popular, after
> which maybe only in 70% of the cases this will work.

>From the browser's point of view, it is. That very first character is
never sent to the server, but is intercepted by the web browser to tell it
how to handle the data. For example, a URL like


tells the browser this is item type 1, a gopher menu, and it sends /v2/ to
the server. Some servers like getting a second copy of the item type, so
they'll have


but the browser will still take that first '1' off and send 1/v2/ to the
server, so you can still count on getting that item type.

> > True; a Mac HFS gopher server, of which there are some, uses ":".
> Makes me wonder: how do webbrowsers translate these server's selector to
> an URI? Does it leave in the ":" or replace it with a "/"? Just curious.

They leave it in (at least Netscape seems to). Remember that everything in
a gopher menu is a fully-qualified "path" so the browser doesn't have to
worry about what a path delimiter is and isn't -- it just passes the entire
selector along and lets the server deal with it.

----------------------------- personal page: http://www.armory.com/~spectre/ --
 Cameron Kaiser, Point Loma Nazarene University * ckaiser@stockholm.ptloma.edu
-- The first duty of a revolutionary is to get away with it. -- Abbie Hoffman -

Reply to: