moresandeep commented on a change in pull request #419:
URL: https://github.com/apache/knox/pull/419#discussion_r604111507
##########
File path:
gateway-spi/src/main/java/org/apache/knox/gateway/dispatch/DefaultHttpClientFactory.java
##########
@@ -119,6 +126,19 @@ public HttpClient createHttpClient(FilterConfig
filterConfig) {
// See KNOX-1530 for details
builder.disableContentCompression();
+ if (filterConfig.getInitParameter(PARAMETER_RETRY_COUNT) != null
+ && StringUtils
+ .isNumeric(filterConfig.getInitParameter(PARAMETER_RETRY_COUNT))) {
+ /* do we want to retry non-idempotent requests? default no */
+ boolean retryNonIdempotent = DEFAULT_PARAMETER_RETRY_NON_SAFE_REQUEST;
+ if (filterConfig.getInitParameter(PARAMETER_RETRY_NON_SAFE_REQUEST)
+ != null) {
+ retryNonIdempotent = Boolean.parseBoolean(
+ filterConfig.getInitParameter(PARAMETER_RETRY_NON_SAFE_REQUEST));
+ } builder.setRetryHandler(new DefaultHttpRequestRetryHandler(Integer
+ .parseInt(filterConfig.getInitParameter(PARAMETER_RETRY_COUNT)),
Review comment:
i mean we could but than I don't see a reason to create an extra
variable, I'll extract it in a local variable to make it easy on the eyes :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]