[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-927?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Oleg Kalnichevski resolved HTTPCLIENT-927.
------------------------------------------

    Resolution: Won't Fix

> "Narrowly avoided an infinite loop in execute" should not be logged as an 
> error.
> --------------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-927
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-927
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpClient
>    Affects Versions: 3.1 Final
>            Reporter: Qin Zang
>
> In the executeMethod(), upon received the "Redirect" as the HTTP Response 
> Code, the code will log an error if the maxRedirects was set to 0 as in the 
> following code. This is not an error, if someone want to stop the automatic 
> redirect behavior. It should be logged as a warning or debug message.
>   178 if (isRedirectNeeded(method)) {
>   179                       if (processRedirectResponse(method)) {
>   180                           retry = true;
>   181                           ++redirectCount;
>   182                           if (redirectCount >= maxRedirects) {
>   183                               LOG.error("Narrowly avoided an infinite 
> loop in execute");
>   184                               throw new RedirectException("Maximum 
> redirects ("
>   185                                   + maxRedirects + ") exceeded");
>   186                           }
>   187                           if (LOG.isDebugEnabled()) {
>   188                               LOG.debug("Execute redirect " + 
> redirectCount + " of " + maxRedirects);
>   189                           }
>   190                       }
>   191                   }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to