0

I am trying to sendFiles by APR module of tomcat as described in https://tomcat.apache.org/tomcat-8.5-doc/aio.html It works really well for relatively large files(videos, large pdfs etc). However it is unable to send small files(30-40 KB). It does not seem like a mime type issue because I have tested it with txt files. 30KB txt files could not be sent whereas 10MB txts are just fine.

request.setAttribute("org.apache.tomcat.sendfile.filename", filepath.toAbsolutePath().toString());
request.setAttribute("org.apache.tomcat.sendfile.start", 0);
request.setAttribute("org.apache.tomcat.sendfile.end",Files.size(filepath));

Am I missing somekind of configuration?

kundante
  • 2,100
  • 2
  • 16
  • 20

0 Answers0