src/jdk.httpserver/share/classes/sun/net/httpserver/ExchangeImpl.java
changeset 52196 420445d16008
parent 52023 d0c04d180a3b
child 53720 3e451bff6f7f
--- a/src/jdk.httpserver/share/classes/sun/net/httpserver/ExchangeImpl.java	Thu Oct 18 23:05:01 2018 -0700
+++ b/src/jdk.httpserver/share/classes/sun/net/httpserver/ExchangeImpl.java	Fri Oct 19 14:23:43 2018 +0100
@@ -255,9 +255,7 @@
                     noContentToSend = true;
                     contentLen = 0;
                 }
-                if (noContentLengthHeader) {
-                    rspHdrs.remove("Content-length");
-                } else {
+                if (!noContentLengthHeader) {
                     rspHdrs.set("Content-length", Long.toString(contentLen));
                 }
                 o.setWrappedStream (new FixedLengthOutputStream (this, ros, contentLen));