Skip Menu |

This queue is for tickets about the LWP-Authen-Negotiate CPAN distribution.

Report information
The Basics
Id: 50881
Status: resolved
Priority: 0/
Queue: LWP-Authen-Negotiate

People
Owner: pause [...] grolmsnet.de
Requestors: asjo [...] koldfront.dk
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.06
Fixed in: 0.07



Subject: LWP::Debug::debug called, no 'use LWP::Debug;'
LWP::Authen::Negotiate (0.06) calls LWP::Debug::debug() without use'ing LWP::Debug - and so it dies with an Undefined subroutine error. This can be reproduced by running this script: #!/usr/bin/perl use strict; use warnings; use LWP::UserAgent; my $ua = LWP::UserAgent->new; my $response = $ua->get('http://localhost:3000/'); if ($response->is_success) { print $response->content; } else { die $response->status_line; } (almost directly from the documentation) against something that requests WWW-Authentication: Negotiate. I simply ran "socket -s 3000", then the test-script above, and pasted this back to the test-script: HTTP/1.1 401 Authorization Required WWW-Authenticate: Negotiate Connection: close Content-Type: text/html TEST ^C Which resulted in: $ ./test.pl Undefined subroutine &LWP::Debug::debug called at /usr/share/perl/LWP/Authen/Negotiate.pm line 37. $ I think the trivial fix is to add 'use LWP::Debug;' in LWP/Authen/Negotiate.pm (patch included.) LWP::Debug is deprecated, so a more elaborate fix would perhaps be to stop using the module? Best regards, Adam --- LWP/Authen/Negotiate.pm.orig 2009-09-18 10:58:49.000000000 +0200 +++ LWP/Authen/Negotiate.pm 2009-10-27 14:49:31.000000000 +0100 @@ -30,7 +30,7 @@ use MIME::Base64 "2.12"; use GSSAPI 0.18; - +use LWP::Debug; sub authenticate {
CC: bug-LWP-Authen-Negotiate [...] rt.cpan.org
Subject: Re: [rt.cpan.org #50881] LWP::Debug::debug called, no 'use LWP::Debug;'
Date: Tue, 27 Oct 2009 21:22:20 +0100
To: asjo [...] koldfront.dk
From: Achim Grolms <achim [...] grolmsnet.de>
Hello Adam, Thanks for reporting, I've made the suggested change to 0.07 and uploaded 0.07 to PAUSE. Best Regards, Achim On Tuesday 27 October 2009, http://asjo.koldfront.dk/ via RT wrote: Show quoted text
> Tue Oct 27 10:47:04 2009: Request 50881 was acted upon. > Transaction: Ticket created by http://asjo.koldfront.dk/ > Queue: LWP-Authen-Negotiate > Subject: LWP::Debug::debug called, no 'use LWP::Debug;' > Broken in: 0.06 > Severity: Normal > Owner: Nobody > Requestors: asjo@koldfront.dk > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=50881 > > > > LWP::Authen::Negotiate (0.06) calls LWP::Debug::debug() without use'ing > LWP::Debug - and so it dies with an Undefined subroutine error. > > This can be reproduced by running this script: > > #!/usr/bin/perl > > use strict; > use warnings; > > use LWP::UserAgent; > > my $ua = LWP::UserAgent->new; > my $response = $ua->get('http://localhost:3000/'); > if ($response->is_success) { > print $response->content; > } > else { > die $response->status_line; > } > > (almost directly from the documentation) against something that requests > WWW-Authentication: Negotiate. > > I simply ran "socket -s 3000", then the test-script above, and pasted > this back to the test-script: > > HTTP/1.1 401 Authorization Required > WWW-Authenticate: Negotiate > Connection: close > Content-Type: text/html > > TEST > ^C > > Which resulted in: > > $ ./test.pl > Undefined subroutine &LWP::Debug::debug called at > /usr/share/perl/LWP/Authen/Negotiate.pm line 37. > $ > > I think the trivial fix is to add 'use LWP::Debug;' in > LWP/Authen/Negotiate.pm (patch included.) > > LWP::Debug is deprecated, so a more elaborate fix would perhaps be to > stop using the module? > > Best regards, > Adam > > > --- LWP/Authen/Negotiate.pm.orig 2009-09-18 10:58:49.000000000 +0200 > +++ LWP/Authen/Negotiate.pm 2009-10-27 14:49:31.000000000 +0100 > @@ -30,7 +30,7 @@ > > use MIME::Base64 "2.12"; > use GSSAPI 0.18; > - > +use LWP::Debug; > > sub authenticate > {