Commit graph

25 commits

Author SHA1 Message Date
Joey Hess
01ce6849de use clientSessionBackend2 where available
avoids a warning, which says it's faster
2013-03-10 16:02:16 -04:00
Joey Hess
56830af8d8 simpler use of MIN_VERSION checks 2013-03-10 15:43:17 -04:00
Joey Hess
3e32bb41f6 webapp: Work around bug in Warp's slowloris attack prevention code, that caused regular browsers to stall when they reuse a connection after leaving it idle for 30 seconds. (See https://github.com/yesodweb/wai/issues/146) 2013-03-09 14:57:48 -04:00
Joey Hess
d7ca6fb856 webapp: Now always logs to .git/annex/daemon.log
It used to not log to daemon.log when a repository was first created, and
when starting the webapp. Now both do. Redirecting stdout and stderr to the
log is tricky when starting the webapp, because the web browser may want to
communicate with the user. (Either a console web browser, or web.browser = echo)
This is handled by restoring the original fds when running the browser.
2013-01-15 13:34:59 -04:00
Joey Hess
6f7ae84650 webapp: Use IP address, rather than localhost
since some systems may have configuration problems or other issues that
prevent web browsers from connecting to the right localhost IP for the
webapp.

Tested on both ipv4 and ipv6 localhost. Url for the latter looks like:
http://[::1]:50676
2013-01-09 23:18:00 -04:00
Joey Hess
bad9b6761d restart UI
Browser behavior is not ideal; a new tab is opened on restart.
Browsers won't let me redirect to a file:// so I cannot use the old tab.
2013-01-03 18:50:30 -04:00
Joey Hess
f87a781aa6 finished where indentation changes 2012-12-13 00:24:19 -04:00
Joey Hess
2525fefbb9 The standalone builds now unset their special path and library path variables before running the system web browser.
Should fix a crash reported on OSX.
2012-11-27 17:05:29 -04:00
Joey Hess
3af1984ed2 fix warning seen on OSX, apparently something there defines a close 2012-11-07 14:56:32 -04:00
Joey Hess
0ccfb3bbb2 let's not -DOSX, that results in unwanted mangling 2012-09-29 14:49:15 -04:00
Joey Hess
fe3009d83b retry bind
This is a workaround for bind failing with EINVAL sometimes on OSX.
I don't know why; EVINAL should mean the socket is already bound to an
address, but this is with a new socket.
2012-09-27 12:23:27 -04:00
Joey Hess
467844d7d3 prefer ipv4 localhost when both are available
The webapp can only run on one of ipv4 and ipv6, no both. Some web browsers
may not support ipv6, so ipv4 is the safe choice.

The actual problem I ran into with it only listening to ipv6 was that
Utility.Url.exists was failing to connect to it. I doubt that haskell's
HTTP library is ipv4 only. More likely, it was only trying one address,
and tried ipv4 first.
2012-09-18 17:19:41 -04:00
Joey Hess
faf3faa79d import yesod qualified
To avoid conflict with different liftIO from MonadIO (in some version of
yesod not the one I have here), and because it's generally clearer, since
this module has both Wai and Yesod stuff, to qualify them both.
2012-08-30 13:05:39 -04:00
Joey Hess
be310ac4d0 support building with yesod-default 1.1.0
Old 1.0.1 version is still supported as well. Cabal autodetects
which version is available, but in the Makefile, WITH_OLD_YESOD
has to be configured appropriately.

I have not squashed all the $newline warnings with the new Yesod.
They should go away eventually anyway as Yesod moves past that transition.
2012-08-09 13:33:04 -04:00
Joey Hess
ac71ab7bd7 avoid head 2012-08-05 15:10:26 -04:00
Joey Hess
ea05ba893c fix the auto token leak on auth error page issue permanantly 2012-07-29 12:12:14 -04:00
Joey Hess
02ec8ea012 much better webapp startup of the assistant
This avoids forking another process, avoids polling, fixes a race,
and avoids a rare forkProcess thread hang that I saw once time
when starting the webapp.
2012-07-27 15:33:24 -04:00
Joey Hess
c93b546ebd remove bogus AI_NUMERICSERV
Not needed, and causes a segfault on OSX when it tries to dereference the
NULL servicename. (Linux handles this case better.)
2012-07-27 14:06:06 -04:00
Joey Hess
2f775ef3e3 fix OSX open call 2012-07-26 12:59:40 -04:00
Joey Hess
95f4b192f0 on second thought, the session cookie is still useful to support setMessage 2012-07-26 12:41:20 -04:00
Joey Hess
cccdb44874 git annex webapp --force forces a restart of the daemon
Useful for testing..
2012-07-26 11:52:49 -04:00
Joey Hess
6cecc26206 update build deps 2012-07-26 05:13:27 -04:00
Joey Hess
9d6b59d0e2 use the secret token for authentication, and add to all dynamic urls 2012-07-26 04:50:09 -04:00
Joey Hess
b36804d648 generate random token and launch webapp using it 2012-07-26 03:38:20 -04:00
Joey Hess
32d3cffc4c run yesod, and launch webapp on startup 2012-07-25 21:26:13 -04:00