From caf08c16db61c74cfbc214fb236e69928eebd2f7 Mon Sep 17 00:00:00 2001 From: Kazu Yamamoto Date: Wed, 19 Jun 2024 15:43:39 +0900 Subject: [PATCH 1/3] changelog --- ChangeLog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog.md b/ChangeLog.md index 1a831efc..996ca049 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -2,7 +2,7 @@ * Update for latest http-semantics [#122](https://github.com/kazu-yamamoto/http2/pull/122) -* +* Measuring performance concurrently for h2c-client ## 5.2.3 From 8696560a451a5a72d57115bb3b0a8eefb8955973 Mon Sep 17 00:00:00 2001 From: Kazu Yamamoto Date: Wed, 19 Jun 2024 15:45:23 +0900 Subject: [PATCH 2/3] removing unused code --- Network/HTTP2/H2/Context.hs | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/Network/HTTP2/H2/Context.hs b/Network/HTTP2/H2/Context.hs index 14a4ff2e..3c5317a3 100644 --- a/Network/HTTP2/H2/Context.hs +++ b/Network/HTTP2/H2/Context.hs @@ -133,20 +133,6 @@ newContext rinfo Config{..} cacheSiz connRxWS settings = | confBufferSize >= dlim = dlim | otherwise = confBufferSize -makeMySettingsList :: Config -> Int -> WindowSize -> [(SettingsKey, Int)] -makeMySettingsList Config{..} maxConc winSiz = myInitialAlist - where - -- confBufferSize is the size of the write buffer. - -- But we assume that the size of the read buffer is the same size. - -- So, the size is announced to via SETTINGS_MAX_FRAME_SIZE. - len = confBufferSize - frameHeaderLength - payloadLen = max defaultPayloadLength len - myInitialAlist = - [ (SettingsMaxFrameSize, payloadLen) - , (SettingsMaxConcurrentStreams, maxConc) - , (SettingsInitialWindowSize, winSiz) - ] - ---------------------------------------------------------------- isClient :: Context -> Bool From 80921ad15fac05715ede7063d57585d4e7049f99 Mon Sep 17 00:00:00 2001 From: Kazu Yamamoto Date: Wed, 19 Jun 2024 15:48:52 +0900 Subject: [PATCH 3/3] Using proper initial settings for peer. --- Network/HTTP2/H2/Context.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Network/HTTP2/H2/Context.hs b/Network/HTTP2/H2/Context.hs index 3c5317a3..c0c289dc 100644 --- a/Network/HTTP2/H2/Context.hs +++ b/Network/HTTP2/H2/Context.hs @@ -100,7 +100,7 @@ newContext rinfo Config{..} cacheSiz connRxWS settings = -- Peer: The spec defines max concurrency is infinite unless -- SETTINGS_MAX_CONCURRENT_STREAMS is exchanged. -- But it is vulnerable, so we set the limitations. - <*> newIORef settings + <*> newIORef baseSettings{maxConcurrentStreams = Just defaultMaxStreams} <*> newTVarIO emptyOddStreamTable <*> newTVarIO (emptyEvenStreamTable cacheSiz) <*> newIORef Nothing