I'd like to suggest removing the log message entirely ... I'm not sure
what purpose it serves.

In JMeter, it can be useful to handle redirects, rather than letting
the http handler deal with them.

We then get these log messages which can't easily be suppressed.
For JMeter they don't offer any value.

S.
On 26/05/06, Oleg Kalnichevski <[EMAIL PROTECTED]> wrote:
Sounds reasonable. I'll check the patch in if no one objects

Oleg

On Thu, 2006-05-25 at 15:36 -0500, David L. Crow wrote:
> The HttpMethodDirector#isRedirectNeeded() complains if a redirect is
> needed and followRedirects is set to false.  Since subclasses of
> EntityEnclosingMethod (PostMethod and PutMethod) can't set
> followRedirects, it seems like isRedirectNeeded should not complain if
> the HttpMethod is one of those.
>
> The following diff achieves this:
>
> Index: src/java/org/apache/commons/httpclient/HttpMethodDirector.java
> ===================================================================
> --- src/java/org/apache/commons/httpclient/HttpMethodDirector.java
> (revision 409457)
> +++ src/java/org/apache/commons/httpclient/HttpMethodDirector.java
> (working copy)
> @@ -46,6 +46,7 @@
>   import
> org.apache.commons.httpclient.auth.CredentialsNotAvailableException;
>   import org.apache.commons.httpclient.auth.AuthScope;
>   import org.apache.commons.httpclient.auth.MalformedChallengeException;
> +import org.apache.commons.httpclient.methods.EntityEnclosingMethod;
>   import org.apache.commons.httpclient.params.HostParams;
>   import org.apache.commons.httpclient.params.HttpClientParams;
>   import org.apache.commons.httpclient.params.HttpConnectionParams;
> @@ -815,8 +816,9 @@
>                   if (method.getFollowRedirects()) {
>                       return true;
>                   } else {
> -                    LOG.info("Redirect requested but followRedirects is "
> -                            + "disabled");
> +                   if ( ! ( method instanceof EntityEnclosingMethod ) )
> +                        LOG.info("Redirect requested but
> followRedirects is "
> +                                + "disabled");
>                       return false;
>                   }
>                          default:


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to