boolean isGracefullyFinishResponseOnClose() { final HttpResponsePacket response = responsePacket; return response != null && !response.getProcessingState().isKeepAlive() && !response.isChunked() && response.getContentLength() == -1; }
@Override public NextAction handleEvent(final FilterChainContext ctx, final FilterChainEvent event) throws IOException { if (event.type() == GracefulCloseEvent.class) { // Connection was closed. // This event is fired only for responses, which don't have // associated transfer-encoding or content-length. // We have to complete such a request-response processing gracefully. final GracefulCloseEvent closeEvent = (GracefulCloseEvent) event; final HttpResponsePacket response = closeEvent.getHttpTxContext().responsePacket; response.getProcessingState().getHttpContext().attach(ctx); onHttpPacketParsed(response, ctx); return ctx.getStopAction(); } return ctx.getInvokeAction(); }
if (responsePacket.getProcessingState().isKeepAlive() && isSameHostAndProtocol(origUri, redirectUri)) {
if (responsePacket.getProcessingState().isKeepAlive()) {
public FileSendEntry(final FilterChainContext ctx, final HttpResponsePacket response, final FileInputStream fis, final FileChannel fc, final long size) { this.ctx = ctx; this.response = response; this.fis = fis; this.fc = fc; this.remaining = size; final HttpContext httpContext = response.getProcessingState().getHttpContext(); assert httpContext != null; output = httpContext.getOutputSink(); }
if (responsePacket.getProcessingState().isKeepAlive()) {
boolean isGracefullyFinishResponseOnClose() { final HttpResponsePacket response = responsePacket; return response != null && !response.getProcessingState().isKeepAlive() && !response.isChunked() && response.getContentLength() == -1; }
boolean isGracefullyFinishResponseOnClose() { final HttpResponsePacket response = responsePacket; return response != null && !response.getProcessingState().isKeepAlive() && !response.isChunked() && response.getContentLength() == -1; }
boolean isGracefullyFinishResponseOnClose() { final HttpResponsePacket response = responsePacket; return response != null && !response.getProcessingState().isKeepAlive() && !response.isChunked() && response.getContentLength() == -1; }
boolean isGracefullyFinishResponseOnClose() { final HttpResponsePacket response = responseStatus.getResponse(); return !response.getProcessingState().isKeepAlive() && !response.isChunked() && response.getContentLength() == -1; }
private void commitAndCloseAsError(FilterChainContext ctx, HttpResponsePacket response) { final HttpContent errorHttpResponse = customizeErrorResponse(response); final Buffer resBuf = encodeHttpPacket(ctx, errorHttpResponse); ctx.write(resBuf); response.getProcessingState().getHttpContext().close(); }
private void commitAndCloseAsError(FilterChainContext ctx, HttpResponsePacket response) { final HttpContent errorHttpResponse = customizeErrorResponse(response); final Buffer resBuf = encodeHttpPacket(ctx, errorHttpResponse); ctx.write(resBuf); response.getProcessingState().getHttpContext().close(); }
private void commitAndCloseAsError(FilterChainContext ctx, HttpResponsePacket response) { final HttpContent errorHttpResponse = customizeErrorResponse(response); final Buffer resBuf = encodeHttpPacket(ctx, errorHttpResponse); ctx.write(resBuf); response.getProcessingState().getHttpContext().close(); }
private void commitAndCloseAsError(FilterChainContext ctx, HttpResponsePacket response) { final HttpContent errorHttpResponse = customizeErrorResponse(response); final Buffer resBuf = encodeHttpPacket(ctx, errorHttpResponse); ctx.write(resBuf); response.getProcessingState().getHttpContext().close(); }
private void commitAndCloseAsError(FilterChainContext ctx, HttpResponsePacket response) { final HttpContent errorHttpResponse = customizeErrorResponse(response); final Buffer resBuf = encodeHttpPacket(ctx, errorHttpResponse); ctx.write(resBuf); response.getProcessingState().getHttpContext().close(); }
private void commitAndCloseAsError(FilterChainContext ctx, HttpResponsePacket response) { final HttpContent errorHttpResponse = customizeErrorResponse(response); final Buffer resBuf = encodeHttpPacket(ctx, errorHttpResponse); ctx.write(resBuf); response.getProcessingState().getHttpContext().close(); }
private void commitAndCloseAsError(FilterChainContext ctx, HttpResponsePacket response) { final HttpContent errorHttpResponse = customizeErrorResponse(response); final Buffer resBuf = encodeHttpPacket(ctx, errorHttpResponse); ctx.write(resBuf); response.getProcessingState().getHttpContext().close(); }
private void commitAndCloseAsError(FilterChainContext ctx, HttpResponsePacket response) { final HttpContent errorHttpResponse = customizeErrorResponse(response); final Buffer resBuf = encodeHttpPacket(ctx, errorHttpResponse); ctx.write(resBuf); response.getProcessingState().getHttpContext().close(); }
private void commitAndCloseAsError(FilterChainContext ctx, HttpResponsePacket response) { final HttpContent errorHttpResponse = customizeErrorResponse(response); final Buffer resBuf = encodeHttpPacket(ctx, errorHttpResponse); ctx.write(resBuf); response.getProcessingState().getHttpContext().close(); }
private void commitAndCloseAsError(FilterChainContext ctx, HttpResponsePacket response) { final HttpContent errorHttpResponse = customizeErrorResponse(response); final Buffer resBuf = encodeHttpPacket(ctx, errorHttpResponse); ctx.write(resBuf); response.getProcessingState().getHttpContext().close(); }