src/java.net.http/share/classes/jdk/internal/net/http/ExchangeImpl.java
changeset 53300 54aa3ea04fe8
parent 52554 5f1ca46703f9
child 55022 9785b9fb328e
--- a/src/java.net.http/share/classes/jdk/internal/net/http/ExchangeImpl.java	Tue Jan 15 08:03:30 2019 +0100
+++ b/src/java.net.http/share/classes/jdk/internal/net/http/ExchangeImpl.java	Tue Jan 15 11:34:20 2019 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -161,6 +161,12 @@
         }
     }
 
+    // Called for 204 response - when no body is permitted
+    void nullBody(HttpResponse<T> resp, Throwable t) {
+        // only needed for HTTP/1.1 to close the connection
+        // or return it to the pool
+    }
+
     /* The following methods have separate HTTP/1.1 and HTTP/2 implementations */
 
     abstract CompletableFuture<ExchangeImpl<T>> sendHeadersAsync();
@@ -177,6 +183,7 @@
      */
     abstract CompletableFuture<Void> ignoreBody();
 
+
     /** Gets the response headers. Completes before body is read. */
     abstract CompletableFuture<Response> getResponseAsync(Executor executor);