Client behavior when server doesn't close connection?



> On Jul 9, 2020, at 14:27, juhani <juhani at envs.net> wrote:
> 
> the working sites the last packet from the server had FIN flag, and on 
the failing sites it didn't.

In principle, the server MUST close the connection. Gemini doesn't have 
the concept of persistent connection, or content length, or chunking, or 
what not. Nothing but close.

If the server doesn't explicitly close the connection, then the client is 
toast, as there is no other mechanism to indicate end-of-transmission.

> but what should the client do if it cant be sure it has the complete payload?

Pray. Punt. Apply any random heuristics you see fit. But really, no close, no cigar.

> With line based content it's possible to show what you've got. The 
clients I've tried, so far, seem to do that, but is it correct?

It's a heuristic. Your milage may vary. The short of it is that there is 
no mechanism to indicate anything aside from the server cleanly closing the connection.

> And what about binary content?

Use a different protocol.

---

Previous in thread (1 of 16): 🗣️ juhani (juhani (a) envs.net)

Next in thread (3 of 16): 🗣️ Petite Abeille (petite.abeille (a) gmail.com)

View entire thread.