diff options
| author | Li Wang <li.wang@windriver.com> | 2015-07-08 15:53:19 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-07-16 15:09:17 +0100 |
| commit | 60cebe6b3848055ce47b65117b33f63bfdcaf05b (patch) | |
| tree | 2a6d7ee1cc904234fa7df0a465abf09a6fe13765 | |
| parent | 3f79bf7f6c91df80df792d89402c6eecd7f47a7a (diff) | |
| download | poky-60cebe6b3848055ce47b65117b33f63bfdcaf05b.tar.gz | |
apr: Fix packet discards HTTP redirect
Disconnect the connection by poll() timeout.
If timeout=0 and apr_wait_for_io_or_timeout()=APR_TIMEUP then
apr_socket_recv() returns EAGAIN.
(From OE-Core rev: cef4de5cd6c12091146dc1ef02cd80e094c6728e)
Signed-off-by: Noriaki Yoshitane <yoshitane.nrs@cnt.ncos.nec.co.jp>
Signed-off-by: Li Wang <li.wang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-support/apr/apr/Fix-packet-discards-HTTP-redirect.patch | 32 | ||||
| -rw-r--r-- | meta/recipes-support/apr/apr_1.5.2.bb | 1 |
2 files changed, 33 insertions, 0 deletions
diff --git a/meta/recipes-support/apr/apr/Fix-packet-discards-HTTP-redirect.patch b/meta/recipes-support/apr/apr/Fix-packet-discards-HTTP-redirect.patch new file mode 100644 index 0000000000..6805b8b6e2 --- /dev/null +++ b/meta/recipes-support/apr/apr/Fix-packet-discards-HTTP-redirect.patch | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | Fix packet discards HTTP redirect. | ||
| 2 | |||
| 3 | Disconnect the connection by poll() timeout. | ||
| 4 | If timeout=0 and apr_wait_for_io_or_timeout()=APR_TIMEUP then | ||
| 5 | apr_socket_recv() returns EAGAIN. | ||
| 6 | |||
| 7 | Upstream-Status: Pending | ||
| 8 | |||
| 9 | Signed-off-by: Noriaki Yoshitane <yoshitane.nrs@cnt.ncos.nec.co.jp> | ||
| 10 | Signed-off-by: Li Wang <li.wang@windriver.com> | ||
| 11 | --- | ||
| 12 | network_io/unix/sendrecv.c | 4 ++++ | ||
| 13 | 1 file changed, 4 insertions(+) | ||
| 14 | |||
| 15 | diff --git a/network_io/unix/sendrecv.c b/network_io/unix/sendrecv.c | ||
| 16 | index 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 | -- | ||
| 31 | 1.7.9.5 | ||
| 32 | |||
diff --git a/meta/recipes-support/apr/apr_1.5.2.bb b/meta/recipes-support/apr/apr_1.5.2.bb index aac6276b14..c1f7f380ed 100644 --- a/meta/recipes-support/apr/apr_1.5.2.bb +++ b/meta/recipes-support/apr/apr_1.5.2.bb | |||
| @@ -15,6 +15,7 @@ SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.bz2 \ | |||
| 15 | file://configfix.patch \ | 15 | file://configfix.patch \ |
| 16 | file://run-ptest \ | 16 | file://run-ptest \ |
| 17 | file://upgrade-and-fix-1.5.1.patch \ | 17 | file://upgrade-and-fix-1.5.1.patch \ |
| 18 | file://Fix-packet-discards-HTTP-redirect.patch \ | ||
| 18 | " | 19 | " |
| 19 | 20 | ||
| 20 | SRC_URI[md5sum] = "4e9769f3349fe11fc0a5e1b224c236aa" | 21 | SRC_URI[md5sum] = "4e9769f3349fe11fc0a5e1b224c236aa" |
