![heil](/assets/img/avatar_default.png)
- refresh patches git-svn-id: svn://svn.openwrt.org/openwrt/packages@35092 3c298f89-4303-0410-b956-a3cf2f4a3e73
29 lines
1.3 KiB
Diff
29 lines
1.3 KiB
Diff
From d978423607b6666ca8dd3257d860558ead1b94af Mon Sep 17 00:00:00 2001
|
|
From: Willy Tarreau <w@1wt.eu>
|
|
Date: Sun, 30 Dec 2012 00:50:35 +0100
|
|
Subject: 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.
|
|
(cherry picked from commit a7a7ebc38280d7a04192bf95e6852222f4bd8140)
|
|
Index: haproxy-1.4.22/src/session.c
|
|
===================================================================
|
|
--- haproxy-1.4.22.orig/src/session.c
|
|
+++ haproxy-1.4.22/src/session.c
|
|
@@ -203,7 +203,8 @@ int sess_update_st_con_tcp(struct sessio
|
|
}
|
|
|
|
/* OK, maybe we want to abort */
|
|
- if (unlikely((rep->flags & BF_SHUTW) ||
|
|
+ if (!(req->flags & BF_WRITE_PARTIAL) &&
|
|
+ unlikely((rep->flags & BF_SHUTW) ||
|
|
((req->flags & BF_SHUTW_NOW) && /* FIXME: this should not prevent a connection from establishing */
|
|
(((req->flags & (BF_OUT_EMPTY|BF_WRITE_ACTIVITY)) == BF_OUT_EMPTY) ||
|
|
s->be->options & PR_O_ABRT_CLOSE)))) {
|