[gopher] Updated Gopher RFC
Driedfruit
driedfruit at mindloop.net
Wed May 9 06:11:11 UTC 2012
On Thu, 10 May 2012 17:05:27 +0300
Kim Holviala <kim at holviala.com> wrote:
> On May 9, 2012, at 8:50 , Driedfruit wrote:
>
> >> You're forgetting something: gopher is nothing but a straight
> >> through unrestricted two-way TCP connection between a gopher CGI
> >> app and the client. Why would you complicate things by encoding
> >> stuff and resubmitting when you can just keep the connection open?
> >>
> >
> > Please forgive my ignorance, that makes a lot of sense! But I'm
> > still a bit confused, how would one implement such workflow? I
> > understand the CGI keeping connection open and reading from stdin
> > part, but not the client sending raw data part. Could you elaborate?
>
> To my understanding (I stopped coding for living years ago)
> JavaScript these days has TCP sockets.
I might be completely off my mark here, but no, I don't think it does.
If it did, Overbite extensions would've implemented gopher directly in
JavaScript instead of redirecting to web gateways.
> So, the flow goes like this:
>
> C: opes connection to server port 70
> C: submits "/path/to/cgi?possible=params" + CRLF
> S: runs /path/to/cgi passing params in ENV variables
Let's forget Javascript for a moment and pretend this is some new
client that has this capability. How would it know which data to send?
And which format to use? I guess it could _tell_ the server in
the ?possible=params format.
>
> That's it - after the CRLF the gopher server goes out of the way.
> JavaScript and the CGI are now free to talk to each other through the
> TCP socket - for the server (well, the CGI) it's just stdin/out, and
> for JavaScript it's a socket. Best of all it's 8bit clean (at least
> it is with Gophernicus - don't know about other servers but can't see
> why it wouldn't work).
>
Thanks, that made it very clear.
> Hell, to make it even more reliable Gophernicus actually execs itself
> out of the way, so it's really just a client (JS) and the server
> (CGI) talking to each other.
>
> It's actually a hell of a lot better than what HTTP has, because the
> HTTP connection certainly isn't good for the above hack. You'd need
> another port open....
>
I'm using Gophernicus already, no need to plug it ;)
>
> - Kim
>
>
>
>
> _______________________________________________
> Gopher-Project mailing list
> Gopher-Project at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/gopher-project
--
driedfruit
More information about the Gopher-Project
mailing list