hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1598555 - in /httpcomponents/httpcore/trunk/httpcore-nio/src: main/java/org/apache/http/nio/protocol/HttpAsyncService.java test/java/org/apache/http/nio/protocol/TestHttpAsyncService.java
Date Fri, 30 May 2014 11:31:15 GMT
Author: olegk
Date: Fri May 30 11:31:14 2014
New Revision: 1598555

URL: http://svn.apache.org/r1598555
Log:
Minor bug in service state management

Modified:
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestHttpAsyncService.java

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java?rev=1598555&r1=1598554&r2=1598555&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java
Fri May 30 11:31:14 2014
@@ -419,7 +419,7 @@ public class HttpAsyncService implements
                 }
             } else if (status >= 400) {
                 conn.resetInput();
-                state.setRequestState(MessageState.COMPLETED);
+                state.setRequestState(MessageState.READY);
                 commitFinalResponse(conn, state);
             } else {
                 throw new HttpException("Invalid response: " + response.getStatusLine());

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestHttpAsyncService.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestHttpAsyncService.java?rev=1598555&r1=1598554&r2=1598555&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestHttpAsyncService.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestHttpAsyncService.java
Fri May 30 11:31:14 2014
@@ -1050,7 +1050,7 @@ public class TestHttpAsyncService {
 
         this.protocolHandler.responseReady(this.conn);
 
-        Assert.assertEquals(MessageState.COMPLETED, state.getRequestState());
+        Assert.assertEquals(MessageState.READY, state.getRequestState());
         Assert.assertEquals(MessageState.BODY_STREAM, state.getResponseState());
 
         Mockito.verify(this.conn).resetInput();



Mime
View raw message