本文整理了Java中org.eclipse.jetty.server.Request.setServerName
方法的一些代码示例,展示了Request.setServerName
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.setServerName
方法的具体详情如下:
包路径:org.eclipse.jetty.server.Request
类名称: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);
内容来源于网络,如有侵权,请联系作者删除!