Return-Path: Delivered-To: apmail-httpd-test-dev-archive@www.apache.org Received: (qmail 32076 invoked from network); 2 Dec 2004 01:16:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 2 Dec 2004 01:16:18 -0000 Received: (qmail 58524 invoked by uid 500); 2 Dec 2004 01:16:17 -0000 Delivered-To: apmail-httpd-test-dev-archive@httpd.apache.org Received: (qmail 58494 invoked by uid 500); 2 Dec 2004 01:16:17 -0000 Mailing-List: contact test-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: test-dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list test-dev@httpd.apache.org Received: (qmail 58480 invoked by uid 99); 2 Dec 2004 01:16:17 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FORGED_RCVD_HELO,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of apache-test@chrislaco.com designates 65.42.59.33 as permitted sender) Received: from adsl-65-42-59-33.dsl.akrnoh.ameritech.net (HELO mail.icantfocus.com) (65.42.59.33) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 01 Dec 2004 17:16:16 -0800 Received: from [192.168.10.247] (unknown [10.10.20.24]) by mail.icantfocus.com (Postfix) with ESMTP id C480D23514 for ; Wed, 1 Dec 2004 20:12:53 -0500 (EST) Message-ID: <41AE6CE1.4020009@chrislaco.com> Date: Wed, 01 Dec 2004 20:16:17 -0500 From: "Christopher H. Laco" Reply-To: apache-test@chrislaco.com User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 To: test-dev@httpd.apache.org Subject: [PATCH] Test & TestRequest pod Content-Type: multipart/mixed; boundary="------------000200040100000605020702" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N --------------000200040100000605020702 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit OK, I'm a programmer, not a writer. Be gentle. Nothing major, just the a mention of cookie_jar and additional headers via the second param in GET (and probably others?). While I was at it, I made sure all of the need* examples were all the same; which meant removing \& and &. The bare versions seemed to be the most prevelant. -=Chris --------------000200040100000605020702 Content-Type: text/plain; name="test-testrequest-pod.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="test-testrequest-pod.patch" Index: Test.pm =================================================================== --- Test.pm (revision 109410) +++ Test.pm (working copy) @@ -604,7 +604,7 @@ the tests will be skipped if the function returns a false value. For example: - plan tests => 5, \&need_lwp; + plan tests => 5, need_lwp; the test will be skipped if LWP is not available @@ -654,13 +654,13 @@ =item need_http11 - plan tests => 5, &need_http11; + plan tests => 5, need_http11; Require HTTP/1.1 support. =item need_ssl - plan tests => 5, &need_ssl; + plan tests => 5, need_ssl; Require SSL support. @@ -668,13 +668,13 @@ =item need_lwp - plan tests => 5, &need_lwp; + plan tests => 5, need_lwp; Require LWP support. =item need_cgi - plan tests => 5, &need_cgi; + plan tests => 5, need_cgi; Requires mod_cgi or mod_cgid to be installed. Index: TestRequest.pm =================================================================== --- TestRequest.pm (revision 109410) +++ TestRequest.pm (working copy) @@ -780,6 +780,19 @@ installed. It's best, therefore, to check C before running tests that rely on a redirection from C. +Sometimes it is desireable to have C remember +cookies sent by the pages you are testing and send them back to the +server on subsequent requests. This is especially necessary when +testing pages whose functionality relies on sessions or the presence +of preferences stored in cookies. + +By default, C does B remember cookies between +requests. You can tell it to remember cookies by adding the following +to C: + + Apache::TestRequest::user_agent(reset =>, + cookie_jar => {}); + =head1 FUNCTIONS C exports a number of functions that will likely @@ -837,6 +850,11 @@ Sends a simple GET request to the Apache test server. Returns an C object. +You can also supply additional headers to be sent with the request +by adding their name/value pairs after the C parameter: + + my $res = GET $url, 'Accept-Language' => 'de,en-us,en;q=0.5'; + =head3 GET_STR A shortcut function for Cas_string>. --------------000200040100000605020702--