[ee122] untimely terminations

benjlau at berkeley.edu benjlau at berkeley.edu
Tue Oct 30 17:05:42 PDT 2007

Let's say the client is connected to the server in a persistent
connection.  They do the usual exchange of GET and response.  After some
period of inactivity, the server goes down.  The user types in a URL
equivalent to initiating the connection that was already set up (but is
now secretly broken due to server collapse).  Does it matter whether the
client assumes the connection is still there, tries sending, and then
fails and recovers, re-entering the loop and going back to the initial
state of the program (and expecting a new URL), or do we always have to
check to ensure the server hasn't died when we send a message in a
persistent connection.  If the latter, how can we do this?

Another scenario.  Let's say the client requests a persistent connection. 
The server obliges and chooses to chunk the response.  The client receives
some data and then waits for the last chunk.  While the client is waiting
for it, the server suddenly closes the connection.  What error message if
any should be shown on the client side?  I have this pegged as a parsing
error.  It's printed out.  Is that okay or is silently failing and
recovering back to the original state of the program better?

If the server declares a 403 or other 4-- error, and the client gets it,
and there was a persistent connection, should either or both close the
connection automatically?

More information about the ee122 mailing list