Re: Apache::TestRequest + Cookies

2004-11-24 Thread Stas Bekman
Christopher H. Laco wrote:
Either way if you find how to use A-T to handle cookies or fix it to 
do so, it's be handy to add a new A-T tests (in addition to existing 
ones in Apache-Test/t/) so we don't break this feature in the future, 
which is easily possible sans having a test.

Plus it'll be great to have this documented... if you don't have the 
time to send a proper patch, feel free to send some blurb+example(s) 
here and I'll adopt it for the docs.

Assuming Michaels solution works:
Apache::TestRequest::user_agent( cookie_jar => {});
Are we looking for something more official to the actual Test::Request 
API; a new method, better parameters, etc; or is the above just good 
enough for a little mention?
I'd suggest to start with just a test and a little mention. Later on if we 
get people unhappy with this solution, we can make it a method...

really the new A-T development is triggered by demand of those who use and 
develop it, so if you use A-T and you need a new feature, feel free to 
send a patch including code+docs+test and chances are that it'll just go 
in. And if you have lots of those and you send decent patches, it's easy 
to become a committer :)

--
__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: Apache::TestRequest + Cookies

2004-11-24 Thread Christopher H. Laco
Either way if you find how to use A-T to handle cookies or fix it to do so, 
it's be handy to add a new A-T tests (in addition to existing ones in 
Apache-Test/t/) so we don't break this feature in the future, which is 
easily possible sans having a test.

Plus it'll be great to have this documented... if you don't have the time 
to send a proper patch, feel free to send some blurb+example(s) here and 
I'll adopt it for the docs.

Assuming Michaels solution works:
Apache::TestRequest::user_agent( cookie_jar => {});
Are we looking for something more official to the actual Test::Request API; 
a new method, better parameters, etc; or is the above just good enough for a 
little mention?




Re: Apache::TestRequest + Cookies

2004-11-24 Thread Stas Bekman
Christopher H. Laco wrote:
if you could also contribute the cookie test that would be handy too.

I'm feeling a bit dense at the moment. To the list, or to the 
forthcoming [self] test suite? I'm not sure I understand the request.
Either way if you find how to use A-T to handle cookies or fix it to do 
so, it's be handy to add a new A-T tests (in addition to existing ones in 
Apache-Test/t/) so we don't break this feature in the future, which is 
easily possible sans having a test.

Plus it'll be great to have this documented... if you don't have the time 
to send a proper patch, feel free to send some blurb+example(s) here and 
I'll adopt it for the docs.

--
__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: Apache::TestRequest + Cookies

2004-11-24 Thread Christopher H. Laco
if you could also contribute the cookie test that would be handy too.
I'm feeling a bit dense at the moment. To the list, or to the forthcoming 
[self] test suite? I'm not sure I understand the request.

P.S. Sorry about my list replies full of headers. I need to unsubscribe from 
Hotmail and use a real email client from my home account.

-=Chris



is it safe to enable Lockfile for all mpms across all apache generations?

2004-11-24 Thread Stas Bekman
It looks like some poeple have a problem with LockFile directive being 
compiled to a hardcoded value.

The problem:
[Tue Nov 02 17:16:22 2004] [emerg] (13)Permission denied: Couldn't create 
accept lock

Is it safe to set LockFile for all mpms?
For apache 1.3?
If yes, I'm going to add it to test framework globally.
Thank you!
p.s. the problem reported and the diagnose made in this thread:
http://thread.gmane.org/gmane.comp.apache.mod-perl/15547
--
__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: Apache::TestRequest + Cookies

2004-11-24 Thread Stas Bekman
Christopher H. Laco wrote:
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
if you could also contribute the cookie test that would be handy too.
--
__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: Apache::TestRequest + Cookies

2004-11-24 Thread Christopher H. Laco
[snip]
Or more to the point:
my $r = GET 'url', Cookie => 
$apacheRequestResponse->headers("Set-Cookie");




Re: Apache::TestRequest + Cookies

2004-11-24 Thread Christopher H. Laco
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 <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
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 -
Received: (qmail 99899 invoked by uid 99); 24 Nov 2004 19:28:39 -
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 -
Received: from h-66-167-36-5.mclnva23.covad.net (HELO ?192.168.1.164?) 
([EMAIL PROTECTED])  by 0 with SMTP; 24 Nov 2004 19:28:21 -
X-Message-Info: JGTYoYF78jFk/IwND13SP4Tqx2eQ6P3t
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
Precedence: bulk
list-help: 
list-unsubscribe: 
list-post: 
Delivered-To: mailing list [EMAIL PROTECTED]
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: <[EMAIL PROTECTED]> 
<[EMAIL PROTECTED]>
X-Enigmail-Version: 0.86.1.0
X-Enigmail-Supports: pgp-inline, pgp-mime
X-Virus-Checked: Checked
Return-Path: [EMAIL PROTECTED]
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



Re: Apache::TestRequest + Cookies

2004-11-24 Thread Michael Peters

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


Re: Apache-TestItSelf

2004-11-24 Thread Stas Bekman
Stas Bekman wrote:
Before we can try to improve the problems with A-T config issues, we 
need a test suite. Since until now, every fix was breaking 10 other things.

So I've started working on one. It's probably going to change a lot, but 
I have a working prototype. In order to use it apply the attached patch 
against Apache-Test/ and run:
I take the lack of comments (3 weeks) as an agreement and will proceed 
with the proposed layout/approach and commit things when I get them a bit 
more polished.

--
__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: Apache::TestRequest + Cookies

2004-11-24 Thread Stas Bekman
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.

--
__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com