Bug in libwww-perl-5.36/t/base/headers-auth.t?
Norbert Goevert (goevert@amaunet.informatik.uni-dortmund.de)
21 Oct 1998 13:37:20 +0200
Hi,
test 4 in libwww-perl-5.36/t/base/headers-auth.t fails on my Solaris
2.6 box. From the code
,-----
| $res->www_authenticate(Basic => [realm => foo3, foo=>33],
| Digest => {nonce=>"bar", foo=>'foo'});
| print $res->as_string;
|
| $_ = $res->as_string;
|
| print "not " unless /WWW-Authenticate: Basic realm="foo3", foo=33/ &&
| /WWW-Authenticate: Digest nonce=bar, foo=foo/;
| print "ok 4\n";
`-----
it seems that a special ordering of (key, value) pairs within the
`Digest' Hashref is assumed. Output on my box for this part:
,-----
| [...]
| WWW-Authenticate: Digest foo=foo, nonce=bar
|
|
| not ok 4
`-----
which is exactly what is tested for in the 2nd part of the `unless'
expression, except the ordering. My proposal to this would be
something like
,-----
| print "not " unless /WWW-Authenticate: Basic realm="foo3", foo=33/ &&
| /WWW-Authenticate: Digest nonce=bar, foo=foo/
|| /WWW-Authenticate: Digest foo=foo, nonce=bar/;
| print "ok 4\n";
`-----
Thanks, Norbert.
--
Norbert Goevert fon +49 231 / 755 3032
Computer Science VI fax 2405
University of Dortmund goevert@ls6.cs.uni-dortmund.de
D-44221 Dortmund http://ls6-www.cs.uni-dortmund.de/~goevert/