Client behavior when server doesn't close connection?

Solderpunk solderpunk at posteo.net
Fri Jul 10 10:26:15 BST 2020


On Thu Jul 9, 2020 at 3:27 PM CEST, juhani wrote:
> On 9.7.2020 15.52, Petite Abeille wrote:
>
> >> On Jul 9, 2020, at 14:27, juhani <juhani at envs.net> wrote:
> >> 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.
>
> Roger that :)

I guess one is almost always going to get at least the MIME type of the
partial content, so really robust clients could probably implement a
strategy of looking at that to decide how to proceed (although
proceeding at all in this scenario is always going to be hit-or-miss,
and in principle it should be a perfectly valid decision for a client to
display an error message and nothing more if the connection times out
without closing, or if it closes without a proper TLS finishing
message).  In principle one could categorise MIME types into those where
handling partial content is likely to degrade gracefully (e.g.
uncompressed, "linear" content - text, wav files maybe?) and those where
trying to proceed is just likely to cause an error.

Cheers,
Solderpunk



More information about the Gemini mailing list