On Monday, June 23, 2003, at 05:08 AM, Geoffrey Young wrote:
I especially need help with the "keep_alive" parameter to user_agent()
keep_alive enables connection persistence, where the same connection is used to process multiple requests. the only use of it that I have seen is in http11/basicauth.t
my $request_num = Apache::TestRequest::user_agent_request_num($res);
ok $request_num == 3; #1 => no credentials #2 => 401 response with second request #3 => 200 with guest/guest credentials
also, from the LWP::UserAgent manpage:
The C<keep_alive> option also has the effect of loading and enabling the new experimental HTTP/1.1 protocol module.
so keep_alive may be more of a shorthand way of enabling (and testing) HTTP/1.1 compliance rather than just persistent connections (which can be used in both protocols).
as for the code changes, Stas should probably review them first. however, the docs look great - nice work.
Thanks Geoffrey. I've added in your comments, and attach a new patch. Again, here's what it does:
* Attempts to document all of the important functions of Apache::TestRequest. Comments and corrections would be much appreciated. I especially need help with a description of what OPTIONS() does.
* Exports UPLOAD from Apache::TestRequest. Was this an oversight?
* Changes the way the redirect_ok parameter works so that it affects only that _that call_ to the function. Afterward it should revert to the old value of $RedirectOK. I use local() to do this.
* Changes user_agent() so that the LWP::UserAgent "requests_redirectable" parameter actually does something useful vis-à-vis $RedirectOK.
* Added "SEE ALSO" section to Apache::Test. Note that this section, and the same section of Apache::TestRequest, points to Apache::TestMM, which currently has no documentation.
Regards,
David
-- David Wheeler AIM: dwTheory [EMAIL PROTECTED] ICQ: 15726394 http://kineticode.com/ Yahoo!: dew7e Jabber: [EMAIL PROTECTED] Kineticode. Setting knowledge in motion.[sm]
Apache-Test-Pod.patch
Description: Binary data