httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher H. Laco" <chrisl...@hotmail.com>
Subject Re: Apache::TestRequest + Cookies
Date Wed, 24 Nov 2004 21:18:36 GMT
Thanks. I'll give that a whirl tonight.

I finally got the hack approach working by calling 
$apacheRequestResponse->headers("Set-Cookie") and passing that result right 
back into the [scantily mentioned] second param of Apache::TestRequest::GET 
'url', headername => headervalue

Since I only had on cookie, it works. All hell would break loose the minute 
I had more I assume.

-=Chris


>From: Michael Peters <mpeters@plusthree.com>
>Reply-To: test-dev@httpd.apache.org
>To: test-dev@httpd.apache.org
>Subject: Re: Apache::TestRequest + Cookies
>Date: Wed, 24 Nov 2004 14:29:02 -0500
>MIME-Version: 1.0
>Received: from mail.apache.org ([209.237.227.199]) by mc7-f8.hotmail.com 
>with Microsoft SMTPSVC(5.0.2195.6824); Wed, 24 Nov 2004 11:28:56 -0800
>Received: (qmail 99929 invoked by uid 500); 24 Nov 2004 19:28:40 -0000
>Received: (qmail 99899 invoked by uid 99); 24 Nov 2004 19:28:39 -0000
>Received: pass (hermes.apache.org: local policy)
>Received: from Unknown (HELO plusthree.com) (65.61.157.8)  by apache.org 
>(qpsmtpd/0.28) with SMTP; Wed, 24 Nov 2004 11:28:37 -0800
>Received: (qmail 18178 invoked from network); 24 Nov 2004 19:28:21 -0000
>Received: from h-66-167-36-5.mclnva23.covad.net (HELO ?192.168.1.164?) 
>(mpeters@66.167.36.5)  by 0 with SMTP; 24 Nov 2004 19:28:21 -0000
>X-Message-Info: JGTYoYF78jFk/IwND13SP4Tqx2eQ6P3t
>Mailing-List: contact test-dev-help@httpd.apache.org; run by ezmlm
>Precedence: bulk
>list-help: <mailto:test-dev-help@httpd.apache.org>
>list-unsubscribe: <mailto:test-dev-unsubscribe@httpd.apache.org>
>list-post: <mailto:test-dev@httpd.apache.org>
>Delivered-To: mailing list test-dev@httpd.apache.org
>X-ASF-Spam-Status: No, hits=0.0 required=10.0tests=
>X-Spam-Check-By: apache.org
>User-Agent: Mozilla Thunderbird 0.8 (X11/20041020)
>X-Accept-Language: en-us, en
>References: <BAY101-F21E07B568953CCBA53C74EADC70@phx.gbl> 
><41A4DF6B.2040704@stason.org>
>X-Enigmail-Version: 0.86.1.0
>X-Enigmail-Supports: pgp-inline, pgp-mime
>X-Virus-Checked: Checked
>Return-Path: test-dev-return-3460-chrislaco=hotmail.com@httpd.apache.org
>X-OriginalArrivalTime: 24 Nov 2004 19:28:57.0468 (UTC) 
>FILETIME=[D7A04BC0:01C4D25B]
>
>
>
>Stas Bekman wrote:
>>Christopher H. Laco wrote:
>>
>>>Has anyone used ApacheTestRequest to test pages using cookiessessions?
>>>
>>>I'm writing some quick and dirty tests for an AxKit session module I've 
>>>adopted. I've got everything up and running config wise and the pages are 
>>>getting run through AxKit just fine.
>>>
>>>The first two tests simply consist of a set-value page which uses 
>>>Apache::Session::File to store a value, and a get-value page that 
>>>confirms the value is returned. Of course the get-value test, test 2, 
>>>fails because Apache::TestRequest is ignore the sessionid cookie [or all 
>>>cookies really].
>>>
>>>I have LWP installed and I've tried a few different encantations using 
>>>->cookie_jar and HTTPCookie without any luck. Is there a Tutorial or 
>>>examples somwhere that cover dealing with sessions within 
>>>Apache::TestRequest?
>>
>>
>>I guess the silence means that no one has used it with cookies. I suppose 
>>that you could fix it to work with cookies though. But I could be wrong 
>>and it already works but not documented. there is a lot of such code in 
>>there.
>
>LWP::UserAgent doesn't by default keep a cookie_jar. All I had to do was 
>add this near the top of my test script before any GET/POST calls.
>
>     Apache::TestRequest::user_agent( cookie_jar => {});
>
>HTH
>
>--
>Michael Peters
>Developer
>Plus Three, LP
>



Mime
View raw message