[Seaside] [BUG?] The Third Ghost Request and error swallowing

Michal miso.list at auf.net
Mon Aug 15 00:10:11 CEST 2005

I took some time to chase the "ghost" request, and caught it, but it
turns out to be a rather disappointing customer. So there is indeed an
attempt at building a request from an empty string, but it is only a
side-effect of the suboptimal implementation of keep-alive in

What happens is that beginConversation tries to reuse the same socket
for the next request, but it forgets to check whether a timeout has
occured in the meantime (or whether the other end is still open). So
as soon as it has finished with one request, it optimistically starts
building the next request, which lands it in #upToAll:, trying to read
data from the socket.

If a timeout does occur, the other end notices (being more careful)
and closes its end. At that point, #upToAll: returns an empty string
and a (ghost) request is cheerfully constructed on that basis. Which
leads to an error in #initStatusString:.

Furthermore, since HttpAdaptor sets a very short default timeout (10
seconds, why?), that basically happens after every request.

As it stands, that error is harmless - it is being silently swallowed
in #beginConversation. I have a one-line "fix" for this, which simply
checks that data is coming in within #dataTimeout period. It doesn't
change much now, but it will once we stop silently swallowing all

I'll submit a patch as soon as I figure out where to submit it ;)


More information about the Seaside mailing list