From bd5e16f82a8246993f9a6c6cc22b13daf1d1206a Mon Sep 17 00:00:00 2001 From: "arnett, stu" Date: Mon, 31 Aug 2015 14:14:29 -0500 Subject: [PATCH] v2.0.4 --- src/main/java/com/emc/rest/smart/SmartFilter.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/emc/rest/smart/SmartFilter.java b/src/main/java/com/emc/rest/smart/SmartFilter.java index a20281e..7e72f14 100644 --- a/src/main/java/com/emc/rest/smart/SmartFilter.java +++ b/src/main/java/com/emc/rest/smart/SmartFilter.java @@ -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));