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

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

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

Request.setRemoteAddr介绍

暂无

代码示例

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

public void parsedRemoteAddr(Buffer addr) throws IOException
{
  if (addr != null && addr.length()>0)
  {
    _request.setRemoteAddr(addr.toString());
  }
}

代码示例来源: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: jenkinsci/winstone

request.setRemoteAddr(InetSocketAddress.createUnresolved(rfc7239._for.getHost(),rfc7239._for.getPort()));
request.setRemoteAddr(InetSocketAddress.createUnresolved(forwardedFor,request.getRemotePort()));

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

request.setRemoteAddr(forwardedFor);
InetAddress inetAddress = null;

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

request.setRemoteAddr(forwardedFor);
InetAddress inetAddress = null;

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

request.setRemoteAddr(forwardedFor);
InetAddress inetAddress = null;

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

request.setRemoteAddr(forwardedFor);
InetAddress inetAddress = null;

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

request.setRemoteAddr(forwardedFor);
InetAddress inetAddress = null;

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

request.setRemoteAddr(InetSocketAddress.createUnresolved(forwardedFor,request.getRemotePort()));

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

request.setRemoteAddr(new InetSocketAddress(forwardedFor,request.getRemotePort()));

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

request.setRemoteAddr(new InetSocketAddress(forwardedFor,request.getRemotePort()));

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

request.setRemoteAddr(InetSocketAddress.createUnresolved(forwardedFor,request.getRemotePort()));

相关文章

Request类方法