diff options
Diffstat (limited to 'meta/recipes-support/apr/apr/0004-Fix-packet-discards-HTTP-redirect.patch')
-rw-r--r-- | meta/recipes-support/apr/apr/0004-Fix-packet-discards-HTTP-redirect.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/meta/recipes-support/apr/apr/0004-Fix-packet-discards-HTTP-redirect.patch b/meta/recipes-support/apr/apr/0004-Fix-packet-discards-HTTP-redirect.patch new file mode 100644 index 0000000000..30fc07d4a0 --- /dev/null +++ b/meta/recipes-support/apr/apr/0004-Fix-packet-discards-HTTP-redirect.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | From 7925eb1766a00ccee05c6e80b1d34f163a04b7b1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Tue, 30 Jan 2018 09:43:34 +0800 | ||
4 | Subject: [PATCH 4/7] Fix packet discards HTTP redirect. | ||
5 | |||
6 | Disconnect the connection by poll() timeout. | ||
7 | If timeout=0 and apr_wait_for_io_or_timeout()=APR_TIMEUP then | ||
8 | apr_socket_recv() returns EAGAIN. | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | |||
12 | Signed-off-by: Noriaki Yoshitane <yoshitane.nrs@cnt.ncos.nec.co.jp> | ||
13 | Signed-off-by: Li Wang <li.wang@windriver.com> | ||
14 | |||
15 | Rebase to 1.6.3 | ||
16 | |||
17 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
18 | --- | ||
19 | network_io/unix/sendrecv.c | 4 ++++ | ||
20 | 1 file changed, 4 insertions(+) | ||
21 | |||
22 | diff --git a/network_io/unix/sendrecv.c b/network_io/unix/sendrecv.c | ||
23 | index 4c0e0a6..1bdafba 100644 | ||
24 | --- a/network_io/unix/sendrecv.c | ||
25 | +++ b/network_io/unix/sendrecv.c | ||
26 | @@ -85,6 +85,10 @@ apr_status_t apr_socket_recv(apr_socket_t *sock, char *buf, apr_size_t *len) | ||
27 | && (sock->timeout > 0)) { | ||
28 | do_select: | ||
29 | arv = apr_wait_for_io_or_timeout(NULL, sock, 1); | ||
30 | + if ((arv == APR_TIMEUP) && (sock->timeout == 0)) { | ||
31 | + *len = 0; | ||
32 | + return EAGAIN; | ||
33 | + } | ||
34 | if (arv != APR_SUCCESS) { | ||
35 | *len = 0; | ||
36 | return arv; | ||
37 | -- | ||
38 | 1.8.3.1 | ||
39 | |||