You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-dev@httpd.apache.org by Mike Blackwell <Mi...@MooreWallace.com> on 2003/05/30 16:13:55 UTC
Apache::Test
Does anyone have an example of using Apache::Test to test a web site
that uses cookies?
I'm having trouble with a page which does a redirect with a cookie. LWP
shows the redirect happening, and that it received a cookie, but it does
not appear to be sending the cookie back out.
Any ideas on how to persue this are welcome.
Thanks.
--
Mike Blackwell
Mike.Blackwell@MooreWallace.com
Re: Apache::Test
Posted by Stas Bekman <st...@stason.org>.
Mike Blackwell wrote:
> Does anyone have an example of using Apache::Test to test a web site
> that uses cookies?
>
> I'm having trouble with a page which does a redirect with a cookie. LWP
> shows the redirect happening, and that it received a cookie, but it does
> not appear to be sending the cookie back out.
>
> Any ideas on how to persue this are welcome.
Because you probably need to code that (to read and add a cookie). I suppose
that you are talking about the client side of the script, right? So you just
add this header, once you have the cookie extracted, e.g.
my $res = POST_BODY $location,
content => $content,
cookie => $cookie;
A quick google search comes with several resources that you may find useful to
manipulate cookie jars:
http://perldoc.trustno1.net/new/site_perl/5.8.0/HTTP/Cookies.html
http://www.stonehenge.com/merlyn/WebTechniques/col32.html
Once you figure it all out, if you can submit an addition for the testing
tutorial (http://perl.apache.org/docs/general/testing/testing.html) that would
be very helpful for others
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com