Merge branch 'jetty-9.4.x' into jetty-9.4.x-2695-hpack-compliance

This commit is contained in:
Greg Wilkins 2018-07-12 11:07:36 +02:00
commit 1e703e8368
24 changed files with 78 additions and 37 deletions

View File

@ -1,5 +1,31 @@
jetty-9.4.12-SNAPSHOT
jetty-9.4.12.RC0 - 11 July 2018
+ 901 Overriding SSL context KeyStoreType requires explicit override of
TrustStoreType
+ 2075 Deprecating MultiException
+ 2342 File Descriptor Leak: Conscrypt: "Too many open files"
+ 2349 HTTP/2 max streams enforcement
+ 2398 MultiPartFormInputStream parsing should default to UTF-8, but allowed
to be overridden by Request.setCharacterEncoding()
+ 2468 EWYK concurrent produce can fail SSL connections
+ 2501 Include accepting connections in connection limit
+ 2530 Client waits forever for cancelled large uploads
+ 2560 Review PathResource exception handling
+ 2565 HashLoginService silently ignores file:/ config paths from 9.3.x
+ 2631 IllegalArgumentException: Buffering capacity exceeded, from HttpClient
HEAD Requests to resources referencing large body contents
+ 2648 LdapLoginModule fails with forceBinding=true under Java 9
+ 2655 WebSocketClient not removing closed WebSocket Session's from managed
beans
+ 2662 Remove unnecessary boxing conversions
+ 2663 Guard Throwable.addSuppressed() calls
+ 2675 Demo rewrite rules prevent URL Session tracking
+ 2677 Decode URI before matching against "/favicon.ico"
+ 2683 NPE in FrameFlusher toString()
+ 2684 MimeTypes.getAssumedEncodings() does not work
+ 2696 GcloudDataStore dependency generation broken
jetty-9.4.11.v20180605 - 05 June 2018
+ 1785 Support for vhost@connectorname syntax of virtual hosts
+ 2346 Revert stack trace logging for HTTPChannel.onException
@ -27,8 +53,8 @@ jetty-9.4.11.v20180605 - 05 June 2018
+ 2571 Jetty Client 9.4.x incorrectly handles too large fields from nginx 1.14
server
+ 2574 Clarify max request queued exception message
+ 2575 Work around broken OSGi implementations Bundle.getEntry() behavior returning
with unescaped URLs
+ 2575 Work around broken OSGi implementations Bundle.getEntry() behavior
returning with unescaped URLs
+ 2580 Stop creating unnecessary exceptions with MultiException
+ 2586 Update to asm 6.2
+ 2603 WebSocket ByteAccumulator initialized with wrong maximum

View File

@ -218,7 +218,7 @@ public class HttpReceiverOverHTTP extends HttpReceiver implements HttpParser.Res
public int getHeaderCacheSize()
{
// TODO get from configuration
return 256;
return 4096;
}
@Override

View File

@ -84,7 +84,7 @@
<Set name="responseHeaderSize">8192</Set>
<Set name="sendServerVersion">true</Set>
<Set name="sendDateHeader">false</Set>
<Set name="headerCacheSize">512</Set>
<Set name="headerCacheSize">4096</Set>
<!-- Uncomment to enable handling of X-Forwarded- style headers
<Call name="addCustomizer">

View File

@ -213,7 +213,7 @@ Below is the relevant section taken from link:{GITBROWSEURL}/jetty-server/src/ma
<Set name="responseHeaderSize"><Property name="jetty.httpConfig.responseHeaderSize" deprecated="jetty.response.header.size" default="8192" /></Set>
<Set name="sendServerVersion"><Property name="jetty.httpConfig.sendServerVersion" deprecated="jetty.send.server.version" default="true" /></Set>
<Set name="sendDateHeader"><Property name="jetty.httpConfig.sendDateHeader" deprecated="jetty.send.date.header" default="false" /></Set>
<Set name="headerCacheSize"><Property name="jetty.httpConfig.headerCacheSize" default="512" /></Set>
<Set name="headerCacheSize"><Property name="jetty.httpConfig.headerCacheSize" default="4096" /></Set>
<Set name="delayDispatchUntilContent"><Property name="jetty.httpConfig.delayDispatchUntilContent" deprecated="jetty.delayDispatchUntilContent" default="true"/></Set>
<Set name="maxErrorDispatches"><Property name="jetty.httpConfig.maxErrorDispatches" default="10"/></Set>
<Set name="blockingTimeout"><Property name="jetty.httpConfig.blockingTimeout" default="-1"/></Set>

View File

@ -153,7 +153,7 @@ public class ResponseContentParser extends StreamContentParser
public int getHeaderCacheSize()
{
// TODO: configure this
return 0;
return 4096;
}
@Override

