Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the CGI CPAN distribution.

Report information
The Basics
Id: 17066
Status: resolved
Priority: 0/
Queue: CGI

Owner: Nobody in particular
Requestors: david [...]

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


Subject: redirect method returns malformed HTTP ("Moved" should be "Found")
Download (untitled) / with headers
text/plain 769b
Section 6.1 of the HTTP 1.1 specification states: The first line of a Response message is the Status-Line, consisting of the protocol version followed by a numeric status code and its associated textual phrase. When calling the redirect method of (including the latest version, 3.15, from CPAN) on perl 5.8.7 on Linux 2.6.14-gentoo-r5 with: perl -MCGI -e'print CGI->redirect("")' The output is: Status: 302 Moved Location: "Moved" is the textual phrase associated with the 301 status code. The text for 302 should be "Found". This error can be corrected by modifying line 1502 of version 3.15. I've attached a patch generated with: diff -U 8 -p >
--- 2006-01-14 12:26:20.000000000 +0000 +++ 2006-01-14 12:26:47.000000000 +0000 @@ -1494,17 +1494,17 @@ END_OF_FUNC # Return a Location: style header # #### 'redirect' => <<'END_OF_FUNC', sub redirect { my($self,@p) = self_or_default(@_); my($url,$target,$status,$cookie,$nph,@other) = rearrange([[LOCATION,URI,URL],TARGET,STATUS,['COOKIE','COOKIES'],NPH],@p); - $status = '302 Moved' unless defined $status; + $status = '302 Found' unless defined $status; $url ||= $self->self_url; my(@o); foreach (@other) { tr/\"//d; push(@o,split("=",$_,2)); } unshift(@o, '-Status' => $status, '-Location'=> $url, '-nph' => $nph); unshift(@o,'-Target'=>$target) if $target;
From: mark [...]
This was fixed 3.16, so this bug should be marked as "resolved".
Download (untitled) / with headers
text/plain 148b
The author of prefers bug reports via email. The bug tracking system here has a poorly designed user interface and I don't care to use it.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to