perl-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kaspar Brand <httpd-dev.2...@velox.ch>
Subject Re: svn commit: r1207758 - /perl/Apache-Test/trunk/lib/Apache/TestRequest.pm
Date Wed, 30 Nov 2011 13:16:59 GMT
On 29.11.2011 11:44, Torsten Förtsch wrote:
> These calls to user_agent(reset=>1) are the actual reason for this mail. I 
> think it is wrong to do that here. The user agent keeps a global state that is 
> reset if user_agent() is called with reset=>1. set_client_cert() is called by 
> prepare() which is called by GET, POST etc.
> 
> According to the documentation for Apache::TestRequest the way to make the UA 
> not to follow redirects is
> 
>   Apache::TestRequest::user_agent(reset => 1,
>                                   requests_redirectable => 0);
> 
> before calling GET.
> 
> If now GET itself calls user_agent(reset=>1) via prepare() and 
> set_client_cert() wouldn't that clobber the "requests_redirectable => 0" 
> setting made by the user?

You're right, indeed - thanks for pointing this out. After further
testing and experiments, I think that the attached patch should take
care of this... does this look like an acceptable solution?

Kaspar

Mime
View raw message