]> git.99rst.org Git - openwrt-packages.git/blob
69e1d62bb7b99f0b68ee614342a13befaf2bed04
[openwrt-packages.git] /
1 commit 21a796cb83c29ee276feb04649a1b18214bbdee0
2 Author: Olivier Houchard <ohouchard@haproxy.com>
3 Date: Fri Jul 26 14:54:34 2019 +0200
4
5 BUG/MEDIUM: streams: Don't switch the SI to SI_ST_DIS if we have data to send.
6
7 In sess_established(), don't immediately switch the backend stream_interface
8 to SI_ST_DIS if we only got a SHUTR. We may still have something to send,
9 ie if the request is a POST, and we should be switched to SI_ST8DIS later
10 when the shutw will happen.
11
12 This should be backported to 2.0 and 1.9.
13
14 (cherry picked from commit 7859526fd6ce7ea33e20b7e532b21aa2465cb11d)
15 Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
16
17 diff --git a/src/stream.c b/src/stream.c
18 index a5c5f45c..64875c80 100644
19 --- a/src/stream.c
20 +++ b/src/stream.c
21 @@ -954,8 +954,9 @@ static void sess_establish(struct stream *s)
22 si_chk_rcv(si);
23 }
24 req->wex = TICK_ETERNITY;
25 - /* If we managed to get the whole response, switch to SI_ST_DIS now. */
26 - if (rep->flags & CF_SHUTR)
27 + /* If we managed to get the whole response, and we don't have anything
28 + * left to send, or can't, switch to SI_ST_DIS now. */
29 + if (rep->flags & (CF_SHUTR | CF_SHUTW))
30 si->state = SI_ST_DIS;
31 }
32
git clone https://git.99rst.org/PROJECT