@Override public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { if (!response.getHeaderNames().contains(SERVER_HEADER)) { response.setHeader(SERVER_HEADER, this.value); } super.handle(target, baseRequest, request, response); }
@Override public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { if (value != null) { response.setHeader(header, value); } super.handle(target, baseRequest, request, response); } }
@Override public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { try(Logging.MDCCloseable closeable = Logging.withPrefixCloseable("web")) { super.handle(target,baseRequest,request,response); } } }
@Override public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { // add the repository provide to the request attributes if (LOGGER.isDebugEnabled()) { LOGGER.debug("Setting RepositoryProvider on Request to: " + repoProvider); } baseRequest.setAttribute(RepositoryProvider.KEY, repoProvider); // now let the delegate handle it super.handle(target, baseRequest, request, response); }
@Override public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { try(Logging.MDCCloseable closeable = Logging.withPrefixCloseable("web")) { super.handle(target,baseRequest,request,response); } } }
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { if (callback == null) super.handle(target, baseRequest, request, response); else callback.handle(_handler, target, baseRequest, request, response); } }
public final void nextHandle(String target, final Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { if (_nextScope!=null && _nextScope==_handler) _nextScope.doHandle(target,baseRequest,request, response); else if (_handler!=null) super.handle(target,baseRequest,request,response); } }
@Override public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { if (_webSocketFactory.acceptWebSocket(request,response) || response.isCommitted()) { baseRequest.setHandled(true); return; } super.handle(target,baseRequest,request,response); }
@Override public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { if (_webSocketFactory.acceptWebSocket(request,response) || response.isCommitted()) { baseRequest.setHandled(true); return; } super.handle(target,baseRequest,request,response); }
@Override public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { if (_webSocketFactory.acceptWebSocket(request,response) || response.isCommitted()) { baseRequest.setHandled(true); return; } super.handle(target,baseRequest,request,response); }
@Override public void handle( String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response ) throws IOException, ServletException { HttpServletRequest newRequest = new TraceRequest( request ); HttpServletResponse newResponse = new TraceResponse( response, bodyFilter ); super.handle( target, baseRequest, newRequest, newResponse ); }
@Override public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { // handle ASYNC as well? if (((Request) request).getDispatcherType() == DispatcherType.REQUEST) { rewriteProxyRequest(baseRequest); } super.handle(target, baseRequest, request, response); }
@Override public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { final boolean handled = h2oHttpView.loginHandler(target, request, response); if (handled) { baseRequest.setHandled(true); } else { super.handle(target, baseRequest, request, response); } } }
@Override public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { final boolean handled = h2oHttpView.proxyLoginHandler(target, request, response); if (handled) { baseRequest.setHandled(true); } else { super.handle(target, baseRequest, request, response); } } }
@Override public void handle( String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response ) throws IOException, ServletException { HttpServletRequest newRequest = new TraceRequest( request ); HttpServletResponse newResponse = new TraceResponse( response, bodyFilter ); super.handle( target, baseRequest, newRequest, newResponse ); }
@Override public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { if (isStarted()) { String returned = _rules.matchAndApply(target, request, response); target = (returned == null) ? target : returned; if (!baseRequest.isHandled()) super.handle(target, baseRequest, request, response); } }
@Override public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { if (isStarted()) { String returned = _rules.matchAndApply(target, request, response); target = (returned == null) ? target : returned; if (!baseRequest.isHandled()) super.handle(target, baseRequest, request, response); } }
@Override public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { if (isStarted()) { String returned = _rules.matchAndApply(target, request, response); target = (returned == null) ? target : returned; if (!baseRequest.isHandled()) super.handle(target, baseRequest, request, response); } }
/** Monitor the request and call any other requests in the decorator chain */ @Override public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { HttpMon httpMon=null; try { httpMon=httpMonFactory.start(request, response); super.handle(target, baseRequest, request, response); } catch (Throwable e) { httpMon.throwException(e); } finally { httpMon.stop(); } }
@Override public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { super.handle(target, baseRequest, request, response); if (isStarted() && url.equals(target)) { Handler nested = getHandler(); if (nested instanceof ContextHandler){ target = ((ContextHandler) nested).getContextPath() + url; baseRequest.setRequestURI(target); baseRequest.setPathInfo(target); } } } }