soup-message-io: Use GConverterInputStream for content-decoding
authorDan Winship <danw@gnome.org>
Thu, 23 Dec 2010 20:57:24 +0000 (15:57 -0500)
committerDan Winship <danw@gnome.org>
Wed, 18 Apr 2012 01:26:17 +0000 (21:26 -0400)
commita1ee9acd68e6be9dca4ce3796d8d99ca17e4d5ba
treed680f01cec97ab42d5d15448ce09a1cdf93d2fb1
parentc0414594616131e082e87b78b41542be6785158a
soup-message-io: Use GConverterInputStream for content-decoding

Decode Content-Encodings by wrapping a GConverterInputStream around
the SoupBodyInputStream.

Because we want to be able to fall back to passing data through
undecoded in the case that decoding fails, we need to use a GConverter
wrapper (SoupConverterWrapper) that implements that.

The old soup-message-io code was automatically stopping decompression
when it reached the end of the response body, without checking that
the compressed data was actually whole at that point. Fix that.
However, this breaks the previous hack used for the zlib-to-raw
fallback, since the raw data won't have a checksum at the end.
So do that differently now.
libsoup/Makefile.am
libsoup/soup-content-decoder.c
libsoup/soup-converter-wrapper.c [new file with mode: 0644]
libsoup/soup-converter-wrapper.h [new file with mode: 0644]
libsoup/soup-message-io.c
po/POTFILES.in