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","51");
    return request;
  }
 
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","51");
    return request;
  }
 
  public static final void assertCreateRESPMODWithGetRequestNoBody(IcapRequest message) {
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","51");
    return request;
  }
 
  public static final void assertCreateRESPMODWithGetRequestNoBody(IcapRequest message) {
    assertEquals("Uri is wrong","icap://icap.mimo.ch:1344/reqmod",message.getUri());
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);
    response.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 response;
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);
    response.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 response;
  }
View Full Code Here

    httpRequest.addHeader("Accept-Encoding","gzip, compress");
    HttpResponse httpResponse = new DefaultHttpResponse(HttpVersion.HTTP_1_1,HttpResponseStatus.OK);
    response.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 response;
  }
 
View Full Code Here

    HttpResponse httpResponse = new DefaultHttpResponse(HttpVersion.HTTP_1_1,HttpResponseStatus.OK);
    response.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 response;
  }
 
  public static final ChannelBuffer createRESPMODWithGetRequestNoBodyResponse() throws UnsupportedEncodingException {
View Full Code Here

    response.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 response;
  }
 
  public static final ChannelBuffer createRESPMODWithGetRequestNoBodyResponse() throws UnsupportedEncodingException {
    ChannelBuffer buffer = ChannelBuffers.dynamicBuffer();
View Full Code Here

    String[] initialLine = IcapDecoderUtil.splitInitialLine(line);
    HttpResponse message = new DefaultHttpResponse(HttpVersion.valueOf(initialLine[0]),HttpResponseStatus.valueOf(Integer.parseInt(initialLine[1])));
    icapMessageDecoder.message.setHttpResponse(message);
    List<String[]> headerList = IcapDecoderUtil.readHeaders(buffer,icapMessageDecoder.maxHttpHeaderSize);
    for(String[] header : headerList) {
      message.addHeader(header[0],header[1]);
    }
    Encapsulated encapsulated = icapMessageDecoder.message.getEncapsulatedHeader();
    encapsulated.setEntryAsProcessed(encapsulated.getNextEntry());
    if(encapsulated.getNextEntry() != null && encapsulated.getNextEntry().equals(IcapMessageElementEnum.REQHDR)) {
      return StateReturnValue.createIrrelevantResult();
View Full Code Here

      if (request.getMethod() == HttpMethod.OPTIONS) {
        // Mimic SPNEGO authentication
        HttpResponse response = new DefaultHttpResponse(HTTP_1_1,
            HttpResponseStatus.OK);
        response.addHeader("Set-Cookie", "hadoop-auth=1234");
        e.getChannel().write(response).addListener(ChannelFutureListener.CLOSE);
      } else if (request.getMethod() != GET) {
        e.getChannel().close();
      }
      UnmodifiableIterator<Map.Entry<String, Handler>> iter = routes.entrySet()
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.