on master help sign in
Fix file uploads with missing content type
84a1725Michael Snoyman
Network/Wai/Parse.hs+2−1
@@ -261,7 +261,8 @@ parsePieces sink bound src = do
261 let fnBS = S8.pack "filename"
261 let fnBS = S8.pack "filename"
262 return (ct, name, lookup fnBS attrs)
262 return (ct, name, lookup fnBS attrs)
263 case x of
263 case x of
264− Just (Just ct, name, Just filename) -> do
264+ Just (mct, name, Just filename) -> do
265+ let ct = fromMaybe "application/octet-stream" mct
265 seed <- sinkInit sink
266 seed <- sinkInit sink
266 (seed', wasFound, msrc''') <-
267 (seed', wasFound, msrc''') <-
267 sinkTillBound bound src'' (sinkAppend sink) seed
268 sinkTillBound bound src'' (sinkAppend sink) seed
wai-extra.cabal+1−1
@@ -1,5 +1,5 @@
1Name: wai-extra
1Name: wai-extra
2−Version: 0.2.4.1
2+Version: 0.2.4.2
3Synopsis: Provides some basic WAI handlers and middleware.
3Synopsis: Provides some basic WAI handlers and middleware.
4Description: The goal here is to provide common features without many dependencies.
4Description: The goal here is to provide common features without many dependencies.
5License: BSD3
5License: BSD3