本文整理了Java中org.mortbay.jetty.Request.getHeader
方法的一些代码示例,展示了Request.getHeader
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getHeader
方法的具体详情如下:
包路径:org.mortbay.jetty.Request
类名称:Request
方法名:getHeader
暂无
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
protected void logExtended(Request request,
Response response,
Writer writer) throws IOException
{
String referer = request.getHeader(HttpHeaders.REFERER);
if (referer == null)
writer.write("\"-\" ");
else
{
writer.write('"');
writer.write(referer);
writer.write("\" ");
}
String agent = request.getHeader(HttpHeaders.USER_AGENT);
if (agent == null)
writer.write("\"-\" ");
else
{
writer.write('"');
writer.write(agent);
writer.write('"');
}
}
代码示例来源:origin: com.twitter.common/net-http
buf.append(' ');
String addr = request.getHeader(HttpHeaders.X_FORWARDED_FOR);
if (addr == null) {
addr = request.getRemoteAddr();
buf.append(' ');
String referer = request.getHeader(HttpHeaders.REFERER);
if (referer == null) {
buf.append("\"-\" ");
String agent = request.getHeader(HttpHeaders.USER_AGENT);
if (agent == null) {
buf.append("\"-\" ");
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
if (_preferProxiedForAddress)
addr = request.getHeader(HttpHeaders.X_FORWARDED_FOR);
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
String credentials = request.getHeader(HttpHeaders.AUTHORIZATION);
代码示例来源:origin: org.mortbay.jetty/jetty-security
String credentials = request.getHeader(HttpHeaders.AUTHORIZATION);
代码示例来源:origin: org.mortbay.jetty/jetty-security
String credentials = request.getHeader(HttpHeaders.AUTHORIZATION);
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
String credentials = request.getHeader(HttpHeaders.AUTHORIZATION);
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
public void sendProcessing() throws IOException
{
Generator g = _connection.getGenerator();
if (g instanceof HttpGenerator)
{
HttpGenerator generator = (HttpGenerator)g;
String expect = _connection.getRequest().getHeader(HttpHeaders.EXPECT);
if (expect!=null && expect.startsWith("102") && generator.getVersion()>=HttpVersions.HTTP_1_1_ORDINAL)
{
boolean was_persistent=generator.isPersistent();
generator.setResponse(HttpStatus.ORDINAL_102_Processing,null);
generator.completeHeader(null,true);
generator.setPersistent(true);
generator.complete();
generator.flush();
generator.reset(false);
generator.setPersistent(was_persistent);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!