Permalink
Browse files

Upgraded HttpCore to version 4.2.2

  • Loading branch information...
1 parent 0ac74e4 commit 3614a503882844e9e6b76720da942fc890976846 @ok2c ok2c committed Sep 22, 2012
View
22 ...syncclient/src/main/java/org/apache/http/impl/nio/client/LoggingAsyncRequestExecutor.java
@@ -28,16 +28,13 @@
package org.apache.http.impl.nio.client;
import java.io.IOException;
-import java.lang.reflect.Method;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.http.ConnectionClosedException;
import org.apache.http.HttpException;
import org.apache.http.nio.ContentDecoder;
import org.apache.http.nio.ContentEncoder;
import org.apache.http.nio.NHttpClientConnection;
-import org.apache.http.nio.protocol.HttpAsyncRequestExecutionHandler;
import org.apache.http.nio.protocol.HttpAsyncRequestExecutor;
class LoggingAsyncRequestExecutor extends HttpAsyncRequestExecutor {
@@ -131,23 +128,4 @@ public void timeout(final NHttpClientConnection conn) throws IOException {
super.timeout(conn);
}
- @Override
- public void endOfInput(NHttpClientConnection conn) throws IOException {
- ///
- /// TODO: remove when fix for HTTPASYNC-21 is available in HttpCore stable release
- ///
- HttpAsyncRequestExecutionHandler<?> handler = (HttpAsyncRequestExecutionHandler<?>) conn.getContext().getAttribute(HTTP_HANDLER);
- Object state = conn.getContext().getAttribute("http.nio.http-exchange-state");
- try {
- Method m1 = state.getClass().getDeclaredMethod("getRequestState");
- m1.setAccessible(true);
- Object obj = m1.invoke(state);
- if (!obj.toString().equals("READY")) {
- handler.failed(new ConnectionClosedException("Connection closed"));
- }
- } catch (Exception ex) {
- }
- super.endOfInput(conn);
- }
-
}
View
2 pom.xml
@@ -71,7 +71,7 @@
<maven.compile.target>1.5</maven.compile.target>
<maven.compile.optimize>true</maven.compile.optimize>
<maven.compile.deprecation>true</maven.compile.deprecation>
- <httpcore.version>4.2.1</httpcore.version>
+ <httpcore.version>4.2.2</httpcore.version>
<httpclient.version>4.2.1</httpclient.version>
<commons-logging.version>1.1.1</commons-logging.version>
<!-- Note IO 2.3+ requires Java 6 -->

0 comments on commit 3614a50

Please sign in to comment.