public void inputReady(final NHttpClientConnection conn, final ContentDecoder decoder) {
HttpContext context = conn.getContext();
ClientConnState connState = (ClientConnState) context.getAttribute(CONN_STATE);
ContentInputBuffer buffer = connState.getInbuffer();
try {
buffer.consumeContent(decoder);
if (decoder.isCompleted()) {
connState.setInputState(ClientConnState.RESPONSE_BODY_DONE);
processResponse(conn, connState);
} else {
connState.setInputState(ClientConnState.RESPONSE_BODY_STREAM);