The ProxyFilter does not release a connection upon a 405 response (Method Not Allowed).
A possible solution is to invoke method.releaseConnection() within the block which handles 405 responses.
if (method.getStatusCode() == 405) {
Header allow = method.getResponseHeader("allow");
String value = allow.getValue();
method.releaseConnection();
throw new MethodNotAllowedException(
"Status code 405 from server", AllowedMethodHandler
.processAllowHeader(value));
}