org.eclipse.jetty.server.Request.getRequestURI()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(5.9k)|赞(0)|评价(0)|浏览(328)

本文整理了Java中org.eclipse.jetty.server.Request.getRequestURI方法的一些代码示例,展示了Request.getRequestURI的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getRequestURI方法的具体详情如下:
包路径:org.eclipse.jetty.server.Request
类名称:Request
方法名:getRequestURI

Request.getRequestURI介绍

暂无

代码示例

代码示例来源:origin: dropwizard/dropwizard

@Override
public void handle(String target,
          Request baseRequest,
          HttpServletRequest request,
          HttpServletResponse response) throws IOException, ServletException {
  final Handler handler = handlers.getBest(baseRequest.getRequestURI());
  if (handler != null) {
    handler.handle(target, baseRequest, request, response);
  }
}

代码示例来源:origin: jersey/jersey

private URI getRequestUri(final Request request, final URI baseUri) {
  try {
    final String serverAddress = getServerAddress(baseUri);
    String uri = request.getRequestURI();
    final String queryString = request.getQueryString();
    if (queryString != null) {
      uri = uri + "?" + ContainerUtils.encodeUnsafeCharacters(queryString);
    }
    return new URI(serverAddress + uri);
  } catch (URISyntaxException ex) {
    throw new IllegalArgumentException(ex);
  }
}

代码示例来源:origin: jphp-group/jphp

@Signature
  public void __invoke(PHttpServerRequest request, PHttpServerResponse response) throws IOException, ServletException {
    Request baseRequest = Request.getBaseRequest(request.getRequest());

    gzipHandler.handle(request.getRequest().getRequestURI(), baseRequest, request.getRequest(), response.getResponse());
  }
}

代码示例来源:origin: jphp-group/jphp

request.getRequest().getRequestURI(), baseRequest, request.getRequest(), response.getResponse()
);

代码示例来源:origin: i2p/i2p.i2p

if (_ignorePathMap != null && _ignorePathMap.getMatch(request.getRequestURI()) != null)
  return;

代码示例来源:origin: org.eclipse.jetty/jetty-security

int port = httpConfig.getSecurePort();
String url = URIUtil.newURI(scheme, request.getServerName(), port,request.getRequestURI(),request.getQueryString());
response.setContentLength(0);
response.sendRedirect(url);

代码示例来源:origin: com.opentable.components/otj-logging-jetty

protected String fullUrl(Request request) {
  final String result;
  if (StringUtils.isNotEmpty(request.getQueryString())) {
    result = request.getRequestURI() + '?' + request.getQueryString();
  } else {
    result = request.getRequestURI();
  }
  return result;
}

代码示例来源:origin: org.eclipse.jetty/jetty-rewrite

@Override
public void applyURI(Request request, String oldURI, String newURI) throws IOException
{
  String uri = request.getRequestURI();
  if (uri.startsWith("/"))
    uri = URIUtil.compactPath(uri);
  request.setURIPathQuery(uri);
}

代码示例来源:origin: io.dropwizard/dropwizard-jetty

@Override
  public void handle(String target,
            Request baseRequest,
            HttpServletRequest request,
            HttpServletResponse response) throws IOException, ServletException {
    final Handler handler = handlers.getBest(baseRequest.getRequestURI());
    if (handler != null) {
      handler.handle(target, baseRequest, request, response);
    }
  }
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.jetty.server

@Override
public StringBuffer getRequestURL()
{
  final StringBuffer url = new StringBuffer(128);
  URIUtil.appendSchemeHostPort(url,getScheme(),getServerName(),getServerPort());
  url.append(getRequestURI());
  return url;
}

代码示例来源:origin: Nextdoor/bender

@Override
public StringBuffer getRequestURL()
{
  final StringBuffer url = new StringBuffer(128);
  URIUtil.appendSchemeHostPort(url,getScheme(),getServerName(),getServerPort());
  url.append(getRequestURI());
  return url;
}

代码示例来源:origin: jenkinsci/winstone

@Override
public StringBuffer getRequestURL()
{
  final StringBuffer url = new StringBuffer(128);
  URIUtil.appendSchemeHostPort(url,getScheme(),getServerName(),getServerPort());
  url.append(getRequestURI());
  return url;
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server

public void applyURI(Request request, String oldTarget, String newTarget) throws IOException 
{
  String uri = URIUtil.addPaths(_replacement, PathMap.pathInfo(_pattern,request.getRequestURI()));
  request.setRequestURI(uri);
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

@Override
public void applyURI(Request request, String oldTarget, String newTarget) throws IOException 
{
  String uri = URIUtil.addPaths(_replacement, PathMap.pathInfo(_pattern,request.getRequestURI()));
  request.setRequestURI(uri);
}

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

@Override
public void applyURI(Request request, String oldTarget, String newTarget) throws IOException 
{
  String uri = URIUtil.addPaths(_replacement, PathMap.pathInfo(_pattern,request.getRequestURI()));
  request.setRequestURI(uri);
}

代码示例来源:origin: jenkinsci/winstone

protected void commit (MetaData.Response info)
{
  _committedMetaData=info;
  if (LOG.isDebugEnabled())
    LOG.debug("COMMIT for {} on {}{}{} {} {}{}{}",getRequest().getRequestURI(),this,System.lineSeparator(),
        info.getStatus(),info.getReason(),info.getHttpVersion(),System.lineSeparator(),
        info.getFields());
}

代码示例来源:origin: com.nitorcreations/willow-logging-jetty

@Override
public void log(Request request, Response response) {
 if (_ignorePathMap != null
   && _ignorePathMap.getMatch(request.getRequestURI()) != null)
  return;
 int status = response.getStatus();
 long written = response.getContentLength();
 transmitter.queue(new AccessLogJettyAdapter(request, status, written,
   _preferProxiedForAddress));
}

代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit.junit.http

AccessEvent(Request req, Response rsp) {
  method = req.getMethod();
  uri = req.getRequestURI();
  requestHeaders = cloneHeaders(req);
  parameters = clone(req.getParameterMap());
  status = rsp.getStatus();
  responseHeaders = cloneHeaders(rsp);
}

代码示例来源:origin: com.madgag/org.eclipse.jgit.junit.http

AccessEvent(final Request req, final Response rsp) {
  method = req.getMethod();
  uri = req.getRequestURI();
  requestHeaders = cloneHeaders(req);
  parameters = clone(req.getParameterMap());
  status = rsp.getStatus();
  responseHeaders = cloneHeaders(rsp);
}

代码示例来源:origin: jenkinsci/winstone

public void onCompleted()
{
  if (LOG.isDebugEnabled())
    LOG.debug("COMPLETE for {} written={}",getRequest().getRequestURI(),getBytesWritten());
  if (_requestLog!=null )
    _requestLog.log(_request, _response);
  long idleTO=_configuration.getIdleTimeout();
  if (idleTO>=0 && getIdleTimeout()!=_oldIdleTimeout)
    setIdleTimeout(_oldIdleTimeout);
  notifyComplete(_request);
  _transport.onCompleted();
}

相关文章

Request类方法