From 088dc036b4d4bae1ebfccb43d6c5e4677047bdcf Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Thu, 21 Jul 2016 19:12:10 +0200 Subject: [PATCH] Fixes #752 - Implement support for HTTP2 SETTINGS_MAX_HEADER_LIST_SIZE. --- .../main/java/org/eclipse/jetty/http2/HTTP2Session.java | 2 +- .../jetty/http2/server/HTTP2ServerConnectionFactory.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/HTTP2Session.java b/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/HTTP2Session.java index 7b96dd967bc..d797d316a95 100644 --- a/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/HTTP2Session.java +++ b/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/HTTP2Session.java @@ -320,7 +320,7 @@ public abstract class HTTP2Session extends ContainerLifeCycle implements ISessio } case SettingsFrame.MAX_HEADER_LIST_SIZE: { - // Allow HTTP2SErverSessionListener to handle + // Handled by HTTP2ServerConnectionFactory.HTTPServerSessionListener. break; } default: diff --git a/jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HTTP2ServerConnectionFactory.java b/jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HTTP2ServerConnectionFactory.java index 2655e82d613..b2c6be75869 100644 --- a/jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HTTP2ServerConnectionFactory.java +++ b/jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HTTP2ServerConnectionFactory.java @@ -97,17 +97,17 @@ public class HTTP2ServerConnectionFactory extends AbstractHTTP2ServerConnectionF int maxConcurrentStreams = getMaxConcurrentStreams(); if (maxConcurrentStreams >= 0) settings.put(SettingsFrame.MAX_CONCURRENT_STREAMS, maxConcurrentStreams); - settings.put(SettingsFrame.MAX_HEADER_LIST_SIZE,getHttpConfiguration().getRequestHeaderSize()); + settings.put(SettingsFrame.MAX_HEADER_LIST_SIZE, getHttpConfiguration().getRequestHeaderSize()); return settings; } @Override public void onSettings(Session session, SettingsFrame frame) { - super.onSettings(session,frame); + HttpConfiguration httpConfig = getHttpConfiguration(); Integer mhls = frame.getSettings().get(SettingsFrame.MAX_HEADER_LIST_SIZE); - if (mhls != null && mhls.intValue()