[BUG] fix early server close after client close

Problem reported by Andy Smith. If a client sends TCP data
and quickly closes the connection before the server connection
is established, AND the whole buffer can be sent at once when
the connection establishes, then the server side believes that
it can simply abort the connection because the buffer is empty,
without checking that some work was performed.

Fix: ensure that nothing was written before closing.
diff --git a/src/proto_http.c b/src/proto_http.c
index 7679970..4540fd4 100644
--- a/src/proto_http.c
+++ b/src/proto_http.c
@@ -2318,7 +2318,8 @@
 	else if (s == SV_STCONN) { /* connection in progress */
 		if (c == CL_STCLOSE || c == CL_STSHUTW ||
 		    (c == CL_STSHUTR &&
-		     (t->req->l == 0 || t->be->options & PR_O_ABRT_CLOSE))) { /* give up */
+		     ((t->req->l == 0 && !(req->flags & BF_WRITE_STATUS)) ||
+		      t->be->options & PR_O_ABRT_CLOSE))) { /* give up */
 			tv_eternity(&req->cex);
 			fd_delete(t->srv_fd);
 			if (t->srv)