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.
This commit is contained in:
parent
eab777c32e
commit
a7a7ebc382
@ -815,7 +815,8 @@ static int sess_update_st_con_tcp(struct session *s, struct stream_interface *si
|
||||
}
|
||||
|
||||
/* 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)))) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user