Half closed connections, is it legal in HTTP?

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Fri, 10 Dec 1999 00:49:31 +0100

The discussion with Jens Vockler on half closed connections reminded me
to spend some time on investigating if such use of TCP is legal in the
sense of HTTP.

In short, what I have found is:

* HTTP (RFC 2616) says that each end should promptly close down the
connection once it is discovered that the other end has closed down.
(section 8.1.4)

* TCP (rfc 793) says that CLOSE is the closing of the transmit channel,
the read channel is kept open until the other end closes its transmit
channel or the TCP connection is aborted

What this effectively says to me is that half closed clients is not
allowed in HTTP. Even thought some may find it convenient servers
supporting it is not stricly compliant with RFC2616 section 8.1.4 except
for the case where the request is fully processed and queued for
transmit before the close is detected (in which case the connection
technically isn't half closed, even if it may seem so from a packet
point of view).

Note: RFC 2616 section 8.1.4 talks about graceful shutdown. This IS the
CLOSE operation in TCP. The non-graceful version (which is the default
for most TCP/IP implementations) is in TCP a CLOSE + ABORT.

Please correct me if I am wrong.

--
Henrik Nordstrom
Squid hacker
Received on Thu Dec 09 1999 - 17:43:55 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:49:48 MST