gziper

package module
v0.0.0-...-25a564a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2018 License: Apache-2.0 Imports: 9 Imported by: 6

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL