diff options
author | rcritten <> | 2009-02-19 02:31:18 +0000 |
---|---|---|
committer | rcritten <> | 2009-02-19 02:31:18 +0000 |
commit | 2870f9069b71a44b22e0c1a5dc2d6a098a1f9b0b (patch) | |
tree | 54a0384c99964025ca14e7c5c9af2d6f96424428 /nss_engine_io.c | |
parent | 14d62764b72179863ba29a12b8b475371a1f769d (diff) | |
download | mod_nss-2870f9069b71a44b22e0c1a5dc2d6a098a1f9b0b.tar.gz mod_nss-2870f9069b71a44b22e0c1a5dc2d6a098a1f9b0b.tar.xz mod_nss-2870f9069b71a44b22e0c1a5dc2d6a098a1f9b0b.zip |
Return -1 on a read failure and set the appropriate NSPR error message.
This bug has lingered for so long since mod_nss wasn't able to be used
with mod_proxy until now. What one would see with this bug is sometimes
a page would work, sometimes not (just the headers would be retrieved).
The problem was we were return 0 which means EOF and was interpreted
by upper levels to mean the transfer was done rather than no data being
available.
484380
Diffstat (limited to 'nss_engine_io.c')
-rw-r--r-- | nss_engine_io.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nss_engine_io.c b/nss_engine_io.c index 892f11c..4780aed 100644 --- a/nss_engine_io.c +++ b/nss_engine_io.c @@ -259,7 +259,8 @@ nspr_filter_in_read(PRFileDesc *fd, void *in, PRInt32 inlen) */ if (APR_STATUS_IS_EAGAIN(inctx->rc) || APR_STATUS_IS_EINTR(inctx->rc) || (inctx->rc == APR_SUCCESS && APR_BRIGADE_EMPTY(inctx->bb))) { - return 0; + PR_SetError(PR_WOULD_BLOCK_ERROR, 0); + return -1; } if (inctx->rc != APR_SUCCESS) { |