Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Gziper ¶
func Gziper() macaron.Handler
Gzip middleware inspired by https://github.com/go-macaron/gzip
The main difference is that this middleware will only compress the body if it is not already compressed (content-type header already set to gzip).
This usecase is needed when requests are conditionally proxied and the proxy response may or may not already be compressed.
Types ¶
type WriterPool ¶
type WriterPool struct {
// contains filtered or unexported fields
}
func NewWriterPool ¶
func NewWriterPool() *WriterPool
func (*WriterPool) Get ¶
func (wp *WriterPool) Get(rw macaron.ResponseWriter) *gzip.Writer
func (*WriterPool) Put ¶
func (wp *WriterPool) Put(w *gzip.Writer)
Click to show internal directories.
Click to hide internal directories.