Skip to content

Commit

Permalink
v2.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
arnett, stu committed Aug 31, 2015
1 parent e83f4d8 commit bd5e16f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/com/emc/rest/smart/SmartFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,12 @@ public ClientResponse handle(ClientRequest request) throws ClientHandlerExceptio
ClientResponse response = getNext().handle(request);

// capture request stats
host.callComplete(false);
if (response.getStatus() >= 500 && response.getStatus() != 501) {
// except for 501 (not implemented), all 50x responses are considered server errors
host.callComplete(true);
} else {
host.callComplete(false);
}

// wrap the input stream so we can capture the actual connection close
response.setEntityInputStream(new WrappedInputStream(response.getEntityInputStream(), host));
Expand Down

0 comments on commit bd5e16f

Please sign in to comment.