Commit 4fd2dd9d83a000b6fa931130d7b7159130251282

Pavel Plesov 2010-01-11T18:52:54

Do not send an HTTP error when we've already closed or responded. Previously, we'd issue an HTTP/1.1 400 Bad Request" response on every connection close, event if sever sent response already. This patch changes the behavior, so we only issue the response on close when the connection state is not DISCONNECTED, and so we set the state to DISCONNECTED when the connection closes. Includes a regression test; fixes sourceforge bug 2909909.