Skip to content
Merged
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 @@ -86,6 +86,8 @@
@SuppressWarnings("deprecation")
public class H2ServerBootstrap {

private static final H2Config DEFAULT_H2_CONFIG = H2Config.custom().setPushEnabled(false).build();

private final List<RequestRouter.Entry<Supplier<AsyncServerExchangeHandler>>> routeEntries;
private final List<FilterEntry<AsyncFilterHandler>> filters;
private String canonicalHostName;
Expand Down Expand Up @@ -163,6 +165,7 @@ public final H2ServerBootstrap setVersionPolicy(final HttpVersionPolicy versionP
* @return this instance.
*/
public final H2ServerBootstrap setH2Config(final H2Config h2Config) {
Args.check(!h2Config.isPushEnabled(), "A server MUST NOT set enable_push to true");
this.h2Config = h2Config;
return this;
}
Expand Down Expand Up @@ -522,7 +525,7 @@ public HttpAsyncServer create() {
final ServerH2StreamMultiplexerFactory http2StreamHandlerFactory = new ServerH2StreamMultiplexerFactory(
httpProcessor != null ? httpProcessor : H2Processors.server(),
handlerFactory,
h2Config != null ? h2Config : H2Config.DEFAULT,
h2Config != null ? h2Config : DEFAULT_H2_CONFIG,
charCodingConfig != null ? charCodingConfig : CharCodingConfig.DEFAULT,
h2StreamListener,
frameFactory);
Expand Down
Loading