src/jdk.httpserver/share/classes/sun/net/httpserver/ExchangeImpl.java
changeset 52196 420445d16008
parent 52023 d0c04d180a3b
child 53720 3e451bff6f7f
equal deleted inserted replaced
52195:f08c1d7a5c53 52196:420445d16008
   253             } else {
   253             } else {
   254                 if (contentLen == -1) {
   254                 if (contentLen == -1) {
   255                     noContentToSend = true;
   255                     noContentToSend = true;
   256                     contentLen = 0;
   256                     contentLen = 0;
   257                 }
   257                 }
   258                 if (noContentLengthHeader) {
   258                 if (!noContentLengthHeader) {
   259                     rspHdrs.remove("Content-length");
       
   260                 } else {
       
   261                     rspHdrs.set("Content-length", Long.toString(contentLen));
   259                     rspHdrs.set("Content-length", Long.toString(contentLen));
   262                 }
   260                 }
   263                 o.setWrappedStream (new FixedLengthOutputStream (this, ros, contentLen));
   261                 o.setWrappedStream (new FixedLengthOutputStream (this, ros, contentLen));
   264             }
   262             }
   265         }
   263         }