--- 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));