test/jdk/java/net/httpclient/HttpServerAdapters.java
branchhttp-client-branch
changeset 56133 be9720a556c7
parent 56128 249a863b0aca
child 56135 e359a2716711
--- a/test/jdk/java/net/httpclient/HttpServerAdapters.java	Thu Feb 15 14:10:27 2018 +0000
+++ b/test/jdk/java/net/httpclient/HttpServerAdapters.java	Thu Feb 15 15:28:17 2018 +0000
@@ -258,6 +258,8 @@
             }
             @Override
             public void sendResponseHeaders(int code, int contentLength) throws IOException {
+                if (contentLength == 0) contentLength = -1;
+                if (contentLength < 0) contentLength = 0;
                 exchange.sendResponseHeaders(code, contentLength);
             }
             void doFilter(Filter.Chain filter) throws IOException {