summaryrefslogtreecommitdiff
path: root/Utility/Url.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-02-16 00:41:30 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-02-16 00:44:51 -0400
commita1e52f0ce5984058c737ed709fc5d4b6398e019a (patch)
treebaaeb46b5eb5e7edb4a8a4ef80d6c1ab256bbcba /Utility/Url.hs
parente7aaa55c53fb54c6dd5a1a1aeb0955b05227676b (diff)
hlint
Diffstat (limited to 'Utility/Url.hs')
-rw-r--r--Utility/Url.hs17
1 files changed, 8 insertions, 9 deletions
diff --git a/Utility/Url.hs b/Utility/Url.hs
index dfdebaf06..8a43cf788 100644
--- a/Utility/Url.hs
+++ b/Utility/Url.hs
@@ -108,12 +108,11 @@ request url requesttype = go 5 url
(3,0,x) | x /= 5 -> redir (n - 1) u rsp
_ -> return rsp
ignore = const $ return ()
- redir n u rsp = do
- case retrieveHeaders HdrLocation rsp of
- [] -> return rsp
- (Header _ newu:_) ->
- case parseURIReference newu of
- Nothing -> return rsp
- Just newURI -> go n newURI_abs
- where
- newURI_abs = fromMaybe newURI (newURI `relativeTo` u)
+ redir n u rsp = case retrieveHeaders HdrLocation rsp of
+ [] -> return rsp
+ (Header _ newu:_) ->
+ case parseURIReference newu of
+ Nothing -> return rsp
+ Just newURI -> go n newURI_abs
+ where
+ newURI_abs = fromMaybe newURI (newURI `relativeTo` u)