httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@covalent.net>
Subject Re: cvs commit: httpd-2.0/server core.c
Date Wed, 10 Oct 2001 19:19:08 GMT
> jerenkrantz    01/10/10 11:45:22
> 
>   Modified:    server   core.c
>   Log:
>   For some reason, I was thinking PEEK should read infinitely.  Not.
>   Return with APR_EOF if we get EAGAIN.
>   
>   (Whomever is calling this with PEEK should really be able to handle EOS
>    bucket rather than relying on error codes.)
>   
>   Thanks to Greg Ames for pointing out this fubar.
>   
>   Revision  Changes    Path
>   1.70      +1 -1      httpd-2.0/server/core.c
>   
>   Index: core.c
>   ===================================================================
>   RCS file: /home/cvs/httpd-2.0/server/core.c,v
>   retrieving revision 1.69
>   retrieving revision 1.70
>   diff -u -r1.69 -r1.70
>   --- core.c 2001/10/10 15:34:35 1.69
>   +++ core.c 2001/10/10 18:45:22 1.70
>   @@ -2806,7 +2806,7 @@
>                rv = apr_bucket_read(e, &str, &len, APR_NONBLOCK_READ);
>    
>                if (APR_STATUS_IS_EAGAIN(rv)) {
>   -                continue;
>   +                return APR_EOF;

Nope.  The fact that there is no data now is _NOT_ EOF.  Return the EAGAIN
so the peek caller can decide what to do.  If read returns EAGAIN, so must
peek, or you are creating unmanageable discrepancies.

Bill


Mime
View raw message