From 01b86d368cd0b3ebe99beb6509276af68c17e6ba Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Wed, 19 Nov 2014 09:36:16 +0200 Subject: [PATCH] Move to some newly added upstream functions --- Handler/StackageIndex.hs | 20 -------------------- README.md | 2 +- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/Handler/StackageIndex.hs b/Handler/StackageIndex.hs index d658287..0e95139 100644 --- a/Handler/StackageIndex.hs +++ b/Handler/StackageIndex.hs @@ -13,28 +13,8 @@ getStackageIndexR ident = do setEtag $ toPathPiece ident addHeader "content-disposition" "attachment; filename=\"00-index.tar.gz\"" neverExpires - cacheSeconds 31536000 respondSource "application/x-gzip" $ mapOutput (Chunk . toBuilder) src --- FIXME BEGIN: move into yesod-core - --- | Send a 304 not modified response immediately. This is a short-circuiting --- action. -notModified :: MonadHandler m => m a -notModified = sendWaiResponse $ responseBuilder status304 [] mempty - --- | Check the if-none-match header and, if it matches the given value, return --- a 304 not modified response. Otherwise, set the etag header to the given --- value. -setEtag :: MonadHandler m => Text -> m () -setEtag etag = do - mmatch <- lookupHeader "if-none-match" - case mmatch of - Just x | encodeUtf8 etag == x -> notModified - _ -> addHeader "etag" etag - --- FIXME END: move into yesod-core - getStackageBundleR :: PackageSetIdent -> Handler TypedContent getStackageBundleR ident = do msrc <- storeRead $ SnapshotBundle ident diff --git a/README.md b/README.md index 324914d..9283cf7 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Server for stable, curated Haskell package sets Code builds with the Stackage snapshot: - remote-repo: stackage-e36ddac9333f2197ada6883b52f4834ddc0d5e37:http://www.stackage.org/stackage/e36ddac9333f2197ada6883b52f4834ddc0d5e37 + remote-repo: stackage-35ecbe20461b5fe50bad1e5653f6660132861fe9:http://www.stackage.org/stackage/35ecbe20461b5fe50bad1e5653f6660132861fe9 Inside the config directory, there are two files ending in `-sample`. They should be copied to remove the `-sample` suffix for the site to work. We do it