Re: uh oh -- halp!

Tony Sanders <sanders@bsdi.com>
Errors-To: sanders@bsdi.com
Errors-To: sanders@bsdi.com
Message-id: <9309082104.AA01315@austin.BSDI.COM>
To: www-talk@nxoc01.cern.ch
Subject: Re: uh oh -- halp! 
In-Reply-To: Your message of Wed, 08 Sep 93 15:01:24 CDT.
Errors-To: sanders@bsdi.com
Reply-To: sanders@bsdi.com
Organization: Berkeley Software Design, Inc.
Date: Wed, 08 Sep 1993 16:04:58 -0500
From: Tony Sanders <sanders@bsdi.com>
Status: RO
[problem about supporting HTTP/1.0 and HTTP0 in same client]
...
> >  The result is that the socket gets confused and the client only ends
> >  up getting the first chunk of data (usually 1024 bytes).
I think the client is getting ENOTCONN when the server does the close.
You could work around this by detecting ENOTCONN and retrying without
"HTTP/1.0".  For performance you would probably want to cache a list of
HTTP0 servers (though I wouldn't bother keeping it around between sessions).

> 1)  To change the HTTP/1.0 protocol to use a different separator between 
>     accept fields, and to use CR LF as a terminator.  This means getting new
>     versions of all the servers and clients, and also means getting all
>     existing HTTP/1.0 servers upgraded.  Anyone know the install base
>     out there?  This will cause lots of user headaches until all the servers
>     get upgraded.
I don't think \r\n is the problem.  Just set the connection to unbuffered
(I'll bet you have it line buffered now) and flush when done building the
request.  However, I think you still get bitten if it fragments going out.

Maybe someone with more TCP knowledge could dig into this and figure out
another solution.

--sanders