BUG/MINOR: http: don't process abortonclose when request was sent
option abortonclose may cause a valid connection to be aborted just
after the request has been sent. This is because we check for it
during the session establishment sequence before checking for write
activity. So if the abort and the connect complete at the same time,
the abort is still considered. Let's check for an explicity partial
write before aborting.
This fix should be backported to 1.4 too.
diff --git a/src/session.c b/src/session.c
index 02632bf..fbb130b 100644
--- a/src/session.c
+++ b/src/session.c
@@ -815,7 +815,8 @@
}
/* OK, maybe we want to abort */
- if (unlikely((rep->flags & CF_SHUTW) ||
+ if (!(req->flags & CF_WRITE_PARTIAL) &&
+ unlikely((rep->flags & CF_SHUTW) ||
((req->flags & CF_SHUTW_NOW) && /* FIXME: this should not prevent a connection from establishing */
((!(req->flags & CF_WRITE_ACTIVITY) && channel_is_empty(req)) ||
s->be->options & PR_O_ABRT_CLOSE)))) {