Author: rcritten
Update of /cvs/dirsec/mod_nss
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv3518
Modified Files:
nss_engine_io.c
Log Message:
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
Index: nss_engine_io.c
===================================================================
RCS file: /cvs/dirsec/mod_nss/nss_engine_io.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- nss_engine_io.c 31 May 2007 21:36:03 -0000 1.8
+++ nss_engine_io.c 19 Feb 2009 02:31:18 -0000 1.9
@@ -259,7 +259,8 @@
*/
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) {
Show replies by date