Class TrailingSlashAliasChecker
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.server.TrailingSlashAliasChecker
- All Implemented Interfaces:
AliasCheck, LifeCycle
This will approve an alias where the only difference is a trailing slash.
For example, a request for a file containing a trailing slash like /context/dir/index.html/,
can be approved as an alias to the file /context/dir/index.html which exists.
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener, AbstractLifeCycle.StopExceptionNested classes/interfaces inherited from interface LifeCycle
LifeCycle.Listener -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckAlias(String pathInContext, Resource resource) Check if an alias is allowed to be served.Methods inherited from class AbstractLifeCycle
addEventListener, doStart, doStop, getEventListeners, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeEventListener, setEventListeners, start, stop, toString
-
Constructor Details
-
TrailingSlashAliasChecker
public TrailingSlashAliasChecker()
-
-
Method Details
-
checkAlias
Description copied from interface:AliasCheckCheck if an alias is allowed to be served. If anyAliasCheckreturns true then the alias will be allowed to be served, therefore any alias checker should take things like theContextHandler.getProtectedTargets()and Security Constraints into consideration before allowing a return a value of true.- Specified by:
checkAliasin interfaceAliasCheck- Parameters:
pathInContext- The path the aliased resource was created for.resource- The aliased resourced.- Returns:
- True if the resource is OK to be served.
-