@@ -13,6 +13,7 @@ import Control.Monad (unless, void, when)
13import qualified Data.ByteString as BS
13import qualified Data.ByteString as BS
14import qualified Data.ByteString.Builder.Extra as B
14import qualified Data.ByteString.Builder.Extra as B
15import Foreign.Ptr
15import Foreign.Ptr
16+import Network.HPACK (setLimitForEncoding)
16import Network.HTTP2
17import Network.HTTP2
17import Network.HTTP2.Priority
18import Network.HTTP2.Priority
18import Network.Wai
19import Network.Wai
@@ -68,7 +69,7 @@ getWindowSize connWindow strmWindow = do
68 return $ min cw sw
69 return $ min cw sw
70frameSender :: Context -> Connection -> InternalInfo -> S.Settings -> IO ()
71frameSender :: Context -> Connection -> InternalInfo -> S.Settings -> IO ()
71−frameSender ctx@Context{outputQ,connectionWindow}
72+frameSender ctx@Context{outputQ,connectionWindow,encodeDynamicTable}
72 conn@Connection{connWriteBuffer,connBufferSize,connSendAll}
73 conn@Connection{connWriteBuffer,connBufferSize,connSendAll}
73 ii settings = go `E.catch` ignore
74 ii settings = go `E.catch` ignore
@@ -92,6 +93,14 @@ frameSender ctx@Context{outputQ,connectionWindow}
92 switch (OFrame frame) _ = do
93 switch (OFrame frame) _ = do
93 connSendAll frame
94 connSendAll frame
96+ switch (OSettings frame alist) _ = do
98+ case lookup SettingsHeaderTableSize alist of
101+ dyntbl <- readIORef encodeDynamicTable
102+ setLimitForEncoding siz dyntbl
95 switch (OResponse strm rsp aux) pre = do
104 switch (OResponse strm rsp aux) pre = do
96 writeIORef (streamPrecedence strm) pre
105 writeIORef (streamPrecedence strm) pre
97 unlessClosed ctx conn strm $ do
106 unlessClosed ctx conn strm $ do