public class HostCheckHandler extends org.eclipse.jetty.server.handler.gzip.GzipHandler
AbstractHandler.ErrorDispatchHandler
AbstractLifeCycle.AbstractLifeCycleListener
LifeCycle.Listener
Container.InheritedListener, Container.Listener
DEFAULT_MIN_GZIP_SIZE, DEFLATE, GZIP
_handler
Constructor and Description |
---|
HostCheckHandler(I2PAppContext ctx)
MUST call setListenHosts() afterwards.
|
Modifier and Type | Method and Description |
---|---|
void |
handle(String pathInContext,
Request baseRequest,
HttpServletRequest httpRequest,
HttpServletResponse httpResponse)
Block by Host header,
redirect HTTP to HTTPS,
pass everything else to the delegate.
|
void |
setListenHosts(Set<String> hosts)
Set the legal hosts.
|
addExcludedAgentPatterns, addExcludedMethods, addExcludedMimeTypes, addExcludedPaths, addIncludedAgentPatterns, addIncludedMethods, addIncludedMimeTypes, addIncludedPaths, doStart, getCheckGzExists, getCompressionLevel, getDeflater, getDeflaterPoolCapacity, getDispatcherTypes, getExcludedAgentPatterns, getExcludedMethodList, getExcludedMethods, getExcludedMimeTypes, getExcludedPaths, getIncludedAgentPatterns, getIncludedMethodList, getIncludedMethods, getIncludedMimeTypes, getIncludedPaths, getInflateBufferSize, getMethods, getMinGzipSize, getVaryField, isAgentGzipable, isMimeTypeGzipable, isPathGzipable, isSyncFlush, newDeflaterPool, recycle, setCheckGzExists, setCompressionLevel, setDeflaterPoolCapacity, setDispatcherTypes, setDispatcherTypes, setExcludedAgentPatterns, setExcludedMethodList, setExcludedMethods, setExcludedMimeTypes, setExcludedPaths, setIncludedAgentPatterns, setIncludedMethodList, setIncludedMethods, setIncludedMimeTypes, setIncludedPaths, setInflateBufferSize, setMinGzipSize, setSyncFlush
destroy, expandChildren, getHandler, getHandlers, insertHandler, setHandler
doShutdown, expandHandler, findContainerOf, getChildHandlerByClass, getChildHandlers, getChildHandlersByClass, setServer
doError, doStop, getServer
addBean, addBean, addBean, addEventListener, addManaged, contains, dump, dump, dump, dump, dump, dumpBeans, dumpObject, dumpObjects, dumpStdErr, dumpThis, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeans
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, start, stop, stop
dumpObjects, dumpSelf
public HostCheckHandler(I2PAppContext ctx)
public void setListenHosts(Set<String> hosts)
hosts
- contains hostnames or IPs. But we allow all IPs anyway.public void handle(String pathInContext, Request baseRequest, HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws IOException, ServletException
handle
in interface Handler
handle
in class org.eclipse.jetty.server.handler.gzip.GzipHandler
IOException
ServletException