comparison src/goodjava/webserver/handlers/SafeHandler.java @ 1607:fa066aaa068c

nginx caching
author Franklin Schmidt <fschmidt@gmail.com>
date Fri, 30 Apr 2021 20:23:28 -0600
parents 27efb1fcbcb5
children
comparison
equal deleted inserted replaced
1606:7c7f28c724e8 1607:fa066aaa068c
29 return response; 29 return response;
30 } catch(RuntimeException e) { 30 } catch(RuntimeException e) {
31 logger.error("",e); 31 logger.error("",e);
32 Response response = new Response(); 32 Response response = new Response();
33 response.status = Status.INTERNAL_SERVER_ERROR; 33 response.status = Status.INTERNAL_SERVER_ERROR;
34 response.headers.put( "content-type", "text/plain; charset=utf-8" ); 34 response.headers.put( "Content-Type", "text/plain; charset=utf-8" );
35 PrintWriter writer = new PrintWriter( new ResponseOutputStream(response) ); 35 PrintWriter writer = new PrintWriter( new ResponseOutputStream(response) );
36 writer.write( "Internel Server Error\n\n" ); 36 writer.write( "Internel Server Error\n\n" );
37 e.printStackTrace(writer); 37 e.printStackTrace(writer);
38 writer.close(); 38 writer.close();
39 return response; 39 return response;