summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/apr/apr/0004-Fix-packet-discards-HTTP-redirect.patch
diff options
context:
space:
mode:
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.patch39
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 @@
1From 7925eb1766a00ccee05c6e80b1d34f163a04b7b1 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Tue, 30 Jan 2018 09:43:34 +0800
4Subject: [PATCH 4/7] Fix packet discards HTTP redirect.
5
6Disconnect the connection by poll() timeout.
7If timeout=0 and apr_wait_for_io_or_timeout()=APR_TIMEUP then
8apr_socket_recv() returns EAGAIN.
9
10Upstream-Status: Pending
11
12Signed-off-by: Noriaki Yoshitane <yoshitane.nrs@cnt.ncos.nec.co.jp>
13Signed-off-by: Li Wang <li.wang@windriver.com>
14
15Rebase to 1.6.3
16
17Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
18---
19 network_io/unix/sendrecv.c | 4 ++++
20 1 file changed, 4 insertions(+)
21
22diff --git a/network_io/unix/sendrecv.c b/network_io/unix/sendrecv.c
23index 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--
381.8.3.1
39