Package org.jboss.netty.handler.codec.http

Examples of org.jboss.netty.handler.codec.http.HttpResponse.addHeader()


    httpRequest.addHeader("Accept-Encoding","gzip, compress");
    HttpResponse httpResponse = new DefaultHttpResponse(HttpVersion.HTTP_1_1,HttpResponseStatus.OK);
    request.setHttpResponse(httpResponse);
    httpResponse.addHeader("Date","Mon, 10 Jan 2000 09:52:22 GMT");
    httpResponse.addHeader("Server","Apache/1.3.6 (Unix)");
    httpResponse.addHeader("ETag","\"63840-1ab7-378d415b\"");
    httpResponse.addHeader("Content-Type","text/html");
    httpResponse.addHeader("Content-Length","151");
    ChannelBuffer buffer = ChannelBuffers.dynamicBuffer();
    buffer.writeBytes("This is data that was returned by an orig".getBytes(IcapCodecUtil.ASCII_CHARSET));
    httpResponse.setContent(buffer);
View Full Code Here


    HttpResponse httpResponse = new DefaultHttpResponse(HttpVersion.HTTP_1_1,HttpResponseStatus.OK);
    request.setHttpResponse(httpResponse);
    httpResponse.addHeader("Date","Mon, 10 Jan 2000 09:52:22 GMT");
    httpResponse.addHeader("Server","Apache/1.3.6 (Unix)");
    httpResponse.addHeader("ETag","\"63840-1ab7-378d415b\"");
    httpResponse.addHeader("Content-Type","text/html");
    httpResponse.addHeader("Content-Length","151");
    ChannelBuffer buffer = ChannelBuffers.dynamicBuffer();
    buffer.writeBytes("This is data that was returned by an orig".getBytes(IcapCodecUtil.ASCII_CHARSET));
    httpResponse.setContent(buffer);
    return request;
View Full Code Here

    request.setHttpResponse(httpResponse);
    httpResponse.addHeader("Date","Mon, 10 Jan 2000 09:52:22 GMT");
    httpResponse.addHeader("Server","Apache/1.3.6 (Unix)");
    httpResponse.addHeader("ETag","\"63840-1ab7-378d415b\"");
    httpResponse.addHeader("Content-Type","text/html");
    httpResponse.addHeader("Content-Length","151");
    ChannelBuffer buffer = ChannelBuffers.dynamicBuffer();
    buffer.writeBytes("This is data that was returned by an orig".getBytes(IcapCodecUtil.ASCII_CHARSET));
    httpResponse.setContent(buffer);
    return request;
  }
View Full Code Here

    IcapResponse response = new DefaultIcapResponse(IcapVersion.ICAP_1_0,IcapResponseStatus.OK);
    response.addHeader("Host","icap-server.net");
    response.addHeader("ISTag","Serial-0815");
    HttpResponse httpResponse = new DefaultHttpResponse(HttpVersion.HTTP_1_1,HttpResponseStatus.OK);
    response.setHttpResponse(httpResponse);
    httpResponse.addHeader("Host","www.origin-server.com");
    httpResponse.addHeader("Accept","text/html, text/plain");
    httpResponse.addHeader("Accept-Encoding","compress");
    httpResponse.addHeader("Cookie","ff39fk3jur@4ii0e02i");
    httpResponse.addHeader("If-None-Match","\"xyzzy\", \"r2d2xxxx\"");
    return response;
View Full Code Here

    response.addHeader("Host","icap-server.net");
    response.addHeader("ISTag","Serial-0815");
    HttpResponse httpResponse = new DefaultHttpResponse(HttpVersion.HTTP_1_1,HttpResponseStatus.OK);
    response.setHttpResponse(httpResponse);
    httpResponse.addHeader("Host","www.origin-server.com");
    httpResponse.addHeader("Accept","text/html, text/plain");
    httpResponse.addHeader("Accept-Encoding","compress");
    httpResponse.addHeader("Cookie","ff39fk3jur@4ii0e02i");
    httpResponse.addHeader("If-None-Match","\"xyzzy\", \"r2d2xxxx\"");
    return response;
  }
View Full Code Here

    response.addHeader("ISTag","Serial-0815");
    HttpResponse httpResponse = new DefaultHttpResponse(HttpVersion.HTTP_1_1,HttpResponseStatus.OK);
    response.setHttpResponse(httpResponse);
    httpResponse.addHeader("Host","www.origin-server.com");
    httpResponse.addHeader("Accept","text/html, text/plain");
    httpResponse.addHeader("Accept-Encoding","compress");
    httpResponse.addHeader("Cookie","ff39fk3jur@4ii0e02i");
    httpResponse.addHeader("If-None-Match","\"xyzzy\", \"r2d2xxxx\"");
    return response;
  }
 
View Full Code Here

    HttpResponse httpResponse = new DefaultHttpResponse(HttpVersion.HTTP_1_1,HttpResponseStatus.OK);
    response.setHttpResponse(httpResponse);
    httpResponse.addHeader("Host","www.origin-server.com");
    httpResponse.addHeader("Accept","text/html, text/plain");
    httpResponse.addHeader("Accept-Encoding","compress");
    httpResponse.addHeader("Cookie","ff39fk3jur@4ii0e02i");
    httpResponse.addHeader("If-None-Match","\"xyzzy\", \"r2d2xxxx\"");
    return response;
  }
 
  public static final void assertREQMODWithGetRequestResponse(IcapResponse response) {
View Full Code Here

    response.setHttpResponse(httpResponse);
    httpResponse.addHeader("Host","www.origin-server.com");
    httpResponse.addHeader("Accept","text/html, text/plain");
    httpResponse.addHeader("Accept-Encoding","compress");
    httpResponse.addHeader("Cookie","ff39fk3jur@4ii0e02i");
    httpResponse.addHeader("If-None-Match","\"xyzzy\", \"r2d2xxxx\"");
    return response;
  }
 
  public static final void assertREQMODWithGetRequestResponse(IcapResponse response) {
    assertEquals("wrong protocol version",IcapVersion.ICAP_1_0,response.getProtocolVersion());
View Full Code Here

    httpRequest.addHeader("Host","www.origin-server.com");
    httpRequest.addHeader("Accept","text/html, text/plain, image/gif");
    httpRequest.addHeader("Accept-Encoding","gzip, compress");
    HttpResponse httpResponse = new DefaultHttpResponse(HttpVersion.HTTP_1_1,HttpResponseStatus.OK);
    request.setHttpResponse(httpResponse);
    httpResponse.addHeader("Date","Mon, 10 Jan 2000 09:52:22 GMT");
    httpResponse.addHeader("Server","Apache/1.3.6 (Unix)");
    httpResponse.addHeader("ETag","\"63840-1ab7-378d415b\"");
    httpResponse.addHeader("Content-Type","text/html");
    httpResponse.addHeader("Content-Length","51");
    return request;
View Full Code Here

    httpRequest.addHeader("Accept","text/html, text/plain, image/gif");
    httpRequest.addHeader("Accept-Encoding","gzip, compress");
    HttpResponse httpResponse = new DefaultHttpResponse(HttpVersion.HTTP_1_1,HttpResponseStatus.OK);
    request.setHttpResponse(httpResponse);
    httpResponse.addHeader("Date","Mon, 10 Jan 2000 09:52:22 GMT");
    httpResponse.addHeader("Server","Apache/1.3.6 (Unix)");
    httpResponse.addHeader("ETag","\"63840-1ab7-378d415b\"");
    httpResponse.addHeader("Content-Type","text/html");
    httpResponse.addHeader("Content-Length","51");
    return request;
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.