X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=tests%2FHTTPServer.pm;h=57b0499faa47df2c109210f6c9fb59769a457c65;hp=b76f0985742af738c1ddb2ed3514aa1a9afd7a3e;hb=c60c7b9941da3756a0b46130dfa15ad31132dbfa;hpb=65ab102f072cd801528da4f478915bd8e5272725 diff --git a/tests/HTTPServer.pm b/tests/HTTPServer.pm index b76f0985..57b0499f 100644 --- a/tests/HTTPServer.pm +++ b/tests/HTTPServer.pm @@ -144,8 +144,7 @@ sub handle_auth { my $authhdr = $req->header('Authorization'); # Have we sent the challenge yet? - unless (defined $url_rec->{auth_challenged} - && $url_rec->{auth_challenged}) { + unless ($url_rec->{auth_challenged} || $url_rec->{auth_no_challenge}) { # Since we haven't challenged yet, we'd better not # have received authentication (for our testing purposes). if ($authhdr) { @@ -166,6 +165,9 @@ sub handle_auth { # failed it. $code = 400; $msg = "You didn't send auth after I sent challenge"; + if ($url_rec->{auth_no_challenge}) { + $msg = "--auth-no-challenge but no auth sent." + } } else { my ($sent_method) = ($authhdr =~ /^(\S+)/g); unless ($sent_method eq $url_rec->{'auth_method'}) {