tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jean-frederic clere <jfcl...@gmail.com>
Subject Re: svn commit: r1148216 - /tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java
Date Thu, 21 Jul 2011 13:23:07 GMT
On 07/21/2011 01:34 PM, Konstantin Kolinko wrote:
> 2011/7/19<jfclere@apache.org>:
>> Author: jfclere
>> Date: Tue Jul 19 08:06:46 2011
>> New Revision: 1148216
>>
>> URL: http://svn.apache.org/viewvc?rev=1148216&view=rev
>> Log:
>> Fix for PR49595
>>
>> Modified:
>>     tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java
>>
>
>> --- tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java (original)
>> +++ tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java Tue Jul 19 08:06:46
2011
>> @@ -507,13 +507,13 @@ public class AjpAprProcessor extends Abs
>>          long socketRef = socket.getSocket().longValue();
>>
>>          if (outputBuffer.position()>  0) {
>> -            if (Socket.sendbb(socketRef, 0, outputBuffer.position())<  0) {
>> +            if ((socketRef != 0)&&  Socket.sendbb(socketRef, 0, outputBuffer.position())<
 0) {
>>                  throw new IOException(sm.getString("ajpprocessor.failedsend"));
>>              }
>>              outputBuffer.clear();
>
> 1. Shouldn't socketRef eq 0 result in IOException as well here and in
> the fragment below?

Probably.

> 2. I suspect that outputBuffer.clear() should be called even if
> IOException is thrown.

Yep

Cheers

Jean-Frederic

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message