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

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

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

Request.setServerName介绍

暂无

代码示例

代码示例来源: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: org.eclipse.jetty.aggregate/jetty-all-server

public void parsedServerName(Buffer name) throws IOException
{
  if (name != null && name.length()>0)
  {
    _request.setServerName(name.toString());
  }
}

代码示例来源: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.setServerName(null);
request.setServerPort(-1);
request.getServerName();
request.setServerName(null);
request.setServerPort(-1);
request.getServerName();
request.setServerName(forwardedServer);

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

request.setServerName(null);
request.setServerPort(-1);
request.getServerName();
request.setServerName(null);
request.setServerPort(-1);
request.getServerName();
request.setServerName(forwardedServer);

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

request.setServerName(null);
request.setServerPort(-1);
request.getServerName();
request.setServerName(null);
request.setServerPort(-1);
request.getServerName();
request.setServerName(forwardedServer);

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

request.setServerName(null);
request.setServerPort(-1);
request.getServerName();
request.setServerName(null);
request.setServerPort(-1);
request.getServerName();
request.setServerName(forwardedServer);

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

request.setServerName(null);
request.setServerPort(-1);
request.getServerName();
request.setServerName(null);
request.setServerPort(-1);
request.getServerName();
request.setServerName(forwardedServer);

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

request.setServerName(null);
request.setServerPort(-1);
request.getServerName();
request.setServerName(null);
request.setServerPort(-1);
request.getServerName();
request.setServerName(forwardedServer);

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

request.setServerName(null);
request.setServerPort(-1);
request.getServerName();
request.setServerName(null);
request.setServerPort(-1);
request.getServerName();
request.setServerName(forwardedServer);

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

request.setServerName(null);
request.setServerPort(-1);
request.getServerName();
request.setServerName(null);
request.setServerPort(-1);
request.getServerName();
request.setServerName(forwardedServer);

相关文章

Request类方法