Boost logo

Boost :

From: Christopher Kohlhoff (chris_at_[hidden])
Date: 2006-11-29 16:44:30


berserker_r <berserker_r_at_[hidden]> wrote:
> I'm still trying to implement a multithreaded http server with asio: the
> problem I have reported in the past about IOCP looks fixed but now I'm
> falling in another one...If you try the following example it will works
> well with IE6 and Opera 9 but not with Firefox 2.0 (it always detect an
> aborted connection). To make it works with Firefox just uncomment the
> "Sleep(0)". Obiously I don't think that the problem is related to
> Firefox, but I cannot understand why it works well with others browsers...

Hmm, works for me with Firefox 2.0. Your sample code isn't implementing
HTTP properly, so maybe Firefox decides that it isn't talking to a
proper HTTP server and aborts the connection? I'm particularly thinking
of how the code doesn't wait to receive the entire request before
sending the reply. The Sleep(0) in the server may give the browser
enough time to fully transmit the request before the server starts
sending the reply.

Cheers,
Chris


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk