geronimo-scm mailing list archives

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

URL: http://svn.apache.org/viewvc?view=rev&rev=567281
Log:
Place response header flag in the response

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

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=567281&r1=567280&r2=567281
==============================================================================
--- 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:47:40 2007
@@ -30,7 +30,6 @@
     private final static String CURRENT_RESPONSE = "CURRENT_RESPONSE";
 
     private HttpDecoder httpDecoder = new HttpDecoder();
-    private boolean headersRead = false;
 
     protected boolean doDecode(IoSession ioSession, ByteBuffer in, ProtocolDecoderOutput
out) throws Exception {
 
@@ -51,7 +50,7 @@
         }
 
         //Have we read the headers yet?
-        if (!headersRead) {
+        if (!response.headersRead) {
             //Read the headers and process them
             while (true) {
                 String line = httpDecoder.decodeLine(in);
@@ -62,7 +61,7 @@
 
                 //Check if the entire response headers have been read
                 if (line.length() == 0) {
-                    headersRead = true;
+                    response.headersRead = true;
                     break;
                 }
 

Modified: geronimo/sandbox/AsyncHttpClient/src/main/java/org/apache/ahc/codec/HttpResponseMessage.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/AsyncHttpClient/src/main/java/org/apache/ahc/codec/HttpResponseMessage.java?view=diff&rev=567281&r1=567280&r2=567281
==============================================================================
--- geronimo/sandbox/AsyncHttpClient/src/main/java/org/apache/ahc/codec/HttpResponseMessage.java
(original)
+++ geronimo/sandbox/AsyncHttpClient/src/main/java/org/apache/ahc/codec/HttpResponseMessage.java
Sat Aug 18 08:47:40 2007
@@ -24,6 +24,8 @@
     private int statusCode;
     private String statusMessage;
 
+    boolean headersRead = false;
+
     public int getStatusCode() {
         return statusCode;
     }



Mime
View raw message