You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Kevin Seguin <se...@motive.com> on 2002/01/24 07:56:47 UTC

RE: cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/ajp Ajp13.java

> 
> 
> >           
> >           total_read = readN(in, b, H_SIZE, len);
> >  -        
> >  -        if (total_read <= 0) {
> >  +
> >  +        // it's ok to have read 0 bytes when len=0 -- this means
> >  +        // the end of the stream has been reached.
> >  +        if (total_read < 0) {
> >               logger.log("can't read body, waited #" + len);
> >               return JK_AJP13_BAD_BODY;
> >           }
> >  
> 
> Why not just skip the readN call when len = 0 since 
> the only case where readN will return 0 is when the 
> passed len is 0 ;)
> 
> I'll commit a patch later
> 

yeah, that same thought occurred to me too.  but, then i never did anything
about it.  i was just happy i figured out what went wrong :)

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>