Re: oh the irony

From: Henrik Nordstrom (hno@hem.passagen.se)
Date: Mon Aug 02 1999 - 16:17:15 MDT


Joe Touch wrote:

> > a socket is intentional or not. Did the origin server really close the
> > connection? Or was there a protocol/network error?
>
> Wouldn't that more correctly show up as an error on the socket,
> rather than an EOF? I'm bothered by the notion that you have
> to check length, if you correctly check for an EOF.

On most platforms network errors does indeed show up as an socket error,
but network errors is not the only cause to premature end of
transmissions:

An most plaforms I know of a HTTP server crash (application crash, not
machine/OS crash) shows up as an premature EOF.

Also, server side timeouts generally show up as EOF and not an error.

So the only way (except chunked transfer encoding) to reliably verify
the object transmission length is by the content-length header.

Fortunately the problem with bad servers isn't as big as the problems on
the browser side.

--
Henrik Nordstrom



This archive was generated by hypermail 2b29 : Thu Nov 18 2004 - 11:21:26 MST