Skip to content

Commit

Permalink
Do not decompress response body
Browse files Browse the repository at this point in the history
Original response headers say that the content is compressed. This
discrepancy confuses the client.
  • Loading branch information
bosu authored and erikd committed Sep 27, 2017
1 parent c136c85 commit 311caeb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Network/HTTP/Proxy.hs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,9 @@ doUpstreamRequest settings mgr respond mwreq
HC.requestBodySourceChunkedIO (sourceRequestBody mwreq)
Wai.KnownLength l ->
HC.requestBodySourceIO (fromIntegral l) (sourceRequestBody mwreq)
, HC.decompress = const True
-- Do not touch response body. Otherwise there may be discrepancy
-- between response headers and the response content.
, HC.decompress = const False
}
handle (respond . errorResponse) $
HC.withResponse hreq mgr $ \res -> do
Expand Down

0 comments on commit 311caeb

Please sign in to comment.