Upgraded to the latest HttpCore API git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpasyncclient/branches/protocol-handler-refactoring@1170153 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/DefaultAsyncRequestDirector.java b/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/DefaultAsyncRequestDirector.java index 605023a..66f7a83 100644 --- a/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/DefaultAsyncRequestDirector.java +++ b/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/DefaultAsyncRequestDirector.java
@@ -438,10 +438,10 @@ } } - public synchronized void cancel() { + public synchronized boolean cancel() { this.log.debug("HTTP exchange cancelled"); try { - this.responseConsumer.cancel(); + boolean cancelled = this.responseConsumer.cancel(); T result = this.responseConsumer.getResult(); Exception ex = this.responseConsumer.getException(); @@ -452,6 +452,7 @@ } else { this.resultCallback.cancelled(this); } + return cancelled; } catch (RuntimeException runex) { this.resultCallback.failed(runex, this); throw runex;
diff --git a/httpasyncclient/src/test/java/org/apache/http/impl/nio/client/TestClientAuthentication.java b/httpasyncclient/src/test/java/org/apache/http/impl/nio/client/TestClientAuthentication.java index 3914562..9d20009 100644 --- a/httpasyncclient/src/test/java/org/apache/http/impl/nio/client/TestClientAuthentication.java +++ b/httpasyncclient/src/test/java/org/apache/http/impl/nio/client/TestClientAuthentication.java
@@ -47,6 +47,7 @@ import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpPost; import org.apache.http.client.methods.HttpPut; +import org.apache.http.concurrent.Cancellable; import org.apache.http.impl.DefaultConnectionReuseStrategy; import org.apache.http.impl.client.BasicCredentialsProvider; import org.apache.http.impl.client.DefaultTargetAuthenticationHandler; @@ -204,7 +205,7 @@ this.authTokenExtractor = new BasicAuthTokenExtractor(); } - public void verify( + public Cancellable verify( final HttpRequest request, final HttpAsyncContinueTrigger trigger, final HttpContext context) throws HttpException, IOException { @@ -219,6 +220,7 @@ } else { trigger.continueRequest(); } + return null; } }