[SOLVED] Jetty is not sending the Content-Length header

Issue I have a servlet in embedded Jetty that provides downloads for certain files. The code I use is the following: try{ File file = new File(filePath); response.setContentLengthLong(file.length()); response.setHeader("Content-Disposition", "attachment; filename=myfilename.mkv"); response.setContentType(Files.probeContentType(file.toPath())); response.setBufferSize(5242880); in = new FileInputStream(file); out = response.getOutputStream();

Continue reading