geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgenen...@apache.org
Subject svn commit: r567284 - in /geronimo/sandbox/AsyncHttpClient/src/main/java/org/apache/ahc: HttpIoHandler.java codec/HttpResponseDecoder.java
Date Sat, 18 Aug 2007 15:52:29 GMT
Author: jgenender
Date: Sat Aug 18 08:52:28 2007
New Revision: 567284

URL: http://svn.apache.org/viewvc?view=rev&rev=567284
Log:
Clean up attribute

Modified:
    geronimo/sandbox/AsyncHttpClient/src/main/java/org/apache/ahc/HttpIoHandler.java
    geronimo/sandbox/AsyncHttpClient/src/main/java/org/apache/ahc/codec/HttpResponseDecoder.java

Modified: geronimo/sandbox/AsyncHttpClient/src/main/java/org/apache/ahc/HttpIoHandler.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/AsyncHttpClient/src/main/java/org/apache/ahc/HttpIoHandler.java?view=diff&rev=567284&r1=567283&r2=567284
==============================================================================
--- geronimo/sandbox/AsyncHttpClient/src/main/java/org/apache/ahc/HttpIoHandler.java (original)
+++ geronimo/sandbox/AsyncHttpClient/src/main/java/org/apache/ahc/HttpIoHandler.java Sat Aug
18 08:52:28 2007
@@ -22,6 +22,7 @@
 import org.apache.mina.common.IoHandlerAdapter;
 import org.apache.mina.common.IoSession;
 import org.apache.ahc.codec.HttpResponseMessage;
+import org.apache.ahc.codec.HttpResponseDecoder;
 
 public class HttpIoHandler extends IoHandlerAdapter {
     private AHCCallback callback;
@@ -37,11 +38,15 @@
     }
 
     public void exceptionCaught(IoSession ioSession, Throwable throwable) throws Exception
{
+        //Clean up if any in-proccess decoding was occurring
+        ioSession.removeAttribute(HttpResponseDecoder.CURRENT_RESPONSE);
         callback.onException(throwable);
     }
 
 
     public void sessionClosed(IoSession ioSession) throws Exception {
+        //Clean up if any in-proccess decoding was occurring
+        ioSession.removeAttribute(HttpResponseDecoder.CURRENT_RESPONSE);
         callback.onClosed();
     }
 }

Modified: geronimo/sandbox/AsyncHttpClient/src/main/java/org/apache/ahc/codec/HttpResponseDecoder.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/AsyncHttpClient/src/main/java/org/apache/ahc/codec/HttpResponseDecoder.java?view=diff&rev=567284&r1=567283&r2=567284
==============================================================================
--- geronimo/sandbox/AsyncHttpClient/src/main/java/org/apache/ahc/codec/HttpResponseDecoder.java
(original)
+++ geronimo/sandbox/AsyncHttpClient/src/main/java/org/apache/ahc/codec/HttpResponseDecoder.java
Sat Aug 18 08:52:28 2007
@@ -27,7 +27,7 @@
 
 public class HttpResponseDecoder extends CumulativeProtocolDecoder {
 
-    private final static String CURRENT_RESPONSE = "CURRENT_RESPONSE";
+    public final static String CURRENT_RESPONSE = "CURRENT_RESPONSE";
 
     private HttpDecoder httpDecoder = new HttpDecoder();
 



Mime
View raw message