[ http://issues.apache.org/jira/browse/HTTPCLIENT-245?page=all ]
Oleg Kalnichevski updated HTTPCLIENT-245: ----------------------------------------- Fix Version: 4.0 Alpha 1 (was: 4.0 Final) > POST redirects cannot be executed > --------------------------------- > > Key: HTTPCLIENT-245 > URL: http://issues.apache.org/jira/browse/HTTPCLIENT-245 > Project: HttpComponents HttpClient > Type: Bug > Components: HttpClient > Versions: 2.0 Final > Environment: Operating System: Linux > Platform: Other > Reporter: Aaron DeLong > Assignee: HttpClient Dev > Fix For: 4.0 Alpha 1 > > 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. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]