wai-extra 3.0.24.0 → 3.0.24.1
raw patch · 3 files changed
+12/−3 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- ChangeLog.md +4/−0
- Network/Wai/Parse.hs +7/−2
- wai-extra.cabal +1/−1
ChangeLog.md view
@@ -1,3 +1,7 @@+## 3.0.24.1++* Fix a "file not found" exception in wai-extra [#705](https://github.com/yesodweb/wai/pull/706)+ ## 3.0.24.0 * Add timeout middleware [#702](https://github.com/yesodweb/wai/pull/702).
Network/Wai/Parse.hs view
@@ -59,10 +59,12 @@ import Data.Function (on, fix) import System.Directory (removeFile, getTemporaryDirectory) import System.IO (hClose, openBinaryTempFile)+import System.IO.Error (isDoesNotExistError) import Network.Wai import qualified Network.HTTP.Types as H import Control.Applicative ((<$>))-import Control.Monad (when, unless)+import Control.Exception (catchJust)+import Control.Monad (when, unless, guard) import Control.Monad.Trans.Resource (allocate, release, register, InternalState, runInternalState) import Data.IORef import Network.HTTP.Types (hContentType)@@ -128,7 +130,7 @@ -> IO FilePath tempFileBackEndOpts getTmpDir pattrn internalState _ _ popper = do (key, (fp, h)) <- flip runInternalState internalState $ allocate it (hClose . snd)- _ <- runInternalState (register $ removeFile fp) internalState+ _ <- runInternalState (register $ removeFileQuiet fp) internalState fix $ \loop -> do bs <- popper unless (S.null bs) $ do@@ -140,6 +142,9 @@ it = do tempDir <- getTmpDir openBinaryTempFile tempDir pattrn+ removeFileQuiet fp = catchJust (guard . isDoesNotExistError)+ (removeFile fp)+ (const $ return ()) -- | A data structure that describes the behavior of -- the parseRequestBodyEx function.
wai-extra.cabal view
@@ -1,5 +1,5 @@ Name: wai-extra-Version: 3.0.24.0+Version: 3.0.24.1 Synopsis: Provides some basic WAI handlers and middleware. description: Provides basic WAI handler and middleware functionality: