]> granicus.if.org Git - libevent/commit
Do not send an HTTP error when we've already closed or responded.
authorPavel Plesov <mclap@users.sourceforge.net>
Mon, 11 Jan 2010 23:52:54 +0000 (18:52 -0500)
committerNick Mathewson <nickm@torproject.org>
Mon, 11 Jan 2010 23:54:23 +0000 (18:54 -0500)
commit4fd2dd9d83a000b6fa931130d7b7159130251282
treeffef73d8386bdfd92f5cd61eb1ba946307f76405
parent8771d5b6466441cfe2be7a9847b9b5d04be9a1ba
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.
http.c
test/regress_http.c