comparison src/org/eclipse/jetty/server/handler/RequestLogHandler.java @ 1000:32d4b569567c

simplify handle()
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 19 Oct 2016 04:22:51 -0600
parents 7d28be82ab75
children
comparison
equal deleted inserted replaced
999:74b9daf2826c 1000:32d4b569567c
29 import java.util.Locale; 29 import java.util.Locale;
30 import java.util.TimeZone; 30 import java.util.TimeZone;
31 31
32 import javax.servlet.ServletException; 32 import javax.servlet.ServletException;
33 import javax.servlet.http.Cookie; 33 import javax.servlet.http.Cookie;
34 import javax.servlet.http.HttpServletRequest;
35 import javax.servlet.http.HttpServletResponse; 34 import javax.servlet.http.HttpServletResponse;
36 35
37 import org.eclipse.jetty.http.HttpHeaders; 36 import org.eclipse.jetty.http.HttpHeaders;
38 import org.eclipse.jetty.server.Request; 37 import org.eclipse.jetty.server.Request;
39 import org.eclipse.jetty.server.Response; 38 import org.eclipse.jetty.server.Response;
51 */ 50 */
52 public class RequestLogHandler extends HandlerWrapper 51 public class RequestLogHandler extends HandlerWrapper
53 { 52 {
54 private static final Logger LOG = LoggerFactory.getLogger(RequestLogHandler.class); 53 private static final Logger LOG = LoggerFactory.getLogger(RequestLogHandler.class);
55 54
56 /* ------------------------------------------------------------ */
57 /*
58 * @see org.eclipse.jetty.server.server.Handler#handle(java.lang.String, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, int)
59 */
60 @Override 55 @Override
61 public void handle(String target, final Request baseRequest, HttpServletRequest request, final HttpServletResponse response) 56 public void handle(String target, final Request request, final HttpServletResponse response)
62 throws IOException, ServletException 57 throws IOException, ServletException
63 { 58 {
64 try 59 try
65 { 60 {
66 super.handle(target, baseRequest, request, response); 61 super.handle(target, request, response);
67 } 62 }
68 finally 63 finally
69 { 64 {
70 log(baseRequest, (Response)response); 65 log(request, (Response)response);
71 } 66 }
72 } 67 }
73 68
74 /* ------------------------------------------------------------ */ 69 /* ------------------------------------------------------------ */
75 70