summaryrefslogtreecommitdiffstats
path: root/nss_engine_io.c
diff options
context:
space:
mode:
authorrcritten <>2010-09-17 19:39:27 +0000
committerrcritten <>2010-09-17 19:39:27 +0000
commitcb69869147f2618d011bfe821a330909d330612e (patch)
tree733b3af07b443c5ab235f5546343e0668e6ef7d0 /nss_engine_io.c
parent52b20c7d459f7071d58d76972417d1c4bb4ff58a (diff)
downloadmod_nss-cb69869147f2618d011bfe821a330909d330612e.tar.gz
mod_nss-cb69869147f2618d011bfe821a330909d330612e.tar.xz
mod_nss-cb69869147f2618d011bfe821a330909d330612e.zip
Fix endless read loop in some situations when handling POST data (#620856)
This was discovered in the dogtag TPS subsystem. I haven't been able to duplicate it outside of that but it is trivial inside. This seems to fix it and brings the code closer to what mod_ssl does here as well.
Diffstat (limited to 'nss_engine_io.c')
-rw-r--r--nss_engine_io.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/nss_engine_io.c b/nss_engine_io.c
index 78d3827..87dc195 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))) {
- PR_SetError(PR_WOULD_BLOCK_ERROR, 0);
+ nspr_filter_out_ctx_t *outctx = filter_ctx->outctx;
+ inctx->rc = outctx->rc;
return -1;
}