blob: 6805b8b6e2547fcb7f3a83eaea3e61238b1ea4bf [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001Fix packet discards HTTP redirect.
2
3Disconnect the connection by poll() timeout.
4If timeout=0 and apr_wait_for_io_or_timeout()=APR_TIMEUP then
5apr_socket_recv() returns EAGAIN.
6
7Upstream-Status: Pending
8
9Signed-off-by: Noriaki Yoshitane <yoshitane.nrs@cnt.ncos.nec.co.jp>
10Signed-off-by: Li Wang <li.wang@windriver.com>
11---
12 network_io/unix/sendrecv.c | 4 ++++
13 1 file changed, 4 insertions(+)
14
15diff --git a/network_io/unix/sendrecv.c b/network_io/unix/sendrecv.c
16index c133a26..e8faf15 100644
17--- a/network_io/unix/sendrecv.c
18+++ b/network_io/unix/sendrecv.c
19@@ -85,6 +85,10 @@ apr_status_t apr_socket_recv(apr_socket_t *sock, char *buf, apr_size_t *len)
20 && (sock->timeout > 0)) {
21 do_select:
22 arv = apr_wait_for_io_or_timeout(NULL, sock, 1);
23+ if ((arv == APR_TIMEUP) && (sock->timeout == 0)) {
24+ *len = 0;
25+ return EAGAIN;
26+ }
27 if (arv != APR_SUCCESS) {
28 *len = 0;
29 return arv;
30--
311.7.9.5
32