Content length, EOF -- ways to resolve whether we received everything

John Cowan cowan at ccil.org
Fri Oct 30 13:38:29 GMT 2020


On Fri, Oct 30, 2020 at 7:50 AM Björn Wärmedal <bjorn.warmedal at gmail.com>
wrote:


> There's been a lot of discussions about the lack of an end-of-message
> indicator in the protocol. Clearly it's something that a lot of client and
> server implementers are missing.
>

I confess to not having read these discussions.  But what's the problem?
The server writes an entity-body to the socket and closes it.  The client
reads from the socket until it gets EOF (a zero-length return from read or
recv).  Done.  Gopher has been transmitting binary files like this forever,
and the cognate protocols finger and whois also do it this way: no length
or in-band EOF sequence.

It is the particular mime-type that declares what parameters are meaningful
to it.  Writing "text/plain;charset=utf-8;content-length=32767" will not
mean anything to anyone outside the Gemini world and will probably confuse
them.

Let's not go there.



John Cowan          http://vrici.lojban.org/~cowan        cowan at ccil.org
One art / There is / No less / No more
To do / All things / With sparks / Galore   --Douglas Hofstadter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.orbitalfox.eu/archives/gemini/attachments/20201030/bdb556f3/attachment.htm>


More information about the Gemini mailing list