Re: PUT

Your option 2 is the way to go.

I'm afraid that you should face up to hairier code; clients
should be written to be cooperative to the server, or you
can/will deadlock between client and server.  It is not unique to the WWW,
but comes up anytime you have limited buffering, with any protocol.  
Using non-blocking I/O isn't particularly hard, so the amount of 
hair to implement this is minimal.  Believing a server should have to
deal with arbitrarily stupid clients that won't listen to them for arbitrary
amounts of time seems like silly systems design to me.

Whenever writing data from a client to a server, a client should check for 
WOULD_BLOCK, and read any data from the server that has arrived.  This really
isn't so hard, and comes up commonly in any system such as this.

This same sort of deadlock situation came up in the X Window System
protocol, and the library was modified to preserve this cooperative behavior.  
It wasn't all that hard; when I ran into this problem in the X library,
it took me all of an afternoon to implement a fix, as I remember.  
I can't believe it should be all that hard for you to implement, 
either on a client or a server. 
				- Jim Gettys

Received on Tuesday, 26 September 1995 09:09:23 UTC