Lines Matching defs:response
46 * A response interceptor that sets up entity-related headers.
66 public void process(final HttpResponse response, final HttpContext context)
68 if (response == null) {
71 if (response.containsHeader(HTTP.TRANSFER_ENCODING)) {
74 if (response.containsHeader(HTTP.CONTENT_LEN)) {
77 ProtocolVersion ver = response.getStatusLine().getProtocolVersion();
78 HttpEntity entity = response.getEntity();
82 response.addHeader(HTTP.TRANSFER_ENCODING, HTTP.CHUNK_CODING);
84 response.addHeader(HTTP.CONTENT_LEN, Long.toString(entity.getContentLength()));
87 if (entity.getContentType() != null && !response.containsHeader(
89 response.addHeader(entity.getContentType());
92 if (entity.getContentEncoding() != null && !response.containsHeader(
94 response.addHeader(entity.getContentEncoding());
97 int status = response.getStatusLine().getStatusCode();
101 response.addHeader(HTTP.CONTENT_LEN, "0");