You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2018/03/16 12:19:29 UTC
[2/2] httpcomponents-core git commit: Information responses (1xx)
processing implemented.
Information responses (1xx) processing implemented.
Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/831d4869
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/831d4869
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/831d4869
Branch: refs/heads/master
Commit: 831d486953159ae455b81126371ebd7643521551
Parents: 788b803
Author: Kirill Usov <ki...@gmail.com>
Authored: Thu Mar 15 11:41:55 2018 +0300
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Fri Mar 16 13:11:20 2018 +0100
----------------------------------------------------------------------
.../java/org/apache/hc/core5/http/nio/AsyncResponseConsumer.java | 2 ++
.../java/org/apache/hc/core5/http/nio/BasicResponseConsumer.java | 4 ++++
.../hc/core5/http/nio/support/BasicClientExchangeHandler.java | 1 +
3 files changed, 7 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/831d4869/httpcore5/src/main/java/org/apache/hc/core5/http/nio/AsyncResponseConsumer.java
----------------------------------------------------------------------
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/nio/AsyncResponseConsumer.java b/httpcore5/src/main/java/org/apache/hc/core5/http/nio/AsyncResponseConsumer.java
index 37c576e..2d2a133 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/http/nio/AsyncResponseConsumer.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/http/nio/AsyncResponseConsumer.java
@@ -42,6 +42,8 @@ public interface AsyncResponseConsumer<T> extends AsyncDataConsumer {
void consumeResponse(HttpResponse response, EntityDetails entityDetails, FutureCallback<T> resultCallback) throws HttpException, IOException;
+ void informationResponse(HttpResponse response) throws HttpException, IOException;
+
void failed(Exception cause);
T getResult();
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/831d4869/httpcore5/src/main/java/org/apache/hc/core5/http/nio/BasicResponseConsumer.java
----------------------------------------------------------------------
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/nio/BasicResponseConsumer.java b/httpcore5/src/main/java/org/apache/hc/core5/http/nio/BasicResponseConsumer.java
index 9ede4b3..30fd3cd 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/http/nio/BasicResponseConsumer.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/http/nio/BasicResponseConsumer.java
@@ -95,6 +95,10 @@ public class BasicResponseConsumer<T> implements AsyncResponseConsumer<Message<H
}
@Override
+ public void informationResponse(final HttpResponse response) throws HttpException, IOException {
+ }
+
+ @Override
public void updateCapacity(final CapacityChannel capacityChannel) throws IOException {
dataConsumer.updateCapacity(capacityChannel);
}
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/831d4869/httpcore5/src/main/java/org/apache/hc/core5/http/nio/support/BasicClientExchangeHandler.java
----------------------------------------------------------------------
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/nio/support/BasicClientExchangeHandler.java b/httpcore5/src/main/java/org/apache/hc/core5/http/nio/support/BasicClientExchangeHandler.java
index 9052d55..eb00a6a 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/http/nio/support/BasicClientExchangeHandler.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/http/nio/support/BasicClientExchangeHandler.java
@@ -86,6 +86,7 @@ public class BasicClientExchangeHandler<T> implements AsyncClientExchangeHandler
@Override
public void consumeInformation(final HttpResponse response) throws HttpException, IOException {
+ responseConsumer.informationResponse(response);
}
@Override