NettyHttpFileHandler.java 文件源码

java
阅读 25 收藏 0 点赞 0 评论 0

项目:TFWebSock 作者:
/**
 * When file timestamp is the same as what the browser is sending up, send a "304 Not Modified"
 *
 * @param ctx
 *            Context
 */
public void sendNotModified(ChannelHandlerContext ctx) {
   FullHttpResponse response = new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.NOT_MODIFIED);
   setDateHeader(response);

   // Close the connection as soon as the error message is sent.
   ctx.writeAndFlush(response).addListener(ChannelFutureListener.CLOSE);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号