DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21584>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21584 setFollowRedirects method doesn't seem to be working Summary: setFollowRedirects method doesn't seem to be working Product: Commons Version: Nightly Builds Platform: Other OS/Version: Linux Status: NEW Severity: Normal Priority: Other Component: HttpClient AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] 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. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
