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: 76691
Status: resolved
Priority: 0/
Queue: CGI

Owner: MARKSTOS [...]
Requestors: SREZIC [...]
Cc: srezic [...]

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

Subject: Documentation for -status option
Download (untitled) / with headers
text/plain 1.3k
In the CGI Pod documentation there's at least place where the -status parameter is specified only with a code, but without the human-readable phrase: print $q->redirect( -uri=>'http://somewhere.else/in/movie/land', -nph=>1, -status=>301); Per RFC the http status must contain a phrase which could be empty, but at least the space between code and phrase is mandatory. Using just the status code may cause problems if proxies or browsers are strictly conforming to the RFC. For example, perlbal 1.79 simply hangs when doing a reverse proxy operation to an Apache running the following two scripts: #!/usr/bin/perl use CGI 'header'; print header( -status => '500', #-status => '500 Server Error', ); print "An error happened.\n"; __END__ #!/usr/bin/perl use CGI 'redirect'; print redirect( -uri => '', -status => '301', #-status => '301 Moved', ); __END__ If I exchange the code-only status values with the ones using code and phrase, then perlbal is happy with the result. So my suggestions are: - fix the mentioned place in the CGI documentation (301 -> "301 Moved") - maybe make it clear in the documentation that the phrase is mandatory Regards, Slaven
Subject: Re: [ #76691] Documentation for -status option
Date: Thu, 19 Apr 2012 09:14:09 -0400
To: bug-cgi [...]
From: Mark Stosberg <mark [...]>
Download (untitled) / with headers
text/plain 184b
Thanks for this. I think I had may have been bitten by this myself and didn't realize it. I have had trouble getting "-status => 404" to work, and this may have been why. Mark
Thanks, I'm putting out a new release tonight which include related updates with credit to you.

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

Please report any issues with to