src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Exchange.java
branchhttp-client-branch
changeset 55852 32f6aefec11e
parent 55821 fa0fc03c0853
child 55866 93e8ef0ff08e
--- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Exchange.java	Wed Nov 22 10:15:53 2017 +0000
+++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Exchange.java	Wed Nov 22 11:21:36 2017 +0000
@@ -124,6 +124,16 @@
     }
 
     /**
+     * Called after a redirect or similar kind of retry where a body might
+     * be sent but we don't want it. Should send a RESET in h2. For http/1.1
+     * we can consume small quantity of data, or close the connection in
+     * other cases.
+     */
+    public CompletableFuture<Void> ignoreBody() {
+        return exchImpl.ignoreBody();
+    }
+
+    /**
      * Called when a new exchange is created to replace this exchange.
      * At this point it is guaranteed that readBody/readBodyAsync will
      * not be called.