Menu

#28 Connection not released properly after 405

pre 1.0
open
nobody
None
5
2015-12-09
2015-12-09
Maxim
No

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));
}

Discussion


Log in to post a comment.

MongoDB Logo MongoDB