Skip to content

Commit

Permalink
Fixed an issue where an invalid accept encoding would throw an except…
Browse files Browse the repository at this point in the history
…ion.
  • Loading branch information
niemyjski committed Mar 17, 2015
1 parent 0414183 commit a6c02fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Api/Utility/EncodingDelegatingHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage reques
&& response.RequestMessage.Headers.AcceptEncoding.Count > 0) {
string encodingType = response.RequestMessage.Headers.AcceptEncoding.First().Value;

if (response.Content != null)
if (response.Content != null && (encodingType == "gzip" || encodingType == "deflate"))
response.Content = new CompressedContent(response.Content, encodingType);
}

Expand Down

0 comments on commit a6c02fd

Please sign in to comment.