summaryrefslogtreecommitdiffhomepage
path: root/SessionID.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2017-04-30 19:28:15 -0400
committerJoey Hess <joeyh@joeyh.name>2017-04-30 19:28:15 -0400
commit5d3e80aeec03af9a5b271757e31a802d8fcb3eeb (patch)
treef490f691fa1d77b07130dacbda5853eaee3df54b /SessionID.hs
parent1a360fda8bd9fcf29ebb7c8b581a670045c46495 (diff)
downloaddebug-me-5d3e80aeec03af9a5b271757e31a802d8fcb3eeb.tar.gz
add --use-server option for user
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 }