Re-support gzip

This commit is contained in:
Manish Goregaokar 2016-06-06 13:20:11 +05:30
parent 909b99f1a6
commit f4e3e8e38e
2 changed files with 39 additions and 28 deletions

View file

@ -540,7 +540,7 @@ impl StreamedResponse {
StreamedResponse { metadata: m, decoder: d }
}
fn from_http_response(response: Box<HttpResponse>, m: Metadata) -> Result<StreamedResponse, LoadError> {
pub fn from_http_response(response: Box<HttpResponse>, m: Metadata) -> Result<StreamedResponse, LoadError> {
let decoder = match response.content_encoding() {
Some(Encoding::Gzip) => {
let result = GzDecoder::new(response);