} catch (Throwable t) {
ExceptionUtils.handleThrowable(t);
getLog().error(sm.getString("http11processor.request.process"), t);
- // 500 - Internal Server Error
- response.setStatus(500);
- adapter.log(request, response, 0);
error = true;
+ } finally {
+ if (error) {
+ // 500 - Internal Server Error
+ response.setStatus(500);
+ adapter.log(request, response, 0);
+ }
}
rp.setStage(org.apache.coyote.Constants.STAGE_ENDED);
} catch (Throwable t) {
ExceptionUtils.handleThrowable(t);
log.error(sm.getString("http11processor.request.process"), t);
- // 500 - Internal Server Error
- response.setStatus(500);
- adapter.log(request, response, 0);
error = true;
+ } finally {
+ if (error) {
+ // 500 - Internal Server Error
+ response.setStatus(500);
+ adapter.log(request, response, 0);
+ }
}
rp.setStage(org.apache.coyote.Constants.STAGE_ENDED);
} catch (Throwable t) {
ExceptionUtils.handleThrowable(t);
log.error(sm.getString("http11processor.request.process"), t);
- // 500 - Internal Server Error
- response.setStatus(500);
- adapter.log(request, response, 0);
error = true;
+ } finally {
+ if (error) {
+ // 500 - Internal Server Error
+ response.setStatus(500);
+ adapter.log(request, response, 0);
+ }
}
rp.setStage(org.apache.coyote.Constants.STAGE_ENDED);
} catch (Throwable t) {
ExceptionUtils.handleThrowable(t);
log.error(sm.getString("http11processor.request.process"), t);
- // 500 - Internal Server Error
- response.setStatus(500);
- adapter.log(request, response, 0);
error = true;
+ } finally {
+ if (error) {
+ // 500 - Internal Server Error
+ response.setStatus(500);
+ adapter.log(request, response, 0);
+ }
}
rp.setStage(org.apache.coyote.Constants.STAGE_ENDED);
ServletRequestListener implementations to read the request body. Based
on a patch by Simon Olofsson. (markt)
</fix>
+ <fix>
+ Ensure an access log entry is made if an error occurs during
+ asynchronous request processing and the socket is immediately closed.
+ (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Coyote">