@ Override public void makeInsecure ( HttpServletRequest request , HttpServletResponse response ) throws IOException { response . setStatus ( HttpServletResponse . SC_MOVED_PERMANENTLY ) ; response . setHeader ( "Location" , insecureUrl ( request , response ) ) ; response . getOutputStream ( ) . flush ( ) ; response . getOutputStream ( ) . close ( ) ; }
Sends a moved perminately redirect to the insecure form of the request URL .