on master help sign in
Fix file uploads with missing content type
commit84a17256c6819a084d53064926e7cc904485d72e authorMichael Snoyman <michael@snoyman.com> dateWed 24 Nov 2010, 21:13 (16 years ago) parent81819a4
2 files changed+3−2
Network/Wai/Parse.hs+2−1 wai-extra.cabal+1−1
Network/Wai/Parse.hs+2−1
@@ -261,7 +261,8 @@ parsePieces sink bound src = do
261261 let fnBS = S8.pack "filename"
262262 return (ct, name, lookup fnBS attrs)
263263 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
265266 seed <- sinkInit sink
266267 (seed', wasFound, msrc''') <-
267268 sinkTillBound bound src'' (sinkAppend sink) seed
wai-extra.cabal+1−1
@@ -1,5 +1,5 @@
11Name: wai-extra
2−Version: 0.2.4.1
2+Version: 0.2.4.2
33Synopsis: Provides some basic WAI handlers and middleware.
44Description: The goal here is to provide common features without many dependencies.
55License: BSD3