Skip to content

Commit 3b51ec4

Browse files
committed
Revert a change introduced in the fix for bug 60718 that changed the status code recorded in the access log when the client dropped the connection from 200 to 500.
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1797828 13f79535-47bb-0310-9956-ffa450edef68
1 parent b527e70 commit 3b51ec4

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

java/org/apache/coyote/AbstractProcessor.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,10 @@ protected AbstractProcessor(Request coyoteRequest, Response coyoteResponse) {
8080
protected void setErrorState(ErrorState errorState, Throwable t) {
8181
boolean blockIo = this.errorState.isIoAllowed() && !errorState.isIoAllowed();
8282
this.errorState = this.errorState.getMostSevere(errorState);
83-
if (response.getStatus() < 400) {
83+
// Don't change the status code for IOException since that is almost
84+
// certainly a client disconnect in which case it is preferable to keep
85+
// the original status code http://markmail.org/message/4cxpwmxhtgnrwh7n
86+
if (response.getStatus() < 400 && !(t instanceof IOException)) {
8487
response.setStatus(500);
8588
}
8689
if (t != null) {

webapps/docs/changelog.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@
9393
<bug>61120</bug>: Do not ignore path parameters when processing HTTP/2
9494
requests. (markt)
9595
</fix>
96+
<fix>
97+
Revert a change introduced in the fix for bug <bug>60718</bug> that
98+
changed the status code recorded in the access log when the client
99+
dropped the connection from 200 to 500. (markt)
100+
</fix>
96101
</changelog>
97102
</subsection>
98103
<subsection name="Jasper">

0 commit comments

Comments
 (0)