stas 01/10/18 20:08:11
Modified: perl-framework/Apache-Test/lib/Apache TestRequest.pm
Log:
- better error checking
Revision Changes Path
1.47 +6 -2
httpd-test/perl-framework/Apache-Test/lib/Apache/TestRequest.pm
Index: TestRequest.pm
===================================================================
RCS file:
/home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestRequest.pm,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- TestRequest.pm 2001/10/19 02:08:17 1.46
+++ TestRequest.pm 2001/10/19 03:08:11 1.47
@@ -422,6 +422,10 @@
# currently supports only GET, HEAD, PUT, POST subs
sub same_interp_do {
my($same_interp, $sub, $url, @args) = @_;
+
+ die "must pass an interpreter id to work with"
+ unless defined $same_interp and $same_interp;
+
push @args, (INTERP_KEY, $same_interp);
my $res = '';
@@ -431,8 +435,8 @@
#loop until we get a response from our interpreter instance
$res = $sub->($url, @args);
- if ($res->code == 200) {
- $found_same_interp = $res->header(INTERP_KEY);
+ if ($res and $res->code == 200) {
+ $found_same_interp = $res->header(INTERP_KEY) || '';
}
unless ($found_same_interp eq $same_interp) {