aboutsummaryrefslogtreecommitdiff
path: root/src/Sproxy
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2016-11-22 00:14:20 +0300
committerIgor Pashev <pashev.igor@gmail.com>2016-11-22 00:14:20 +0300
commitde113108b69b58adc4c9863b712aad3f08ccadac (patch)
tree074c50625e4198357ad22d005f19b5307b37596d /src/Sproxy
parentfcc78798121a0bd51265bb31eb051d1bb79ad9d3 (diff)
downloadsproxy2-de113108b69b58adc4c9863b712aad3f08ccadac.tar.gz
Print original headers from backends
Diffstat (limited to 'src/Sproxy')
-rw-r--r--src/Sproxy/Application.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Sproxy/Application.hs b/src/Sproxy/Application.hs
index 790b07c..5ce847c 100644
--- a/src/Sproxy/Application.hs
+++ b/src/Sproxy/Application.hs
@@ -214,12 +214,12 @@ forward mgr req resp = do
Log.debug $ "BACKEND <<< " ++ msg ++ " " ++ show (BE.requestHeaders beReq)
BE.withResponse beReq mgr $ \res -> do
let status = BE.responseStatus res
- headers = modifyResponseHeaders $ BE.responseHeaders res
+ headers = BE.responseHeaders res
body = mapOutput (Chunk . fromByteString) . bodyReaderSource $ BE.responseBody res
logging = if statusCode status `elem` [ 400, 500 ] then
Log.warn else Log.debug
- logging $ "BACKEND >>> " ++ show (statusCode status) ++ " on " ++ msg ++ "\n"
- resp $ responseSource status headers body
+ logging $ "BACKEND >>> " ++ show (statusCode status) ++ " on " ++ msg ++ " " ++ show headers ++ "\n"
+ resp $ responseSource status (modifyResponseHeaders headers) body
modifyRequestHeaders :: RequestHeaders -> RequestHeaders