From 36eeec6b17d08285ab7bb7e670ab528830d59478 Mon Sep 17 00:00:00 2001 From: Joe Nelson Date: Fri, 17 Oct 2014 18:16:10 -0700 Subject: [PATCH] Retry the sandbox curl on travis as needed --- .travis.yml | 2 +- src/Middleware.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 49eb489c7..e61841843 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ before_install: - travis_retry sudo apt-get install --force-yes happy-1.19.3 alex-3.1.3 - export PATH=/opt/alex/3.1.3/bin:/opt/happy/1.19.3/bin:$PATH install: - - curl http://bin.begriffs.com/dbapi/cabal-sandbox.tar.xz | tar xJ + - travis_retry curl http://bin.begriffs.com/dbapi/cabal-sandbox.tar.xz | tar xJ - chmod a+x .cabal-sandbox/bin/* - cabal sandbox init - cabal install --enable-test --dependencies-only diff --git a/src/Middleware.hs b/src/Middleware.hs index 4bda46048..092cc3e09 100644 --- a/src/Middleware.hs +++ b/src/Middleware.hs @@ -42,7 +42,7 @@ withSavepoint app conn req respond = do catch (app conn req respond) (\e -> let _ = (e::SomeException) in runRaw conn "rollback to savepoint req_sp" >> throw e) -authenticated :: BS.ByteString -> Connection -> Application -> +authenticated :: BS.ByteString -> (Connection -> Application) -> Connection -> Application authenticated anon app conn req respond = do attempt <- httpRequesterRole (requestHeaders req)