Mercurial Hosting > luan
comparison src/org/eclipse/jetty/server/handler/RequestLogHandler.java @ 929:3191abe890ef
remove isInitial()
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 09 Oct 2016 19:13:46 -0600 |
parents | 23a57aad34c0 |
children | a088981f9cd4 |
comparison
equal
deleted
inserted
replaced
928:23a57aad34c0 | 929:3191abe890ef |
---|---|
33 import javax.servlet.ServletException; | 33 import javax.servlet.ServletException; |
34 import javax.servlet.http.Cookie; | 34 import javax.servlet.http.Cookie; |
35 import javax.servlet.http.HttpServletRequest; | 35 import javax.servlet.http.HttpServletRequest; |
36 import javax.servlet.http.HttpServletResponse; | 36 import javax.servlet.http.HttpServletResponse; |
37 | 37 |
38 import org.eclipse.jetty.continuation.Continuation; | |
39 import org.eclipse.jetty.continuation.ContinuationListener; | |
40 import org.eclipse.jetty.http.HttpHeaders; | 38 import org.eclipse.jetty.http.HttpHeaders; |
41 import org.eclipse.jetty.server.AsyncContinuation; | 39 import org.eclipse.jetty.server.AsyncContinuation; |
42 import org.eclipse.jetty.server.Request; | 40 import org.eclipse.jetty.server.Request; |
43 import org.eclipse.jetty.server.Response; | 41 import org.eclipse.jetty.server.Response; |
44 import org.eclipse.jetty.server.Server; | 42 import org.eclipse.jetty.server.Server; |
63 */ | 61 */ |
64 @Override | 62 @Override |
65 public void handle(String target, final Request baseRequest, HttpServletRequest request, final HttpServletResponse response) | 63 public void handle(String target, final Request baseRequest, HttpServletRequest request, final HttpServletResponse response) |
66 throws IOException, ServletException | 64 throws IOException, ServletException |
67 { | 65 { |
68 AsyncContinuation continuation = baseRequest.getAsyncContinuation(); | 66 baseRequest.setDispatchTime(System.currentTimeMillis()); |
69 if (!continuation.isInitial()) | |
70 { | |
71 baseRequest.setDispatchTime(System.currentTimeMillis()); | |
72 } | |
73 | 67 |
74 try | 68 try |
75 { | 69 { |
76 super.handle(target, baseRequest, request, response); | 70 super.handle(target, baseRequest, request, response); |
77 } | 71 } |
171 buf.append(' '); | 165 buf.append(' '); |
172 buf.append(request.getUri().toString()); | 166 buf.append(request.getUri().toString()); |
173 buf.append(' '); | 167 buf.append(' '); |
174 buf.append(request.getProtocol()); | 168 buf.append(request.getProtocol()); |
175 buf.append("\" "); | 169 buf.append("\" "); |
176 if (request.getAsyncContinuation().isInitial()) | 170 |
177 { | 171 int status = response.getStatus(); |
178 int status = response.getStatus(); | 172 if (status <= 0) |
179 if (status <= 0) | 173 status = 404; |
180 status = 404; | 174 buf.append((char)('0' + ((status / 100) % 10))); |
181 buf.append((char)('0' + ((status / 100) % 10))); | 175 buf.append((char)('0' + ((status / 10) % 10))); |
182 buf.append((char)('0' + ((status / 10) % 10))); | 176 buf.append((char)('0' + (status % 10))); |
183 buf.append((char)('0' + (status % 10))); | |
184 } | |
185 else | |
186 buf.append("Async"); | |
187 | 177 |
188 long responseLength = response.getContentCount(); | 178 long responseLength = response.getContentCount(); |
189 if (responseLength >= 0) | 179 if (responseLength >= 0) |
190 { | 180 { |
191 buf.append(' '); | 181 buf.append(' '); |