From 5d3e80aeec03af9a5b271757e31a802d8fcb3eeb Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 30 Apr 2017 19:28:15 -0400 Subject: add --use-server option for user --- SessionID.hs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'SessionID.hs') 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 } -- cgit v1.2.3