Check for application/json in defaultCheckMime
commit3cef1d57c9a79ff65da3f8dd6af733438e781ec8
authorMichael Snoyman <michael@snoyman.com>
dateTue 12 Mar 2013, 15:01 (14 years ago)
parentaa7dd92
wai-extra/Network/Wai/Middleware/Gzip.hs+1−1
@@ -52,7 +52,7 @@ instance Default GzipSettings where
5252 def = GzipSettings GzipIgnore defaultCheckMime
5353
5454defaultCheckMime :: S.ByteString -> Bool
55−defaultCheckMime = S8.isPrefixOf "text/"
55+defaultCheckMime bs = S8.isPrefixOf "text/" bs || S8.isPrefixOf "application/json" bs
5656
5757-- | Use gzip to compress the body of the response.
5858--
wai-extra/wai-extra.cabal+1−1
@@ -1,5 +1,5 @@
11Name: wai-extra
2−Version: 1.3.2.4
2+Version: 1.3.3
33Synopsis: Provides some basic WAI handlers and middleware.
44Description: The goal here is to provide common features without many dependencies.
55License: MIT