packages feed

wai-app-static 3.1.7.1 → 3.1.7.2

raw patch · 7 files changed

+27/−13 lines, 7 filesdep ~basedep ~wai-extraPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base, wai-extra

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -1,5 +1,9 @@ # wai-app-static changelog +## 3.1.7.2++* optparse-applicative 0.16.0.0 support+ ## 3.1.7.1  * Update the test suite too
Network/Wai/Application/Static.hs view
@@ -164,11 +164,13 @@             -- Didn't match, but we have a hash value. Send the file contents             -- with an ETag header.             ---            -- Note: It would be arguably better to next check-            -- if-modified-since and return a 304 if that indicates a match as-            -- well. However, the circumstances under which such a situation-            -- could arise would be very anomalous, and should likely warrant a-            -- new file being sent anyway.+            -- RFC7232 (HTTP 1.1):+            -- > A recipient MUST ignore If-Modified-Since if the request contains an+            -- > If-None-Match header field; the condition in If-None-Match is+            -- > considered to be a more accurate replacement for the condition in+            -- > If-Modified-Since, and the two are only combined for the sake of+            -- > interoperating with older intermediaries that might not implement+            -- > If-None-Match.             (Just hash, _) -> respond [("ETag", hash)]              -- No hash value available, fall back to last modified support.@@ -243,7 +245,7 @@     response :: StaticResponse -> IO W.ResponseReceived     response (FileResponse file ch) = do         mimetype <- ssGetMimeType ss file-        let filesize = fileGetSize file+        -- let filesize = fileGetSize file         let headers = ("Content-Type", mimetype)                     -- Let Warp provide the content-length, since it takes                     -- range requests into account
WaiAppStatic/CmdLine.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE DeriveDataTypeable, RecordWildCards #-}+{-# LANGUAGE DeriveDataTypeable, RecordWildCards, CPP #-} -- | Command line version of wai-app-static, used for the warp-static server. module WaiAppStatic.CmdLine     ( runCommandLine@@ -39,6 +39,7 @@     }  #if MIN_VERSION_optparse_applicative(0, 10, 0)+option' :: Mod OptionFields Int -> Parser Int option' = option auto #else option' = option@@ -113,5 +114,9 @@     where       helperOption :: Parser (a -> a)       helperOption =+#if MIN_VERSION_optparse_applicative(0,16,0)+        abortOption (ShowHelpText Nothing) $+#else         abortOption ShowHelpText $+#endif         mconcat [long "help", help "Show this help text", hidden]
WaiAppStatic/Listing.hs view
@@ -64,7 +64,7 @@      -- Add a link to the root of the tree     showFolder' :: Bool -> Pieces -> H.Html-    showFolder' hasTrailingSlash pieces  = showFolder hasTrailingSlash (unsafeToPiece "root" : pieces)+    showFolder' hasTrailingSlash pieces' = showFolder hasTrailingSlash (unsafeToPiece "root" : pieces')      showFolder :: Bool -> Pieces -> H.Html     showFolder _ [] = "/" -- won't happen
WaiAppStatic/Storage/Embedded/TH.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE TemplateHaskell, QuasiQuotes, OverloadedStrings, MagicHash #-}+{-# LANGUAGE TemplateHaskell, QuasiQuotes, OverloadedStrings, MagicHash, CPP #-} module WaiAppStatic.Storage.Embedded.TH(     Etag   , EmbeddableEntry(..)@@ -7,7 +7,6 @@  import Data.ByteString.Builder.Extra (byteStringInsert) import Codec.Compression.GZip (compress)-import Control.Applicative import Data.ByteString.Unsafe (unsafePackAddressLen) import Data.Either (lefts, rights) import GHC.Exts (Int(..))
WaiAppStatic/Types.hs view
@@ -59,6 +59,8 @@ toPieces = mapM toPiece  -- | Request coming from a user. Corresponds to @pathInfo@.+--+-- The root path is the empty list. type Pieces = [Piece]  -- | Values for the max-age component of the cache-control response header.
wai-app-static.cabal view
@@ -1,5 +1,5 @@ name:            wai-app-static-version:         3.1.7.1+version:         3.1.7.2 license:         MIT license-file:    LICENSE author:          Michael Snoyman <michael@snoyman.com>@@ -8,7 +8,7 @@ description:     API docs and the README are available at <http://www.stackage.org/package/wai-app-static>. category:        Web, Yesod stability:       Stable-cabal-version:   >= 1.8+cabal-version:   >= 1.10 build-type:      Simple homepage:        http://www.yesodweb.com/book/web-application-interface Extra-source-files:@@ -25,6 +25,7 @@     Default:       False  library+    default-language: Haskell2010     build-depends:   base                      >= 4        && < 5                    , wai                       >= 3.0      && < 3.3                    , bytestring                >= 0.10.4@@ -61,12 +62,12 @@                      WaiAppStatic.Storage.Embedded.Runtime                      WaiAppStatic.Storage.Embedded.TH     ghc-options:     -Wall-    extensions:     CPP      if flag(print)       cpp-options:  -DPRINT  Executable warp+  default-language: Haskell2010   Main-is:        warp-static.hs   hs-source-dirs: app   Build-depends: base            >= 4                  && < 5@@ -78,6 +79,7 @@                , mime-types      >= 0.1                && < 0.2  test-suite runtests+    default-language: Haskell2010     hs-source-dirs: test     main-is: ../tests.hs     type: exitcode-stdio-1.0