public String getDecodedPath(String encoding) { return getDecodedPath(Charset.forName(encoding)); }
try path = _uri.getDecodedPath(); path = _uri.getDecodedPath(StringUtil.__ISO_8859_1);
try path = _uri.getDecodedPath(); path = _uri.getDecodedPath(StringUtil.__ISO_8859_1);
try path = _uri.getDecodedPath(); path = _uri.getDecodedPath(StandardCharsets.ISO_8859_1);
String path=uri.getDecodedPath(); String canonical=URIUtil.canonicalPath(path); if (canonical==null)
String path = uri.getDecodedPath(); String canonical = URIUtil.canonicalPath(path); if (canonical == null)
String path = uri.getDecodedPath(); String canonical = URIUtil.canonicalPath(path); if (canonical == null)
@Override public RequestDispatcher getRequestDispatcher(String uriInContext) { if (uriInContext == null) return null; if (!uriInContext.startsWith("/")) return null; try { HttpURI uri = new HttpURI(null,null,0,uriInContext); String pathInfo=URIUtil.canonicalPath(uri.getDecodedPath()); if (pathInfo==null) return null; String contextPath=getContextPath(); if (contextPath!=null && contextPath.length()>0) uri.setPath(URIUtil.addPaths(contextPath,uri.getPath())); return new Dispatcher(ContextHandler.this,uri,pathInfo); } catch (Exception e) { LOG.ignore(e); } return null; }
@Override public RequestDispatcher getRequestDispatcher(String uriInContext) { // uriInContext is encoded, potentially with query if (uriInContext == null) return null; if (!uriInContext.startsWith("/")) return null; try { HttpURI uri = new HttpURI(null,null,0,uriInContext); String pathInfo = URIUtil.canonicalPath(uri.getDecodedPath()); if (pathInfo == null) return null; String contextPath = getContextPath(); if (contextPath != null && contextPath.length() > 0) uri.setPath(URIUtil.addPaths(contextPath,uri.getPath())); return new Dispatcher(ContextHandler.this,uri,pathInfo); } catch (Exception e) { LOG.ignore(e); } return null; }
HttpURI uri = request.getURI(); String path = uri.getDecodedPath(); String info; if (path==null || path.length()==0)
public void handleAsync(HttpChannel channel) throws IOException, ServletException { final HttpChannelState state = channel.getRequest().getHttpChannelState(); final AsyncContextEvent event = state.getAsyncContextEvent(); final Request baseRequest=channel.getRequest(); final String path=event.getPath(); if (path!=null) { // this is a dispatch with a path ServletContext context=event.getServletContext(); String query=baseRequest.getQueryString(); baseRequest.setURIPathQuery(URIUtil.addEncodedPaths(context==null?null:URIUtil.encodePath(context.getContextPath()), path)); HttpURI uri = baseRequest.getHttpURI(); baseRequest.setPathInfo(uri.getDecodedPath()); if (uri.getQuery()!=null) baseRequest.mergeQueryParameters(query,uri.getQuery(), true); //we have to assume dispatch path and query are UTF8 } final String target=baseRequest.getPathInfo(); final HttpServletRequest request=(HttpServletRequest)event.getSuppliedRequest(); final HttpServletResponse response=(HttpServletResponse)event.getSuppliedResponse(); if (LOG.isDebugEnabled()) LOG.debug("{} {} {} on {}", request.getDispatcherType(), request.getMethod(), target, channel); handle(target, baseRequest, request, response); if (LOG.isDebugEnabled()) LOG.debug("handledAsync={} async={} committed={} on {}", channel.getRequest().isHandled(),request.isAsyncStarted(),response.isCommitted(),channel); }
public void handleAsync(HttpChannel<?> connection) throws IOException, ServletException { final HttpChannelState state = connection.getRequest().getHttpChannelState(); final AsyncContextEvent event = state.getAsyncContextEvent(); final Request baseRequest=connection.getRequest(); final String path=event.getPath(); if (path!=null) { // this is a dispatch with a path ServletContext context=event.getServletContext(); HttpURI uri = new HttpURI(URIUtil.addPaths(context==null?null:context.getContextPath(), path)); baseRequest.setUri(uri); baseRequest.setRequestURI(null); baseRequest.setPathInfo(uri.getDecodedPath()); if (uri.getQuery()!=null) baseRequest.mergeQueryParameters(uri.getQuery(), true); //we have to assume dispatch path and query are UTF8 } final String target=baseRequest.getPathInfo(); final HttpServletRequest request=(HttpServletRequest)event.getSuppliedRequest(); final HttpServletResponse response=(HttpServletResponse)event.getSuppliedResponse(); if (LOG.isDebugEnabled()) { LOG.debug(request.getDispatcherType()+" "+request.getMethod()+" "+target+" on "+connection); handle(target, baseRequest, request, response); LOG.debug("RESPONSE "+target+" "+connection.getResponse().getStatus()); } else handle(target, baseRequest, request, response); }
public void handleAsync(HttpChannel connection) throws IOException, ServletException { final HttpChannelState state = connection.getRequest().getHttpChannelState(); final AsyncContextEvent event = state.getAsyncContextEvent(); final Request baseRequest=connection.getRequest(); final String path=event.getPath(); if (path!=null) { // this is a dispatch with a path ServletContext context=event.getServletContext(); String query=baseRequest.getQueryString(); baseRequest.setURIPathQuery(URIUtil.addPaths(context==null?null:context.getContextPath(), path)); HttpURI uri = baseRequest.getHttpURI(); baseRequest.setPathInfo(uri.getDecodedPath()); if (uri.getQuery()!=null) baseRequest.mergeQueryParameters(query,uri.getQuery(), true); //we have to assume dispatch path and query are UTF8 } final String target=baseRequest.getPathInfo(); final HttpServletRequest request=(HttpServletRequest)event.getSuppliedRequest(); final HttpServletResponse response=(HttpServletResponse)event.getSuppliedResponse(); if (LOG.isDebugEnabled()) { LOG.debug(request.getDispatcherType()+" "+request.getMethod()+" "+target+" on "+connection); handle(target, baseRequest, request, response); LOG.debug("RESPONSE "+target+" "+connection.getResponse().getStatus()); } else handle(target, baseRequest, request, response); }
path = _uri.getDecodedPath(); path = _uri.getDecodedPath(StringUtil.__ISO_8859_1);
path = _uri.getDecodedPath(); path = _uri.getDecodedPath(StringUtil.__ISO_8859_1);
path = _uri.getDecodedPath(); path = _uri.getDecodedPath(StringUtil.__ISO_8859_1);
path = _uri.getDecodedPath(); path = _uri.getDecodedPath(StringUtil.__ISO_8859_1);
path = _uri.getDecodedPath(); path = _uri.getDecodedPath(StringUtil.__ISO_8859_1);