DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40960>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40960


[EMAIL PROTECTED] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         OS/Version|Windows 2000                |All
            Version|5.5.23                      |5.5.22




------- Additional Comments From [EMAIL PROTECTED]  2007-07-31 00:15 -------
In the description it is told as the issue is there in 5.5.23,but in the
changelog of tomcat 5.5 it is been told that from the version 5.5.10 this issue
is fixed.

"Fix NPE when POST size exceeds limit defined by maxPostSize. (markt)".

Can anyone help me that what i refering is correct or not

(In reply to comment #0)
> Timeout when reading from underlying socket does throw IOException with APR 
> and
> SocketTimeoutException without APR.
> This difference causes servlet code handling "timeout exceptions" to break 
> (and
> not be fixeable) if APR is used.
> In class "org.apache.coyote.http11.InternalAprInputBuffer" for method "boolean
> fill() throws IOException":
> (in block if (!parsingHeader) ) The return code for Socket.recvbb  is not
> checked for Status.ETIMEDOUT or Status.TIMEUP, therefore an IOException is
> thrown whatever the reason for the exception.  This is a behavior change from
> non-APR HTTP 1.1 connector.
> 
> The following new code for the fill method fixes the issue:
>    /**
>      * Fill the internal buffer using data from the undelying input stream.
>      *
>      * @return false if at end of stream
>      */
>     protected boolean fill()
>         throws IOException {
> 
>         int nRead = 0;
> 
>         if (parsingHeader) {
> 
>             if (lastValid == buf.length) {
>                 throw new IOException
>                     (sm.getString("iib.requestheadertoolarge.error"));
>             }
> 
>             bbuf.clear();
>             nRead = Socket.recvbb
>                 (socket, 0, buf.length - lastValid);
>             if (nRead > 0) {
>                 bbuf.limit(nRead);
>                 bbuf.get(buf, pos, nRead);
>                 lastValid = pos + nRead;
>             } else {
>                 if ((-nRead) == Status.EAGAIN) {
>                     return false;
>                 } else {
>                     throw new IOException(sm.getString("iib.failedread"));
>                 }
>             }
> 
>         } else {
> 
>             buf = bodyBuffer;
>             pos = 0;
>             lastValid = 0;
>             bbuf.clear();
>             nRead = Socket.recvbb
>                 (socket, 0, buf.length);
>             if (nRead > 0) {
>                 bbuf.limit(nRead);
>                 bbuf.get(buf, 0, nRead);
>                 lastValid = nRead;
>             } else {
> // CP: Start change
>               if ((-nRead) == Status.ETIMEDOUT || (-nRead) == Status.TIMEUP) {
>                       throw new 
> java.net.SocketTimeoutException(sm.getString("iib.failedread"));
>               } else {
>                       throw new IOException(sm.getString("iib.failedread"));
>               }
> // CP: End change
>             }
> 
>         }
> 
>         return (nRead > 0);
> 
>     }
> 
> Since SocketTimeOutException is also an IOException, this modification cannot
> break code that does not filter timeout exceptions.



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to