Java Code Examples for io.netty.handler.codec.http.HttpResponseStatus#CONTINUE
The following examples show how to use
io.netty.handler.codec.http.HttpResponseStatus#CONTINUE .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HttpServerLifecycleChannelHandler.java From zuul with Apache License 2.0 | 5 votes |
@Override public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception { if (msg instanceof HttpResponse) { ctx.channel().attr(ATTR_HTTP_RESP).set((HttpResponse) msg); } try { super.write(ctx, msg, promise); } finally { if (msg instanceof LastHttpContent) { boolean dontFireCompleteYet = false; if (msg instanceof HttpResponse) { // Handle case of 100 CONTINUE, where server sends an initial 100 status response to indicate to client // that it can continue sending the initial request body. // ie. in this case we don't want to consider the state to be COMPLETE until after the 2nd response. if (((HttpResponse) msg).status() == HttpResponseStatus.CONTINUE) { dontFireCompleteYet = true; } } if (!dontFireCompleteYet) if (promise.isDone()) { fireCompleteEventIfNotAlready(ctx, CompleteReason.SESSION_COMPLETE); } else { promise.addListener(future -> { fireCompleteEventIfNotAlready(ctx, CompleteReason.SESSION_COMPLETE); }); } } } }
Example 2
Source File: HttpServerHandler.java From Sentinel-Dashboard-Nacos with Apache License 2.0 | 4 votes |
private void send100Continue(ChannelHandlerContext ctx) { FullHttpResponse response = new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.CONTINUE); ctx.write(response); }
Example 3
Source File: HttpRequestHandler.java From termd with Apache License 2.0 | 4 votes |
private static void send100Continue(ChannelHandlerContext ctx) { FullHttpResponse response = new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.CONTINUE); ctx.writeAndFlush(response); }
Example 4
Source File: HttpServerHandler.java From Sentinel with Apache License 2.0 | 4 votes |
private void send100Continue(ChannelHandlerContext ctx) { FullHttpResponse response = new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.CONTINUE); ctx.write(response); }
Example 5
Source File: HttpRequestHandler.java From arthas with Apache License 2.0 | 4 votes |
private static void send100Continue(ChannelHandlerContext ctx) { FullHttpResponse response = new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.CONTINUE); ctx.writeAndFlush(response); }
Example 6
Source File: NettyHttpServerHandler.java From pulsar with Apache License 2.0 | 4 votes |
private static void send100Continue(ChannelHandlerContext ctx) { FullHttpResponse response = new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.CONTINUE); ctx.write(response); }
Example 7
Source File: HttpRequestHandler.java From aesh-readline with Apache License 2.0 | 4 votes |
private static void send100Continue(ChannelHandlerContext ctx) { FullHttpResponse response = new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.CONTINUE); ctx.writeAndFlush(response); }
Example 8
Source File: EchoServerHttpRequestHandler.java From examples-javafx-repos1 with Apache License 2.0 | 4 votes |
private void send100Continue(ChannelHandlerContext ctx) { FullHttpResponse response = new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.CONTINUE); ctx.writeAndFlush( response ); }
Example 9
Source File: HttpRequestHandler.java From termd with Apache License 2.0 | 4 votes |
private static void send100Continue(ChannelHandlerContext ctx) { FullHttpResponse response = new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.CONTINUE); ctx.writeAndFlush(response); }