You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Roland Weber (JIRA)" <ji...@apache.org> on 2007/02/05 21:00:29 UTC

[jira] Updated: (HTTPCLIENT-245) customize handling of 302 redirects

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

Roland Weber updated HTTPCLIENT-245:
------------------------------------

    Fix Version/s:     (was: 4.0 Alpha 1)
                   4.0 Final
       Issue Type: New Feature  (was: Bug)
          Summary: customize handling of 302 redirects  (was: POST redirects cannot be executed)

original title was: "POST redirects cannot be executed"


> customize handling of 302 redirects
> -----------------------------------
>
>                 Key: HTTPCLIENT-245
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-245
>             Project: HttpComponents HttpClient
>          Issue Type: New Feature
>          Components: HttpClient
>    Affects Versions: 2.0 Final
>         Environment: Operating System: Linux
> Platform: Other
>            Reporter: Aaron DeLong
>             Fix For: 4.0 Final
>
>
> I tried this with both the beta2 2.0 release, and the nightly build.  The
> following code snippet describes what I am trying to do:
> httpClient.getHostConfiguration().setHost(sHost, 80, "http");
> HttpMethod method=null;
> if (sMethod.indexOf("POST")!=-1) {
>      method=new PostMethod(sURLInfo);
> } else {
>      method=new GetMethod(sURLInfo);
> }
> method.setFollowRedirects(true);
> httpClient.executeMethod(method);
> After this code executes, the "getFollowRedirects" method still returns false,
> and any redirects which are sent by the webserver are not followed.  As a
> temporary workaround, since I want all redirects followed, I commented out the
> following code in the HttpMethodBase class in the "processRedirectResponse" method:
> /*if (!getFollowRedirects()) {
>      LOG.info("Redirect requested but followRedirects is "
>      + "disabled");
>      return false;
> }*/
> If this bug has already been reported, I apologize...I searched for and found
> nothing related to this issue.

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