404326 set status when Request.setHandled(true) is called

This commit is contained in:
Greg Wilkins 2013-03-26 23:36:18 +11:00
parent 968b315926
commit 108a8e9dca
4 changed files with 7 additions and 3 deletions

View File

@ -150,11 +150,11 @@ public class LikeJettyXml
// === jetty-requestlog.xml === // === jetty-requestlog.xml ===
NCSARequestLog requestLog = new NCSARequestLog(); NCSARequestLog requestLog = new NCSARequestLog();
requestLog.setFilename(jetty_home + "/logs/jetty-yyyy_mm_dd.log"); requestLog.setFilename(jetty_home + "/logs/yyyy_mm_dd.request.log");
requestLog.setFilenameDateFormat("yyyy_MM_dd"); requestLog.setFilenameDateFormat("yyyy_MM_dd");
requestLog.setRetainDays(90); requestLog.setRetainDays(90);
requestLog.setAppend(true); requestLog.setAppend(true);
requestLog.setExtended(false); requestLog.setExtended(true);
requestLog.setLogCookies(false); requestLog.setLogCookies(false);
requestLog.setLogTimeZone("GMT"); requestLog.setLogTimeZone("GMT");
RequestLogHandler requestLogHandler = new RequestLogHandler(); RequestLogHandler requestLogHandler = new RequestLogHandler();

View File

@ -19,7 +19,7 @@
<Set name="filenameDateFormat">yyyy_MM_dd</Set> <Set name="filenameDateFormat">yyyy_MM_dd</Set>
<Set name="retainDays">90</Set> <Set name="retainDays">90</Set>
<Set name="append">true</Set> <Set name="append">true</Set>
<Set name="extended">false</Set> <Set name="extended">true</Set>
<Set name="logCookies">false</Set> <Set name="logCookies">false</Set>
<Set name="LogTimeZone">GMT</Set> <Set name="LogTimeZone">GMT</Set>
</New> </New>

View File

@ -84,6 +84,7 @@ public abstract class AbstractNCSARequestLog extends AbstractLifeCycle implement
* *
* @see org.eclipse.jetty.server.RequestLog#log(org.eclipse.jetty.server.Request, org.eclipse.jetty.server.Response) * @see org.eclipse.jetty.server.RequestLog#log(org.eclipse.jetty.server.Request, org.eclipse.jetty.server.Response)
*/ */
@Override
public void log(Request request, Response response) public void log(Request request, Response response)
{ {
try try

View File

@ -1768,6 +1768,9 @@ public class Request implements HttpServletRequest
public void setHandled(boolean h) public void setHandled(boolean h)
{ {
_handled = h; _handled = h;
Response r=getResponse();
if (_handled && r.getStatus()==0)
r.setStatus(200);
} }
/* ------------------------------------------------------------ */ /* ------------------------------------------------------------ */