diff --git a/ChangeLog.md b/ChangeLog.md
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,3 +1,8 @@
+## 3.0.22.0
+
+* Support for streaming-commons 0.2
+* Support for resourcet 1.2
+
 ## 3.0.21.0
 
 * Export `Network.Wai.Parse.noLimitParseRequestBodyOptions` [#662](https://github.com/yesodweb/wai/pull/662).
diff --git a/Network/Wai/Handler/CGI.hs b/Network/Wai/Handler/CGI.hs
--- a/Network/Wai/Handler/CGI.hs
+++ b/Network/Wai/Handler/CGI.hs
@@ -29,7 +29,13 @@
 #if __GLASGOW_HASKELL__ < 710
 import Data.Monoid (mconcat, mempty, mappend)
 #endif
+
+#if MIN_VERSION_streaming_commons(0, 2, 0)
+import qualified Data.Streaming.ByteString.Builder as Blaze
+#else
 import qualified Data.Streaming.Blaze as Blaze
+#endif
+
 import Data.Function (fix)
 import Control.Monad (unless, void)
 
@@ -130,7 +136,11 @@
                 return ResponseReceived
             _ -> do
                 let (s, hs, wb) = responseToStream res
+#if MIN_VERSION_streaming_commons(0, 2, 0)
+                (blazeRecv, blazeFinish) <- Blaze.newBuilderRecv Blaze.defaultStrategy
+#else
                 (blazeRecv, blazeFinish) <- Blaze.newBlazeRecv Blaze.defaultStrategy
+#endif
                 wb $ \b -> do
                     let sendBuilder builder = do
                             popper <- blazeRecv builder
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
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
 {-# LANGUAGE Rank2Types, ScopedTypeVariables #-}
 ---------------------------------------------------------
 -- |
@@ -35,7 +36,11 @@
 import qualified Data.Set as Set
 import Network.Wai.Header
 import Network.Wai.Internal
+#if MIN_VERSION_streaming_commons(0, 2, 0)
+import qualified Data.Streaming.ByteString.Builder as B
+#else
 import qualified Data.Streaming.Blaze as B
+#endif
 import qualified Data.Streaming.Zlib as Z
 import qualified Blaze.ByteString.Builder as Blaze
 import Control.Monad (unless)
@@ -69,7 +74,7 @@
     def = GzipSettings GzipIgnore defaultCheckMime
 
 -- | MIME types that will be compressed by default:
--- @text/*@, @application/json@, @application/javascript@,
+-- @text/@ @*@, @application/json@, @application/javascript@,
 -- @application/ecmascript@, @image/x-icon@.
 defaultCheckMime :: S.ByteString -> Bool
 defaultCheckMime bs =
@@ -101,8 +106,8 @@
                                  let
                                     compressedVersion = file ++ ".gz"
                                  in
-                                    doesFileExist compressedVersion >>= \x ->
-                                       if x
+                                    doesFileExist compressedVersion >>= \y ->
+                                       if y
                                          then (sendResponse $ ResponseFile s (fixHeaders hs) compressedVersion Nothing)
                                          else (runAction (ResponseFile s hs file Nothing, nextAction))
                             (ResponseFile s hs file Nothing, GzipCacheFolder cache) ->
@@ -182,7 +187,11 @@
         Just m | gzipCheckMime set m ->
             let hs' = fixHeaders hs
              in wb $ \body -> sendResponse $ responseStream s hs' $ \sendChunk flush -> do
+#if MIN_VERSION_streaming_commons(0, 2, 0)
+                    (blazeRecv, _) <- B.newBuilderRecv B.defaultStrategy
+#else
                     (blazeRecv, _) <- B.newBlazeRecv B.defaultStrategy
+#endif
                     deflate <- Z.initDeflate 1 (Z.WindowBits 31)
                     let sendBuilder builder = do
                             popper <- blazeRecv builder
diff --git a/Network/Wai/Middleware/RequestLogger.hs b/Network/Wai/Middleware/RequestLogger.hs
--- a/Network/Wai/Middleware/RequestLogger.hs
+++ b/Network/Wai/Middleware/RequestLogger.hs
@@ -22,7 +22,7 @@
 import System.IO (Handle, hFlush, stdout)
 import qualified Blaze.ByteString.Builder as B
 import qualified Data.ByteString as BS
-import Data.ByteString.Char8 (pack, unpack)
+import Data.ByteString.Char8 (pack)
 import Control.Monad (when)
 import Control.Monad.IO.Class (liftIO)
 import Network.Wai
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:             3.0.21.0
+Version:             3.0.22.0
 Synopsis:            Provides some basic WAI handlers and middleware.
 description:
   Provides basic WAI handler and middleware functionality:
@@ -103,7 +103,7 @@
                    , fast-logger               >= 2.4.5    && < 2.5
                    , wai-logger                >= 2.2.6    && < 2.4
                    , ansi-terminal
-                   , resourcet                 >= 0.4.6    && < 1.2
+                   , resourcet                 >= 0.4.6    && < 1.3
                    , void                      >= 0.5
                    , stringsearch              >= 0.3      && < 0.4
                    , containers
