wai-extra 3.0.14.1 → 3.0.14.3
raw patch · 4 files changed
+18/−5 lines, 4 files
Files
- ChangeLog.md +8/−0
- Network/Wai/Handler/CGI.hs +4/−0
- Network/Wai/Parse.hs +5/−4
- wai-extra.cabal +1/−1
ChangeLog.md view
@@ -1,3 +1,11 @@+## 3.0.14.3++* Add missing `requestHeaderReferer` and `requestHeaderUserAgent` fields to CGI [yesod#1186](https://github.com/yesodweb/yesod/issues/1186)++## 3.0.14.2++* Case insensitive multipart request header lookup [#518](https://github.com/yesodweb/wai/pull/518)+ ## 3.0.14.1 * Doc update for logStdout and logStdoutDev [#515](https://github.com/yesodweb/wai/issues/515)
Network/Wai/Handler/CGI.hs view
@@ -118,6 +118,10 @@ , requestBodyLength = KnownLength $ fromIntegral contentLength , requestHeaderHost = lookup "host" reqHeaders , requestHeaderRange = lookup hRange reqHeaders+#if MIN_VERSION_wai(3,2,0)+ , requestHeaderReferer = lookup "referer" reqHeaders+ , requestHeaderUserAgent = lookup "user-agent" reqHeaders+#endif } void $ app env $ \res -> case (xsendfile, res) of
Network/Wai/Parse.hs view
@@ -45,6 +45,7 @@ import Control.Monad.Trans.Resource (allocate, release, register, InternalState, runInternalState) import Data.IORef import Network.HTTP.Types (hContentType)+import Data.CaseInsensitive (mk) breakDiscard :: Word8 -> S.ByteString -> (S.ByteString, S.ByteString) breakDiscard w s =@@ -94,7 +95,7 @@ tempFileBackEnd :: InternalState -> ignored1 -> ignored2 -> IO S.ByteString -> IO FilePath tempFileBackEnd = tempFileBackEndOpts getTemporaryDirectory "webenc.buf" --- | Same as 'tempFileSink', but use configurable temp folders and patterns.+-- | Same as 'tempFileBackEnd', but use configurable temp folders and patterns. tempFileBackEndOpts :: IO FilePath -- ^ get temporary directory -> String -- ^ filename pattern -> InternalState@@ -300,11 +301,11 @@ (wasFound, ()) <- sinkTillBound bound iter seed src when wasFound (loop src) where- contDisp = S8.pack "Content-Disposition"- contType = S8.pack "Content-Type"+ contDisp = mk $ S8.pack "Content-Disposition"+ contType = mk $ S8.pack "Content-Type" parsePair s = let (x, y) = breakDiscard 58 s -- colon- in (x, S.dropWhile (== 32) y) -- space+ in (mk $ x, S.dropWhile (== 32) y) -- space data Bound = FoundBound S.ByteString S.ByteString | NoBound
wai-extra.cabal view
@@ -1,5 +1,5 @@ Name: wai-extra-Version: 3.0.14.1+Version: 3.0.14.3 Synopsis: Provides some basic WAI handlers and middleware. description: Provides basic WAI handler and middleware functionality: