Skip to content

Commit

Permalink
Should not have removed XML from jetty-server/
Browse files Browse the repository at this point in the history
  • Loading branch information
joakime committed Feb 23, 2022
1 parent ec565fc commit b620d15
Show file tree
Hide file tree
Showing 5 changed files with 112 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_10_0.dtd">
<Configure>
<New id="byteBufferPool" class="org.eclipse.jetty.io.LogarithmicArrayByteBufferPool">
<Arg type="int"><Property name="jetty.byteBufferPool.minCapacity" default="0"/></Arg>
<Arg type="int"><Property name="jetty.byteBufferPool.maxCapacity" default="65536"/></Arg>
<Arg type="int"><Property name="jetty.byteBufferPool.maxQueueLength" default="-1"/></Arg>
<Arg type="long"><Property name="jetty.byteBufferPool.maxHeapMemory" default="0"/></Arg>
<Arg type="long"><Property name="jetty.byteBufferPool.maxDirectMemory" default="0"/></Arg>
</New>
</Configure>
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://www.eclipse.org/jetty/configure_10_0.dtd">

<Configure id="Server" class="org.eclipse.jetty.server.Server">
<!-- ===================================================================== -->
<!-- Configure a SessionIdManager -->
<!-- ===================================================================== -->
<Set name="sessionIdManager">
<New id="idMgr" class="org.eclipse.jetty.server.session.DefaultSessionIdManager">
<Arg>
<Ref refid="Server"/>
</Arg>
<Set name="workerName">
<Property name="jetty.sessionIdManager.workerName">
<Default>node<Env name="JETTY_WORKER_INSTANCE">
<Default>
<Env name="GAE_MODULE_INSTANCE">
<Default>0</Default>
</Env>
</Default>
</Env>
</Default>
</Property>
</Set>

<!-- ===================================================================== -->
<!-- Configure a session housekeeper to help with scavenging -->
<!-- ===================================================================== -->
<Set name="sessionHouseKeeper">
<New class="org.eclipse.jetty.server.session.HouseKeeper">
<Set name="intervalSec" property="jetty.sessionScavengeInterval.seconds"/>
</New>
</Set>
</New>
</Set>
</Configure>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://www.eclipse.org/jetty/configure_10_0.dtd">

<Configure id="Server" class="org.eclipse.jetty.server.Server">

<!-- ===================================================================== -->
<!-- Configure a factory for DefaultSessionCache -->
<!-- ===================================================================== -->
<Call name="addBean">
<Arg>
<New class="org.eclipse.jetty.server.session.DefaultSessionCacheFactory">
<Set name="evictionPolicy"><Property name="jetty.session.evictionPolicy" default="-1" /></Set>
<Set name="saveOnInactiveEvict"><Property name="jetty.session.saveOnInactiveEvict" default="false" /></Set>
<Set name="saveOnCreate"><Property name="jetty.session.saveOnCreate" default="false" /></Set>
<Set name="removeUnloadableSessions"><Property name="jetty.session.removeUnloadableSessions" default="false"/></Set>
<Set name="flushOnResponseCommit"><Property name="jetty.session.flushOnResponseCommit" default="false"/></Set>
<Set name="invalidateOnShutdown"><Property name="jetty.session.invalidateOnShutdown" default="false"/></Set>
</New>
</Arg>
</Call>

</Configure>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://www.eclipse.org/jetty/configure_10_0.dtd">

<Configure id="Server" class="org.eclipse.jetty.server.Server">

<!-- ===================================================================== -->
<!-- Configure a factory for NullSessionCache -->
<!-- ===================================================================== -->
<Call name="addBean">
<Arg>
<New class="org.eclipse.jetty.server.session.NullSessionCacheFactory">
<Set name="saveOnCreate"><Property name="jetty.session.saveOnCreate" default="false" /></Set>
<Set name="removeUnloadableSessions"><Property name="jetty.session.removeUnloadableSessions" default="false" /></Set>
<Set name="flushOnResponseCommit"><Property name="jetty.session.flushOnResponseCommit" default="false" /></Set>
</New>
</Arg>
</Call>

</Configure>
24 changes: 24 additions & 0 deletions jetty-core/jetty-server/src/main/config/etc/well-known.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://www.eclipse.org/jetty/configure_10_0.dtd">

<Configure id="Contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection">
<New id="WellKnownHandler" class="org.eclipse.jetty.server.handler.ContextHandler">
<Set name="contextPath">/.well-known</Set>
<Set name="handler">
<New class="org.eclipse.jetty.server.handler.ResourceHandler">
<Set name="resourceBase">
<Call name="resolvePath" class="org.eclipse.jetty.xml.XmlConfiguration">
<Arg><Property name="jetty.base"/></Arg>
<Arg><Property name="jetty.wellknown.dir" default=".well-known"/></Arg>
</Call>
</Set>
<Set name="directoriesListed">false</Set>
</New>
</Set>
</New>

<Call name="addHandler">
<Arg><Ref refid="WellKnownHandler"/></Arg>
</Call>
</Configure>

0 comments on commit b620d15

Please sign in to comment.