summaryrefslogtreecommitdiffhomepage
path: root/SessionID.hs
diff options
context:
space:
mode:
Diffstat (limited to 'SessionID.hs')
-rw-r--r--SessionID.hs8
1 files changed, 2 insertions, 6 deletions
diff --git a/SessionID.hs b/SessionID.hs
index 0a2f339..7592e81 100644
--- a/SessionID.hs
+++ b/SessionID.hs
@@ -18,9 +18,7 @@ import JSON
import System.FilePath
import System.IO
import System.Directory
-import Network.Wai.Handler.Warp (Port)
import Data.List
-import Data.Maybe
import Data.UUID
import Data.UUID.V4
import Network.URI
@@ -79,7 +77,5 @@ withSessionID dir a = do
cleanup hv = hClose =<< atomically (readTVar hv)
go sid hv = a (hv, sid)
-sessionIDUrl :: SessionID -> String -> Port -> URI
-sessionIDUrl (SessionID f) host port =
- fromMaybe (error "internal url parse failure") $ parseURI $
- "http://" ++ host ++ ":" ++ show port ++ "/" ++ f
+sessionIDUrl :: SessionID -> URI -> URI
+sessionIDUrl (SessionID f) serverurl = serverurl { uriPath = f }