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

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

"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.0.1


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


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

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
     [ 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


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

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-927?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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

    Affects Version/s:     (was: 4.0.1)
                       3.1 Final
        Fix Version/s:     (was: 4.1 Alpha2)

The given code snippet is from 3.1 version of HttpClient, not from 4.0.1 as stated in the report. There will be no changes in the HttpClient code line other than fixes for severe security related issues.

Closing as WONTFIX

Oleg.

> "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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


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

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
     [ 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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org