Documentation ¶
Index ¶
Constants ¶
const ( Identity flateType = iota Deflate Gzip )
const DefaultQValue = 1.0
The default qvalue to assign to an encoding if no explicit qvalue is set. This is actually kind of ambiguous in RFC 2616, so hopefully it's correct. The examples seem to indicate that it is.
Variables ¶
var ErrEmptyContentCoding = errors.New("Empty Accept-Encoding")
ErrEmptyContentCoding indicates that the Accept-Encoding header was empty.
var ErrUnHijackable = errors.New("A(n) underlying ResponseWriter doesn't support the http.Hijacker interface")
ErrUnHijackable indicates an unhijackable connection. I.e., (one of) the underlying http.ResponseWriter(s) doesn't support the http.Hijacker interface.
Functions ¶
Types ¶
type CompressedResponseWriter ¶
type CompressedResponseWriter struct { io.Writer http.ResponseWriter }
CompressedResponseWriter provides an http.ResponseWriter interface, which compresses bytes before writing them to the underlying response. This doesn't set the Content-Encoding header, nor close the writers, so don't forget to do that.
func (CompressedResponseWriter) Hijack ¶
func (c CompressedResponseWriter) Hijack() (rwc net.Conn, buf *bufio.ReadWriter, err error)
Hijack implements the http.Hijacker interface to allow connection hijacking.
type ErrorList ¶
type ErrorList []KeyError // Slice of returned errors
ErrorList is a slice of KeyErrors that allows individual errors to be extracted.