Skip to content

Commit

Permalink
Do not strip "set-cookie" headers from responses
Browse files Browse the repository at this point in the history
Fixes a bug that was introduced in commit 99d7356 that causes all
"set-cookie" headers to be removed from responses unless `redirectCount`
is set to zero.
  • Loading branch information
hallettj authored and Jesse Hallett committed Feb 21, 2012
1 parent 7929ac3 commit 59ad968
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Network/HTTP/Conduit.hs
Expand Up @@ -179,8 +179,8 @@ http req0 manager = do
go count req'' cookie_jar'' = do
now <- liftIO $ getCurrentTime
let (req', cookie_jar') = insertCookiesIntoRequest req'' (evictExpiredCookies cookie_jar'' now) now
res' <- httpRaw req' manager
let (cookie_jar, res) = updateCookieJar res' req' now cookie_jar'
res <- httpRaw req' manager
let (cookie_jar, _) = updateCookieJar res req' now cookie_jar'
case getRedirectedRequest req' (responseHeaders res) (W.statusCode (statusCode res)) of
Just req -> go (count - 1) req cookie_jar
Nothing -> return res
Expand Down

0 comments on commit 59ad968

Please sign in to comment.