You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Oleg Kalnichevski (JIRA)" <ji...@apache.org> on 2010/03/31 19:35:27 UTC

[jira] Updated: (HTTPCLIENT-927) "Narrowly avoided an infinite loop in execute" should not be logged as an error.

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

Oleg Kalnichevski updated HTTPCLIENT-927:
-----------------------------------------

    Fix Version/s:     (was: 4.0.1)
                   4.1 Alpha2

> "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: 4.0.1
>            Reporter: Qin Zang
>             Fix For: 4.1 Alpha2
>
>
> 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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org