[gopher] Gophernicus Server 0.5 released

Matjaž Mešnjak matjaz85 at gmail.com
Mon Apr 5 20:05:08 UTC 2010


Dne 05.04.2010 (pon) ob 19:46 +0300 je Kim Holviala zapisal(a):
> Just released Gophernicus Server version 0.5.
> 
> gopher://gophernicus.org/1/software/gophernicus/server/
> 
> New features:
> * gopher++ request header support
> * gopher++ TITLE resource support
> * charset conversions between US-ASCII, ISO-8859-1 and UTF-8
> 
> I think the biggest feature here is the full support for charset 
> conversions. By default gopher0 clients get everything in look-alike 
> US-ASCII (ä -> a etc), but gopher++ clients can ask for ISO-8859-1 or 
> UTF-8 instead. Source material can be in any of the three supported 
> charsets, and best of all the conversion routine is input 
> autoconfiguring. Which means that you can have all three charsets even 
> inside one file and it STILL does the right thing...
> 
> Currently there's just one client that works with the gopher++ support, 
> Cameron's Mosaic with my patches on top... Once I get the server 
> finished I'll start working on clients.

These are interesting features. But how do I (a client) know I am
talking to a gopher++ server? 

Another thing .. About virtual hosts support. Now that is even more
interesting. Currently you implement it like this:

1Display string<tab>selector string;virtual.host<tab>host<tab>port

When I add support for virtual hosts in my client, I would like it to
work automatically - I want the client to automatically select
appropriate selector and follow it, instead of asking the user to select
the correct selector. For that to be possible the selector string should
be less ambiguous - e.g. instead of:

selector string;virtual.host

something like:

selector string;vhost=virtual.host

That would make selectors easier to parse. I could do something like:

if(selectorString.contains("vhost="))
{
	extractVhost() ...
}

Also, file names containing ";" are valid in *nix and windows and that
could be misinterpreted as a virtual host by a client, that would try to
do it automatically.

How do you imagine the exchange between sever and client so that the
client would automatically select correct virtual host? Like this?

c=client, s=server
c wants vh2.example.com, vh2.example.com resolves to the same IP as
vh1.example.com

c: <crlf>
s: ...
s: 1VH1<tab>/;vh1.example.com<tab>vh1.example.com<tab>70<crlf>
s: 1VH2<tab>/;vh2.example.com<tab>vh2.example.com<tab>70<crlf>
s: ...

Then the client parses all selectors and selects 

c: /;vh2.example.com

Would a server's root directory contain only selectors that point to
virtual host roots or would it also contain any selectors to
subdirectories, files ... ? Difference between:

1VH1<tab>/;vh1.example.com<tab>vh1.example.com<tab>70<crlf>
1VH1<tab>;vh1.example.com<tab>vh1.example.com<tab>70<crlf>
1VH1<tab>/somefile.txt;vh1.example.com<tab>vh1.example.com<tab>70<crlf>

If it was up to me, it would only contain one selector for each virtual
host that would be in a form of 2nd example above (empty selector +
virtual host).

BTW, this "redirecting to virtual host" should only be applied when the
client wants a root directory of virtual host, otherwise the selector
string already contains virtual host part ... or am I wrong?

Matjaz




More information about the Gopher-Project mailing list