summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Utility/WebApp.hs16
-rw-r--r--debian/changelog3
-rw-r--r--doc/bugs/Hangs_on_creating_repository_when_using_--listen.mdwn3
-rw-r--r--doc/bugs/Switching_repositories_in_webapp_on_a_remote_server_is_not_honoring_--listen_parameter.mdwn3
4 files changed, 11 insertions, 14 deletions
diff --git a/Utility/WebApp.hs b/Utility/WebApp.hs
index 9d0751502..c9cb32106 100644
--- a/Utility/WebApp.hs
+++ b/Utility/WebApp.hs
@@ -115,13 +115,13 @@ getSocket h = do
use sock
where
#else
- addrs <- getAddrInfo (Just hints) (Just hostname) port
+ addrs <- getAddrInfo (Just hints) (Just hostname) Nothing
case (partition (\a -> addrFamily a == AF_INET) addrs) of
(v4addr:_, _) -> go v4addr
(_, v6addr:_) -> go v6addr
_ -> error "unable to bind to a local socket"
where
- (hostname, port) = maybe (localhost, Nothing) splitHostPort h
+ hostname = fromMaybe localhost h
hints = defaultHints { addrSocketType = Stream }
{- Repeated attempts because bind sometimes fails for an
- unknown reason on OSX. -}
@@ -142,18 +142,6 @@ getSocket h = do
listen sock maxListenQueue
return sock
-{- Splits address:port. For IPv6, use [address]:port. The port is optional. -}
-splitHostPort :: String -> (HostName, Maybe ServiceName)
-splitHostPort s
- | "[" `isPrefixOf` s = let (h, p) = break (== ']') (drop 1 s)
- in if "]:" `isPrefixOf` p
- then (h, Just $ drop 2 p)
- else (h, Nothing)
- | otherwise = let (h, p) = separate (== ':') s
- in if null p
- then (h, Nothing)
- else (h, Just p)
-
{- Checks if debugging is actually enabled. -}
debugEnabled :: IO Bool
debugEnabled = do
diff --git a/debian/changelog b/debian/changelog
index eeac261b8..6d2e25691 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,8 @@
git-annex (5.20140228) UNRELEASED; urgency=medium
+ * webapp: Now supports HTTPS.
+ * webapp: No longer supports a port specified after --listen, since
+ it was buggy, and that use case is better supported by setting up HTTPS.
* Probe for quvi version at run time.
* webapp: Filter out from Switch Repository list any
repositories listed in autostart file that don't have a
diff --git a/doc/bugs/Hangs_on_creating_repository_when_using_--listen.mdwn b/doc/bugs/Hangs_on_creating_repository_when_using_--listen.mdwn
index 913e02cd5..fe0fe80f3 100644
--- a/doc/bugs/Hangs_on_creating_repository_when_using_--listen.mdwn
+++ b/doc/bugs/Hangs_on_creating_repository_when_using_--listen.mdwn
@@ -44,3 +44,6 @@ WebApp crashed: unable to bind to local socket
> to use when something else is already listening there. --[[Joey]]
[[!tag /design/assistant]]
+
+>> --listen no longer accepts a port. Use the new HTTPS support instead.
+>> [[done]] --[[Joey]]
diff --git a/doc/bugs/Switching_repositories_in_webapp_on_a_remote_server_is_not_honoring_--listen_parameter.mdwn b/doc/bugs/Switching_repositories_in_webapp_on_a_remote_server_is_not_honoring_--listen_parameter.mdwn
index 4829cde08..faa7a36de 100644
--- a/doc/bugs/Switching_repositories_in_webapp_on_a_remote_server_is_not_honoring_--listen_parameter.mdwn
+++ b/doc/bugs/Switching_repositories_in_webapp_on_a_remote_server_is_not_honoring_--listen_parameter.mdwn
@@ -19,3 +19,6 @@ I am running my "origin" repositories on a headless server. Managing these with
# End of transcript or log.
"""]]
+
+>> --listen no longer accepts a port. Use the new HTTPS support instead.
+>> [[done]] --[[Joey]]