Fix bug for complete URLs
This commit is contained in:
parent
51eb7d4ba2
commit
04d51bdb4c
@ -460,13 +460,12 @@ setUrl url' = do
|
|||||||
site
|
site
|
||||||
(toTextUrl url')
|
(toTextUrl url')
|
||||||
url <- either (error . show) return eurl
|
url <- either (error . show) return eurl
|
||||||
-- FIXME deal with complete URLs
|
|
||||||
let (urlPath, urlQuery) = T.break (== '?') url
|
let (urlPath, urlQuery) = T.break (== '?') url
|
||||||
ST.modify $ \rbd -> rbd
|
ST.modify $ \rbd -> rbd
|
||||||
{ rbdPath =
|
{ rbdPath =
|
||||||
case DL.filter (/="") $ T.split (== '/') urlPath of
|
case DL.filter (/="") $ T.split (== '/') urlPath of
|
||||||
("http":_:rest) -> rest
|
("http:":_:rest) -> rest
|
||||||
("https":_:rest) -> rest
|
("https:":_:rest) -> rest
|
||||||
x -> x
|
x -> x
|
||||||
, rbdGets = rbdGets rbd ++ H.parseQuery (TE.encodeUtf8 urlQuery)
|
, rbdGets = rbdGets rbd ++ H.parseQuery (TE.encodeUtf8 urlQuery)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user