public static void sendNotModified ( ChannelHandlerContext ctx ) { FullHttpResponse response = new DefaultFullHttpResponse ( HTTP_1_1 , NOT_MODIFIED ) ; setDateHeader ( response ) ; // close the connection as soon as the error message is sent. ctx . writeAndFlush ( response ) . addListener ( ChannelFutureListener . CLOSE ) ; }
Send the 304 Not Modified response . This response can be used when the file timestamp is the same as what the browser is sending up .