gziphandler icon indicating copy to clipboard operation
gziphandler copied to clipboard

Expose acceptsGzip

Open wyattjoh opened this issue 8 years ago • 2 comments

I'd like to use this package with my custom web application wrapper, but I can't match the functionality provided by the NewGzipLevelHandler without the acceptsGzip function exposed: https://github.com/NYTimes/gziphandler/blob/fb3533722e14198abe471546c9798fd556531451/gzip.go#L174

wyattjoh avatar Mar 08 '17 06:03 wyattjoh

I wouldn't be against making acceptsGzip/parseEncodings/parseCoding public, but we should move them to a subpackage if we do so. For the latter two, we might want to consider dropping our impl in favor of gddo/httputil/header.ParseAccept anyway, which would make the former trivial.

adammck avatar Mar 08 '17 15:03 adammck

In general it's hard to use the exported GzipResponseWriter directly because of this issue but also because there's no way to set its options from outside the package.

glasser avatar Mar 20 '18 15:03 glasser