Skip to content

Commit

Permalink
Align embedded and XML defaults for HttpConfiguration
Browse files Browse the repository at this point in the history
Fix #11947 by aligning embedded and XML HttpConfiguration defaults
  • Loading branch information
gregw committed Nov 20, 2024
1 parent 1eaceae commit 4f0d6a3
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions jetty-core/jetty-server/src/main/config/etc/jetty.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<Set name="requestHeaderSize" property="jetty.httpConfig.requestHeaderSize"/>
<Set name="responseHeaderSize" property="jetty.httpConfig.responseHeaderSize"/>
<Set name="sendServerVersion" property="jetty.httpConfig.sendServerVersion"/>
<Set name="sendDateHeader"><Property name="jetty.httpConfig.sendDateHeader" default="false"/></Set>
<Set name="sendDateHeader" property="jetty.httpConfig.sendDateHeader"/>
<Set name="headerCacheSize" property="jetty.httpConfig.headerCacheSize"/>
<Set name="delayDispatchUntilContent" property="jetty.httpConfig.delayDispatchUntilContent"/>
<Set name="maxErrorDispatches" property="jetty.httpConfig.maxErrorDispatches"/>
Expand All @@ -67,7 +67,7 @@
<Set name="uriCompliance"><Call class="org.eclipse.jetty.http.UriCompliance" name="from"><Arg><Property name="jetty.httpConfig.uriCompliance" default="DEFAULT"/></Arg></Call></Set>
<Set name="requestCookieCompliance"><Call class="org.eclipse.jetty.http.CookieCompliance" name="from"><Arg><Property name="jetty.httpConfig.requestCookieCompliance" default="RFC6265"/></Arg></Call></Set>
<Set name="responseCookieCompliance"><Call class="org.eclipse.jetty.http.CookieCompliance" name="from"><Arg><Property name="jetty.httpConfig.responseCookieCompliance" default="RFC6265"/></Arg></Call></Set>
<Set name="relativeRedirectAllowed"><Property name="jetty.httpConfig.relativeRedirectAllowed" default="false"/></Set>
<Set name="relativeRedirectAllowed" property="jetty.httpConfig.relativeRedirectAllowed"/>
<Set name="generateRedirectBody" property="jetty.httpConfig.generateRedirectBody"/>
<Set name="useInputDirectByteBuffers" property="jetty.httpConfig.useInputDirectByteBuffers"/>
<Set name="useOutputDirectByteBuffers" property="jetty.httpConfig.useOutputDirectByteBuffers"/>
Expand All @@ -92,8 +92,8 @@
<!-- =========================================================== -->
<!-- extra server options -->
<!-- =========================================================== -->
<Set name="stopAtShutdown"><Property name="jetty.server.stopAtShutdown" default="true"/></Set>
<Set name="stopTimeout"><Property name="jetty.server.stopTimeout" default="5000"/></Set>
<Set name="stopAtShutdown" property="jetty.server.stopAtShutdown"/>
<Set name="stopTimeout" property="jetty.server.stopTimeout"/>
<Set name="dumpAfterStart" property="jetty.server.dumpAfterStart"/>
<Set name="dumpBeforeStop" property="jetty.server.dumpBeforeStop"/>
<Set name="tempDirectory" property="jetty.server.tempDirectory"/>
Expand Down
2 changes: 1 addition & 1 deletion jetty-core/jetty-server/src/main/config/modules/server.mod
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ etc/jetty.xml
# jetty.httpConfig.sendServerVersion=true

## Whether to send the Date: header
# jetty.httpConfig.sendDateHeader=false
# jetty.httpConfig.sendDateHeader=true

## Max per-connection header cache size (in nodes)
# jetty.httpConfig.headerCacheSize=1024
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -764,15 +764,15 @@ public boolean isNotifyRemoteAsyncErrors()
}

/**
* @param allowed True if relative redirection locations are allowed
* @param allowed True if relative redirection locations are allowed (default {@code true}).
*/
public void setRelativeRedirectAllowed(boolean allowed)
{
_relativeRedirectAllowed = allowed;
}

/**
* @return True if relative redirection locations are allowed
* @return True if relative redirection locations are allowed (default {@code true})
*/
@ManagedAttribute("Whether relative redirection locations are allowed")
public boolean isRelativeRedirectAllowed()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,15 @@ public class Server extends Handler.Wrapper implements Attributes
private final MimeTypes.Mutable _mimeTypes = new MimeTypes.Mutable();
private String _serverInfo = __serverInfo;
private boolean _openEarly = true;
private boolean _stopAtShutdown;
private boolean _stopAtShutdown = true;
private boolean _dumpAfterStart;
private boolean _dumpBeforeStop;
private Handler _defaultHandler;
private Request.Handler _errorHandler;
private RequestLog _requestLog;
private boolean _dryRun;
private volatile DateField _dateField;
private long _stopTimeout;
private long _stopTimeout = 5000;
private InvocationType _invocationType = InvocationType.NON_BLOCKING;
private File _tempDirectory;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ public class DefaultHandler extends Handler.Abstract
private final long _faviconModifiedMs = (System.currentTimeMillis() / 1000) * 1000L;
private final HttpField _faviconModified = new PreEncodedHttpField(HttpHeader.LAST_MODIFIED, DateGenerator.formatDate(_faviconModifiedMs));
private ByteBuffer _favicon;
private boolean _serveFavIcon = true;
private boolean _showContexts = true;
private boolean _serveFavIcon;
private boolean _showContexts;

public DefaultHandler()
{
Expand Down

0 comments on commit 4f0d6a3

Please sign in to comment.