Skip to content
Open
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 @@ -325,6 +325,19 @@ public final class HttpBindManager implements CertificateEventListener {
.setDefaultValue(32768)
.build();

/**
* Capacity of the per-connection HTTP header cache, measured in trie nodes (roughly one per cached character of
* header name and value), not in headers. A header whose name and value do not fit in the remaining capacity is
* not cached. Jetty allocates the cache (about 96 KB at the default of 1024) for every connection, which adds up
* for BOSH clients that hold long-lived connections and repeat few headers. A value of 0 disables the cache.
*/
public static final SystemProperty<Integer> HTTP_BIND_HEADER_CACHE_SIZE = SystemProperty.Builder.ofType(Integer.class)
.setKey("httpbind.header-cache.size")
.setDynamic(false)
.setDefaultValue(1024)
.setMinValue(0)
.build();

private static HttpBindManager instance;

private Server httpBindServer;
Expand Down Expand Up @@ -608,6 +621,7 @@ private void configureProxiedConnector(HttpConfiguration httpConfig) {
httpConfig.addCustomizer(possiblyWrappedCustomizer);
}
httpConfig.setRequestHeaderSize(HTTP_BIND_REQUEST_HEADER_SIZE.getValue());
httpConfig.setHeaderCacheSize(HTTP_BIND_HEADER_CACHE_SIZE.getValue());
}

private String getBindInterface() {
Expand Down