View File

@ -228,12 +228,6 @@ public class HttpParser
for (HttpHeader h:HttpHeader.values())
if (!CACHE.put(new HttpField(h,(String)null)))
throw new IllegalStateException("CACHE FULL");
// Add some more common headers
CACHE.put(new HttpField(HttpHeader.REFERER,(String)null));
CACHE.put(new HttpField(HttpHeader.IF_MODIFIED_SINCE,(String)null));
CACHE.put(new HttpField(HttpHeader.IF_NONE_MATCH,(String)null));
CACHE.put(new HttpField(HttpHeader.AUTHORIZATION,(String)null));
CACHE.put(new HttpField(HttpHeader.COOKIE,(String)null));
}
private static HttpCompliance compliance()

View File

@ -268,7 +268,7 @@ public class HttpGeneratorServerHTTPTest
@Override
public int getHeaderCacheSize()
{
return 256;
return 4096;
}
}

View File

@ -18,16 +18,11 @@
package org.eclipse.jetty.http;
import static org.eclipse.jetty.http.HttpComplianceSection.NO_FIELD_FOLDING;
import static org.hamcrest.Matchers.contains;
import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.EnumSet;
import java.util.List;
import java.util.Set;
import org.eclipse.jetty.http.HttpParser.State;
import org.eclipse.jetty.util.BufferUtil;
@ -37,6 +32,9 @@ import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import static org.eclipse.jetty.http.HttpComplianceSection.NO_FIELD_FOLDING;
import static org.hamcrest.Matchers.contains;
public class HttpParserTest
{
static
@ -2360,7 +2358,7 @@ public class HttpParserTest
@Override
public int getHeaderCacheSize()
{
return 512;
return 4096;
}
@Override

View File

@ -101,7 +101,7 @@ public class ManagedSelector extends ContainerLifeCycle implements Dumpable
_selectorManager.execute(_strategy::produce);
// Set started only if we really are started
submit(s->_started.set(true));
submit(s->_started.set(true));
}
public int size()
@ -130,7 +130,7 @@ public class ManagedSelector extends ContainerLifeCycle implements Dumpable
stop_selector._stopped.await();
}
super.doStop();
super.doStop();
}
/**
@ -158,11 +158,30 @@ public class ManagedSelector extends ContainerLifeCycle implements Dumpable
if (selector != null)
{
if (LOG.isDebugEnabled())
LOG.debug("wakeup on submit {}", this);
LOG.debug("Wakeup on submit {}", this);
selector.wakeup();
}
}
private void wakeup()
{
if (LOG.isDebugEnabled())
LOG.debug("Wakeup {}", this);
Selector selector = null;
synchronized (ManagedSelector.this)
{
if (_selecting)
{
selector = _selector;
_selecting = false;
}
}
if (selector != null)
selector.wakeup();
}
private void execute(Runnable task)
{
try
@ -236,6 +255,10 @@ public class ManagedSelector extends ContainerLifeCycle implements Dumpable
public void destroyEndPoint(final EndPoint endPoint)
{
// Waking up the selector is necessary to clean the
// cancelled-key set and tell the TCP stack that the
// socket is closed (so that senders receive RST).
wakeup();
execute(new DestroyEndPoint(endPoint));
}

View File

@ -8,7 +8,7 @@
<Set name="outputBufferSize">32768</Set>
<Set name="requestHeaderSize">8192</Set>
<Set name="responseHeaderSize">8192</Set>
<Set name="headerCacheSize">512</Set>
<Set name="headerCacheSize">4096</Set>
</New>
<Call name="addConnector">

View File

@ -8,7 +8,7 @@
<Set name="outputBufferSize">32768</Set>
<Set name="requestHeaderSize">8192</Set>
<Set name="responseHeaderSize">8192</Set>
<Set name="headerCacheSize">512</Set>
<Set name="headerCacheSize">4096</Set>
</New>
<Call name="addConnector">

View File

@ -8,7 +8,7 @@
<Set name="outputBufferSize">32768</Set>
<Set name="requestHeaderSize">8192</Set>
<Set name="responseHeaderSize">8192</Set>
<Set name="headerCacheSize">512</Set>
<Set name="headerCacheSize">4096</Set>
</New>
<Call name="addConnector">

View File

@ -8,7 +8,7 @@
<Set name="outputBufferSize">32768</Set>
<Set name="requestHeaderSize">8192</Set>
<Set name="responseHeaderSize">8192</Set>
<Set name="headerCacheSize">512</Set>
<Set name="headerCacheSize">4096</Set>
</New>
<Call name="addConnector">

View File

@ -8,7 +8,7 @@
<Set name="outputBufferSize">32768</Set>
<Set name="requestHeaderSize">8192</Set>
<Set name="responseHeaderSize">8192</Set>
<Set name="headerCacheSize">512</Set>
<Set name="headerCacheSize">4096</Set>
</New>
<Call name="addConnector">

View File

@ -8,7 +8,7 @@
<Set name="outputBufferSize">32768</Set>
<Set name="requestHeaderSize">8192</Set>
<Set name="responseHeaderSize">8192</Set>
<Set name="headerCacheSize">512</Set>
<Set name="headerCacheSize">4096</Set>
</New>
<Call name="addConnector">

View File

@ -8,7 +8,7 @@
<Set name="outputBufferSize">32768</Set>
<Set name="requestHeaderSize">8192</Set>
<Set name="responseHeaderSize">8192</Set>
<Set name="headerCacheSize">512</Set>
<Set name="headerCacheSize">4096</Set>
</New>
<Call name="addConnector">

View File

@ -8,7 +8,7 @@
<Set name="outputBufferSize">32768</Set>
<Set name="requestHeaderSize">8192</Set>
<Set name="responseHeaderSize">8192</Set>
<Set name="headerCacheSize">512</Set>
<Set name="headerCacheSize">4096</Set>
</New>
<Call name="addConnector">

View File

@ -49,7 +49,7 @@
<Set name="responseHeaderSize">8192</Set>
<Set name="sendServerVersion">true</Set>
<Set name="sendDateHeader">false</Set>
<Set name="headerCacheSize">512</Set>
<Set name="headerCacheSize">4096</Set>
</New>

View File

@ -49,7 +49,7 @@
<Set name="responseHeaderSize">8192</Set>
<Set name="sendServerVersion">true</Set>
<Set name="sendDateHeader">false</Set>
<Set name="headerCacheSize">512</Set>
<Set name="headerCacheSize">4096</Set>
</New>

View File

@ -59,7 +59,7 @@
<Set name="responseHeaderSize"><Property name="jetty.httpConfig.responseHeaderSize" deprecated="jetty.response.header.size" default="8192" /></Set>
<Set name="sendServerVersion"><Property name="jetty.httpConfig.sendServerVersion" deprecated="jetty.send.server.version" default="true" /></Set>
<Set name="sendDateHeader"><Property name="jetty.httpConfig.sendDateHeader" deprecated="jetty.send.date.header" default="false" /></Set>
<Set name="headerCacheSize"><Property name="jetty.httpConfig.headerCacheSize" default="512" /></Set>
<Set name="headerCacheSize"><Property name="jetty.httpConfig.headerCacheSize" default="4096" /></Set>
<Set name="delayDispatchUntilContent"><Property name="jetty.httpConfig.delayDispatchUntilContent" deprecated="jetty.delayDispatchUntilContent" default="true"/></Set>
<Set name="maxErrorDispatches"><Property name="jetty.httpConfig.maxErrorDispatches" default="10"/></Set>
<Set name="blockingTimeout"><Property deprecated="jetty.httpConfig.blockingTimeout" name="jetty.httpConfig.blockingTimeout.DEPRECATED" default="-1"/></Set>

View File

@ -51,7 +51,7 @@ etc/jetty.xml
# jetty.httpConfig.sendDateHeader=false
## Max per-connection header cache size (in nodes)
# jetty.httpConfig.headerCacheSize=512
# jetty.httpConfig.headerCacheSize=4096
## Whether, for requests with content, delay dispatch until some content has arrived
# jetty.httpConfig.delayDispatchUntilContent=true

View File

@ -57,7 +57,7 @@ public class HttpConfiguration
private int _outputAggregationSize=_outputBufferSize/4;
private int _requestHeaderSize=8*1024;
private int _responseHeaderSize=8*1024;
private int _headerCacheSize=512;
private int _headerCacheSize=4*1024;
private int _securePort;
private long _idleTimeout=-1;
private long _blockingTimeout=-1;

View File

@ -20,7 +20,7 @@
<Set name="responseHeaderSize">8192</Set>
<Set name="sendServerVersion">true</Set>
<Set name="sendDateHeader">false</Set>
<Set name="headerCacheSize">512</Set>
<Set name="headerCacheSize">4096</Set>
<!-- Uncomment to enable handling of X-Forwarded- style headers
<Call name="addCustomizer">

View File

@ -20,7 +20,7 @@
<Set name="responseHeaderSize">8192</Set>
<Set name="sendServerVersion">true</Set>
<Set name="sendDateHeader">false</Set>
<Set name="headerCacheSize">512</Set>
<Set name="headerCacheSize">4096</Set>
<!-- Uncomment to enable handling of X-Forwarded- style headers
<Call name="addCustomizer">