Bert Freudenberg <[EMAIL PROTECTED]> wrote:
> On Sun, 22 Oct 2000, Bolot Kerimbaev wrote:
>
> > Somehow, I need to implement a pretty "smart" way of dealing with
> > partial returns: just plain stupid write-till-done method and the
> > more robust HTTP/1.1 chunked (i.e., you send out several portions
> > of the response, each with chunk-size - so at the end you know you
> > got the whole thing for sure, not some network problem).
>
> Why this? You do not need to give a contents-size upfront. You just
> send the the header, then any data as soon as you can, then close the
> connection. The browser is well able to tell if the connection was closed
> intentionally or by error. This is what almost every cgi script does.
>
How do you tell an "error" FIN packet from an "all done" FIN packet?
I'm no TCP/IP guru, but it seems pretty hard to make this distinction.
Incidentally, Bolot, watch out for using HTTP/1.1 extensions if the
client identifies itself as speaking HTTP/1.0. A great way to test for
this case is to use Scamper. :)
-Lex