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

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

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

Request.setServerPort介绍

暂无

代码示例

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

public void parsedServerPort(int port) throws IOException
{
  _request.setServerPort(port);
}

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

@Override
public boolean parsedHostHeader(String host, int port)
{
  _request.setServerName(host);
  _request.setServerPort(port);
  return false;
}

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

@Override
public boolean parsedHostHeader(String host, int port)
{
  _request.setServerName(host);
  _request.setServerPort(port);
  return false;
}

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

@Override
  public void customize(Connector connector, HttpConfiguration channelConfig, Request request)
  {
    if (request.getHeader("Host") == null)
    {
      request.setServerName(serverName);
      if (serverPort > 0)
        request.setServerPort(serverPort);
    }
  }
}

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

@Override
public boolean parsedHostHeader(String host, int port)
{
  if (_uri.getHost()==null)
  {
    _request.setServerName(host);
    _request.setServerPort(port);
  }
  return false;
}

代码示例来源:origin: works.lmz.common/common-runnable-war

public static void rewriteProxyRequest(Request request) {
 String client = request.getHeader(CLIENT_HEADER);
 if (client != null && client.length() > 0) {
  InetSocketAddress realClient = new InetSocketAddress(client, 80);
  request.setRemoteAddr(realClient);
 }
 String scheme = request.getHeader(SCHEME_HEADER);
 if (scheme == null || scheme.equals("")) {
  scheme = HTTP_SCHEME;
 }
 request.setScheme(scheme);
 String hostAndPort = request.getHeader(HOST_HEADER);
 if (hostAndPort != null) {
  int ofs = hostAndPort.indexOf(':');
  if (ofs >= 0) {
   request.setServerName(hostAndPort.substring(0, ofs));
   request.setServerPort(Integer.parseInt(hostAndPort.substring(ofs + 1)));
  } else {
   request.setServerName(hostAndPort);
   request.setServerPort(HTTPS_SCHEME.equalsIgnoreCase(scheme) ? HTTPS_PORT : HTTP_PORT);
  }
 }
}

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

request.setServerPort(-1);
request.getServerName();
request.setServerPort(-1);
request.getServerName();

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

request.setServerPort(-1);
request.getServerName();
request.setServerPort(-1);
request.getServerName();

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

request.setServerPort(-1);
request.getServerName();
request.setServerPort(-1);
request.getServerName();

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

request.setServerPort(-1);
request.getServerName();
request.setServerPort(-1);
request.getServerName();

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

request.setServerPort(-1);
request.getServerName();
request.setServerPort(-1);
request.getServerName();

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

request.setServerPort(-1);
request.getServerName();
request.setServerPort(-1);
request.getServerName();

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

request.setServerPort(-1);
request.getServerName();
request.setServerPort(-1);
request.getServerName();

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

request.setServerPort(-1);
request.getServerName();
request.setServerPort(-1);
request.getServerName();

相关文章

Request类方法