Fixes #752 - Implement support for HTTP2 SETTINGS_MAX_HEADER_LIST_SIZE.
This commit is contained in:
parent
71eaacf855
commit
088dc036b4
|
@ -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:
|
||||
|
|
|
@ -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()<getHttpConfiguration().getResponseHeaderSize())
|
||||
LOG.warn("MAX_HEADER_LIST_SIZE<{} for {}",getHttpConfiguration().getResponseHeaderSize(),session);
|
||||
if (mhls != null && mhls < httpConfig.getResponseHeaderSize())
|
||||
httpConfig.setResponseHeaderSize(mhls);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue