Package httpencoding provides a function to deal with the Accept-Encoding header.
ClearEncoding removes the Accept-Encoding header so that any further attempts to establish an encoding will simply used the default, plain text, encoding.
Useful when you don't want a handler down the chain to also handle encoding
HandleEncoding will process the Accept-Encoding header and calls the given handler for each encoding until the handler returns true.
For the identity (plain text) encoding the encoding string will be the empty string.
The wildcard encoding (*) is currently treated as identity when there is no independent identity encoding specified; otherwise, it is ignored.
InvalidEncoding writes the 406 header
Encoding represents an encoding string as used by the client. Examples are gzip, br and deflate.
Handler provides an interface to handle an encoding.
The encoding string (e.g. gzip, br, deflate) is passed to the handler, which is expected to return true if no more encodings are required and false otherwise.
The empty string "" is used to signify the identity encoding, or plain text
HandlerFunc wraps a func to make it satisfy the Handler interface
Handle calls the underlying func