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

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

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

Request.getOriginalURI介绍

暂无

代码示例

代码示例来源:origin: twosigma/webtau

@Override
public void handle(String url, Request baseRequest, HttpServletRequest request,
          HttpServletResponse response) throws IOException, ServletException {
  Map<String, TestServerResponse> responses = findResponses(request);
  MultipartConfigElement multipartConfigElement = new MultipartConfigElement((String) null);
  request.setAttribute(Request.__MULTIPART_CONFIG_ELEMENT, multipartConfigElement);
  TestServerResponse testServerResponse = responses.get(baseRequest.getOriginalURI());
  if (testServerResponse == null) {
    response.setStatus(404);
  } else {
    testServerResponse.responseHeader(request).forEach(response::addHeader);
    byte[] responseBody = testServerResponse.responseBody(request);
    response.setStatus(testServerResponse.responseStatusCode());
    response.setContentType(testServerResponse.responseType(request));
    if (responseBody != null) {
      response.getOutputStream().write(responseBody);
    }
  }
  baseRequest.setHandled(true);
}

代码示例来源:origin: com.yahoo.athenz/athenz-jetty-container

private void logRequestUri(StringBuilder buf, Request request) {
  final Object skipQuery = request.getAttribute(REQUEST_URI_SKIP_QUERY);
  append(buf, (skipQuery == Boolean.TRUE) ? request.getRequestURI() : request.getOriginalURI());
}

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

append(buf,request.getMethod());
buf.append(' ');
append(buf,request.getOriginalURI());
buf.append(' ');
append(buf,request.getProtocol());

代码示例来源:origin: com.yahoo.vespa/jdisc_http_service

public HttpRequestDispatch(JDiscContext jDiscContext,
              AccessLogEntry accessLogEntry,
              Context metricContext,
              HttpServletRequest servletRequest,
              HttpServletResponse servletResponse) throws IOException {
  this.jDiscContext = jDiscContext;
  requestHandler = newRequestHandler(jDiscContext, accessLogEntry, servletRequest);
  this.jettyRequest = (Request) servletRequest;
  this.metricReporter = new MetricReporter(jDiscContext.metric, metricContext, jettyRequest.getTimeStamp());
  honourMaxKeepAliveRequests();
  this.servletResponseController = new ServletResponseController(
      servletRequest,
      servletResponse,
      jDiscContext.janitor,
      metricReporter,
      jDiscContext.developerMode());
  this.async = servletRequest.startAsync();
  async.setTimeout(0);
  metricReporter.uriLength(jettyRequest.getOriginalURI().length());
}

相关文章

Request类方法