Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -287,10 +287,10 @@ default boolean isHttp2Enabled() {
}

/**
* @return the HTTP/2 initial window size in bytes, defaults to 65535
* @return the HTTP/2 initial window size in bytes, defaults to 16777216 (16 MiB)
*/
default int getHttp2InitialWindowSize() {
return 65_535;
return 16_777_216;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ org.asynchttpclient.ioThreadsCount=-1
org.asynchttpclient.hashedWheelTimerTickDuration=100
org.asynchttpclient.hashedWheelTimerSize=512
org.asynchttpclient.expiredCookieEvictionDelay=30000
org.asynchttpclient.http2InitialWindowSize=65535
org.asynchttpclient.http2InitialWindowSize=16777216
org.asynchttpclient.http2MaxFrameSize=16384
org.asynchttpclient.http2HeaderTableSize=4096
org.asynchttpclient.http2MaxHeaderListSize=8192
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,22 @@ void testHttp2MaxDecompressedResponseSize_ZeroDisables() {
assertEquals(0L, config.getHttp2MaxDecompressedResponseSize(), "0 must disable the limit");
}

@Test
void testHttp2InitialWindowSize_DefaultIs16MiB() {
DefaultAsyncHttpClientConfig config = new DefaultAsyncHttpClientConfig.Builder().build();
assertEquals(16 * 1024 * 1024, config.getHttp2InitialWindowSize(),
"Default HTTP/2 initial window size should be 16 MiB (matches the JDK HttpClient and OkHttp defaults)");
}

@Test
void testHttp2InitialWindowSize_SetCustom() {
DefaultAsyncHttpClientConfig config = new DefaultAsyncHttpClientConfig.Builder()
.setHttp2InitialWindowSize(65_535)
.build();
assertEquals(65_535, config.getHttp2InitialWindowSize(),
"Builder must plumb the configured value through");
}

@Test
void testStripAuthorizationOnRedirect_DefaultIsFalse() {
DefaultAsyncHttpClientConfig config = new DefaultAsyncHttpClientConfig.Builder().build();
Expand Down
Loading