[Haskell-cafe] Decompressing and http-enumerator

Gregory Collins greg at gregorycollins.net
Mon Aug 29 13:21:11 CEST 2011

On Mon, Aug 29, 2011 at 10:08 AM, Michael Snoyman <michael at snoyman.com> wrote:
> Hi all,
> Erik just opened an issue on Github[1] that affected me very recently
> as well when writing some automated Hackage checking code[2]. The
> issue is that http-enumerator sees the content-encoding header and
> decompresses the tarball, returning an uncompressed tarfile. I can
> avoid this with rawBody = False, but that's not a real solution, since
> that also disables chunked response handling.

A web server should not be setting "Content-encoding: gzip" on a
.tar.gz file. I agree that http-enumerator is correctly following the
spec by decompressing.

If you decide to implement a workaround for this, the only reasonable
thing I can think of is adding a "ignoreContentEncoding" knob the user
can twiddle to violate spec.

Gregory Collins <greg at gregorycollins.net>

More information about the Haskell-Cafe mailing list