mirror of
https://github.com/commercialhaskell/stackage-server.git
synced 2026-01-12 12:18:29 +01:00
14 lines
459 B
Haskell
14 lines
459 B
Haskell
module Handler.HackageViewIndex where
|
|
|
|
import Import
|
|
import Data.BlobStore
|
|
|
|
getHackageViewIndexR :: HackageView -> Handler TypedContent
|
|
getHackageViewIndexR viewName = do
|
|
msrc <- storeRead $ HackageViewIndex viewName
|
|
case msrc of
|
|
Nothing -> notFound
|
|
Just src -> do
|
|
addHeader "content-disposition" "attachment; filename=\"00-index.tar.gz\""
|
|
respondSource "application/x-gzip" $ mapOutput (Chunk . toBuilder) src
|