on master help sign in
handling CompressionError correctly.
commit73123e9f499c8dcbc069dc90cdcff2ed45d30c82 authorKazu Yamamoto <kazu@iij.ad.jp> dateTue 16 Feb 2016, 14:03 (11 years ago) parent401f66b
1 file changed+2−3
warp/Network/Wai/Handler/Warp/HTTP2/HPACK.hs+2−3
warp/Network/Wai/Handler/Warp/HTTP2/HPACK.hs+2−3
@@ -48,6 +48,5 @@ hpackEncodeHeaderLoop Context{..} buf siz hs =
4848
4949hpackDecodeHeader :: HeaderBlockFragment -> Context -> IO HeaderList
5050hpackDecodeHeader hdrblk Context{..} =
51− decodeHeader decodeDynamicTable hdrblk `E.onException` cleanup
52− where
53− cleanup = E.throwIO $ ConnectionError CompressionError "cannot decompress the header"
51+ decodeHeader decodeDynamicTable hdrblk `E.catch` \(E.SomeException _) ->
52+ E.throwIO $ ConnectionError CompressionError "cannot decompress the header"