Sendfile for Tomcat, Apache, Nginx

  • Tags : /
  • Latest : 0.2
  • Last Updated: 11 August 2011
  • Grails version : 2.0.0 > *
  • Authors : Vitalii Samolovskikh aka Kefir
0 vote
Dependency :
compile ":sendfile:0.2"

Documentation

Summary

Allow to use senfile or X-sendfile functionality of web-servers.

Description

Any controller with sendFileService injected receives an additional set of sendFile methods.
  • sendFile(File file, Map params=: (+))
  • sendFile(String path, Map params=: (+))
  • sendFile(byte (+) content, Map params=: (+))
  • sendFile(InputStream is, Map params=: (+))
  • sendFile(ByteBuffer content, Map params=: (+))
  • sendFile(ReadableByteChannel channel, Map params=: (+))
To enable X-sendfile support set one of the following configuration options
  • grails.plugins.sendfile.nginx = true
  • grails.plugins.sendfile.apache = true
  • grails.plugins.sendfile.tomcat = true