diff --git a/Network/Wai/Middleware/Gzip.hs b/Network/Wai/Middleware/Gzip.hs
--- a/Network/Wai/Middleware/Gzip.hs
+++ b/Network/Wai/Middleware/Gzip.hs
@@ -55,7 +55,10 @@
     f' s hs =
         joinI $ compress $$ f s hs'
       where
-        hs' = ("Content-Encoding", "gzip") : hs
+        -- Remove Content-Length header, since we will certainly have a
+        -- different length after gzip compression.
+        hs' = ("Content-Encoding", "gzip") : filter notLength hs
+        notLength (x, _) = x /= "content-length"
 
 splitCommas :: String -> [String]
 splitCommas [] = []
diff --git a/Network/Wai/Parse.hs b/Network/Wai/Parse.hs
--- a/Network/Wai/Parse.hs
+++ b/Network/Wai/Parse.hs
@@ -164,18 +164,27 @@
             bs <- E.consume
             return (parseQueryString $ S.concat bs, [])
         Just (Just bound) -> -- multi-part
-            let bound' = S8.pack "--" `S.append` bound
-             in parsePieces sink bound'
+            let bound'' = S8.pack "--" `S.append` bound
+             in parsePieces sink bound''
   where
     urlenc = S8.pack "application/x-www-form-urlencoded"
-    formBound = S8.pack "multipart/form-data; boundary="
+    formBound = S8.pack "multipart/form-data;"
+    bound' = "boundary="
+    boundary s =
+        if "multipart/form-data;" `S.isPrefixOf` s
+            then
+                let s' = S.dropWhile (== 32) $ S.drop (S.length formBound) s
+                 in if bound' `S.isPrefixOf` s'
+                        then Just $ S.drop (S.length bound') s'
+                        else Nothing
+            else Nothing
     ctype = do
       ctype' <- lookup "Content-Type" $ requestHeaders req
       if urlenc `S.isPrefixOf` ctype'
           then Just Nothing
-          else if formBound `S.isPrefixOf` ctype'
-                  then Just $ Just $ S.drop (S.length formBound) ctype'
-                  else Nothing
+          else case boundary ctype' of
+                Just x -> Just $ Just x
+                Nothing -> Nothing
 
 takeLine :: Iteratee S.ByteString IO (Maybe S.ByteString)
 takeLine = do
diff --git a/wai-extra.cabal b/wai-extra.cabal
--- a/wai-extra.cabal
+++ b/wai-extra.cabal
@@ -1,5 +1,5 @@
 Name:                wai-extra
-Version:             0.3.2
+Version:             0.3.2.1
 Synopsis:            Provides some basic WAI handlers and middleware.
 Description:         The goal here is to provide common features without many dependencies.
 License:             BSD3
