public class HostCheckHandler extends GzipHandler
AbstractLifeCycle.AbstractLifeCycleListenerLifeCycle.ListenerContainer.InheritedListener, Container.Listener_bufferSize, _minGzipSize, _vary_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, getBufferSize, getExcluded, getExcludedAgentPatterns, getExcludedMethods, getExcludedMimeTypes, getExcludedPaths, getIncludedAgentPatterns, getIncludedMethods, getIncludedMimeTypes, getIncludedPaths, getMimeTypes, getMinGzipSize, getVary, newGzipResponseWrapper, newWriter, setBufferSize, setExcluded, setExcluded, setExcludeMimeTypes, setMimeTypes, setMimeTypes, setMinGzipSize, setVarydestroy, expandChildren, getHandler, getHandlers, setHandler, setServerexpandHandler, findContainerOf, getChildHandlerByClass, getChildHandlers, getChildHandlersByClassdoStop, dumpThis, getServeraddBean, addBean, addBean, addEventListener, addManaged, contains, dump, dump, dump, dump, dump, dumpBeans, dumpObject, dumpStdErr, getBean, getBeans, getBeans, isManaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBeansaddLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stoppublic 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 Handlerhandle in class GzipHandlerIOExceptionServletException