Skip Menu |

This queue is for tickets about the CGI-Shorten CPAN distribution.

Report information
The Basics
Id: 24701
Status: new
Priority: 0/
Queue: CGI-Shorten

People
Owner: Nobody in particular
Requestors: jason [...] shakabuku.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.02
Fixed in: (no value)



Subject: Test error with newer versions of CGI.pm
Newer versions of CGI.pm (not sure which ones, I'm using 3.25) return 302 Found as the first line of the header when using $cgi->redirect. Test 6 checks for 302 Moved. This causes the test to fail. Here is a patch to fix this: *** test.pl 2007-01-31 20:34:48.000000000 +0000 --- test.pl.old 2007-01-31 20:35:25.000000000 +0000 *************** *** 10,16 **** } like($sh->lengthen('http://127.0.0.1/shorten.pl?aa'), qr'a\.com'); like($sh->lengthen('http://127.0.0.1/shorten.pl?a'), qr'A'); ! like($sh->redirect('http://127.0.0.1/shorten.pl?aa'), qr'(302 Moved|302 Found)'); like($sh->redirect('http://127.0.0.1/shorten.pl?aaa'), qr'404'); undef $sh; ok(!ref($sh)); --- 10,16 ---- } like($sh->lengthen('http://127.0.0.1/shorten.pl?aa'), qr'a\.com'); like($sh->lengthen('http://127.0.0.1/shorten.pl?a'), qr'A'); ! like($sh->redirect('http://127.0.0.1/shorten.pl?aa'), qr'302 Moved'); like($sh->redirect('http://127.0.0.1/shorten.pl?aaa'), qr'404'); undef $sh; ok(!ref($sh));