Java Servlet HttpResponse contentLenght Header
问题 What happen if I do not specify the contentLenght header when I send a HttpResponse containing a zip file. I did some tests and it seems that the header is set by default with the correct file lenght. Can I be sure that this always happens. When I can found some documentation about? this is the most important part of the code: response.setContentType("application/zip"); response.addHeader("Content-disposition", "attachment; filename=" + zipFileName); zos.close(); out.close(); response