You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by to...@apache.org on 2011/04/06 13:47:19 UTC
svn commit: r1089411 - /perl/modperl/trunk/t/response/TestAPI/request_rec.pm
Author: torsten
Date: Wed Apr 6 11:47:18 2011
New Revision: 1089411
URL: http://svn.apache.org/viewvc?rev=1089411&view=rev
Log:
LWP 6.x uses HTTP/1.1 but t/response/TestAPI/request_rec.pm assumes it is always called using HTTP/1.0
Modified:
perl/modperl/trunk/t/response/TestAPI/request_rec.pm
Modified: perl/modperl/trunk/t/response/TestAPI/request_rec.pm
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/t/response/TestAPI/request_rec.pm?rev=1089411&r1=1089410&r2=1089411&view=diff
==============================================================================
--- perl/modperl/trunk/t/response/TestAPI/request_rec.pm (original)
+++ perl/modperl/trunk/t/response/TestAPI/request_rec.pm Wed Apr 6 11:47:18 2011
@@ -57,8 +57,9 @@ sub handler {
ok $r->protocol =~ /http/i;
- # HTTP 1.0
- ok t_cmp $r->proto_num, 1000, 't->proto_num';
+ # LWP >=6.00 uses HTTP/1.1, other HTTP/1.0
+ ok t_cmp $r->proto_num, 1000+substr($r->the_request, -1),
+ 't->proto_num';
ok t_cmp lc($r->hostname), lc($r->get_server_name), '$r->hostname';
@@ -124,7 +125,12 @@ sub handler {
ok t_cmp $r->args, $args, '$r->args';
- ok t_cmp $r->the_request, "GET $base_uri$path_info?$args HTTP/1.0",
+ # LWP uses HTTP/1.1 since 6.00
+ ok t_cmp $r->the_request, qr!GET
+ \x20
+ \Q$base_uri$path_info\E\?\Q$args\E
+ \x20
+ HTTP/1\.\d!x,
'$r->the_request';
{