Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP/2 max header list size setting is ignored #4213

Merged
merged 1 commit into from
Dec 21, 2021
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
4 changes: 2 additions & 2 deletions src/main/java/io/vertx/core/http/Http2Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ public class Http2Settings {
public static final int DEFAULT_MAX_FRAME_SIZE = 16384;

/**
* Default HTTP/2 spec value for {@link #getMaxHeaderListSize} : {@code Integer.MAX_VALUE}
* Default HTTP/2 spec value for {@link #getMaxHeaderListSize} : {@code 8192}
*/
public static final int DEFAULT_MAX_HEADER_LIST_SIZE = Integer.MAX_VALUE;
public static final int DEFAULT_MAX_HEADER_LIST_SIZE = 8192;

/**
* Default HTTP/2 spec value for {@link #getExtraSettings} : {@code null}
Expand Down
17 changes: 17 additions & 0 deletions src/test/java/io/vertx/core/http/Http2Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,23 @@ public void testInitialMaxConcurrentStreamZero() throws Exception {
await();
}

@Test
public void testMaxHaderListSize() throws Exception {
server.close();
server = vertx.createHttpServer(createBaseServerOptions().setInitialSettings(new Http2Settings().setMaxHeaderListSize(Integer.MAX_VALUE)));
server.requestHandler(req -> {
req.response().end();
});
startServer(testAddress);
client.request(new RequestOptions(requestOptions).setTimeout(10000))
.compose(HttpClientRequest::send)
.onComplete(onSuccess(resp -> {
assertEquals(Integer.MAX_VALUE, resp.request().connection().remoteSettings().getMaxHeaderListSize());
testComplete();
}));
await();
}

@Test
public void testFoo() throws Exception {
waitFor(2);
Expand Down