You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Andrew Arrow <an...@yahoo.com> on 2003/01/04 22:35:16 UTC

bug report for 302 redirect code

Hello,

I think I found a small bug with the setFollowRedirects(true):

HttpClient c = new HttpClient();
c.startSession("www.backstage.com", 80);

GetMethod g = new GetMethod("/backstage/members/index.jsp");
g.setFollowRedirects(true);
int code = c.executeMethod(g);

System.out.println(code);

/backstage/members/index.jsp redirects to another page which in turn
redirects to another page.  It seems my code above only goes to the 1st
redirect and doesn't follow all the 302's all the way to a 200 code.  Am I
doing something wrong?

-Andrew


Re: bug report for 302 redirect code

Posted by Ortwin Glück <or...@nose.ch>.
Jeffrey Dever wrote:
> Is this still an issue?

Seems that nobody has looked into it. We have test cases that check the 
problem actually. So I doubt this issue is a HttpClient problem. But I 
have not run the code of that guy yet.


Re: bug report for 302 redirect code

Posted by Jeffrey Dever <js...@sympatico.ca>.
Is this still an issue?

-jsd

Andrew Arrow wrote:

>Hello,
>
>I think I found a small bug with the setFollowRedirects(true):
>
>HttpClient c = new HttpClient();
>c.startSession("www.backstage.com", 80);
>
>GetMethod g = new GetMethod("/backstage/members/index.jsp");
>g.setFollowRedirects(true);
>int code = c.executeMethod(g);
>
>System.out.println(code);
>
>/backstage/members/index.jsp redirects to another page which in turn
>redirects to another page.  It seems my code above only goes to the 1st
>redirect and doesn't follow all the 302's all the way to a 200 code.  Am I
>doing something wrong?
>
>-Andrew
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>  
>