Author: sjlee
Date: Sat Aug 2 22:39:29 2008
New Revision: 682105
URL: http://svn.apache.org/viewvc?rev=682105&view=rev
Log:
ASYNCWEB-18
If HttpResponseDecoder fails to read the full status line from the next
(actual) response after the continue response, the state should be reset to the
start state before returning. The state should transition to status_read only
if we did read the status line.
Modified:
mina/asyncweb/branches/1.0/client/src/main/java/org/apache/asyncweb/client/codec/HttpResponseDecoder.java
Modified:
mina/asyncweb/branches/1.0/client/src/main/java/org/apache/asyncweb/client/codec/HttpResponseDecoder.java
URL:
http://svn.apache.org/viewvc/mina/asyncweb/branches/1.0/client/src/main/java/org/apache/asyncweb/client/codec/HttpResponseDecoder.java?rev=682105&r1=682104&r2=682105&view=diff
==============================================================================
---
mina/asyncweb/branches/1.0/client/src/main/java/org/apache/asyncweb/client/codec/HttpResponseDecoder.java
(original)
+++
mina/asyncweb/branches/1.0/client/src/main/java/org/apache/asyncweb/client/codec/HttpResponseDecoder.java
Sat Aug 2 22:39:29 2008
@@ -84,12 +84,16 @@
//Check if the entire response headers have been read
if (line.length() == 0) {
-
response.setState(HttpResponseMessage.STATE_STATUS_READ);
-
//The next line should be a header
if (!processStatus(response, in)) {
+ // the continue response is completely read but we
+ // didn't get the full status line from the next
+ // response; reset the state to STATE_START
+ response.setState(HttpResponseMessage.STATE_START);
throw new NeedMoreDataException();
}
+ // status was processed
+
response.setState(HttpResponseMessage.STATE_STATUS_READ);
break;
}
}