New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perlfaq9: Location: versus URI: CGI header #1805
Comments
From flavell@mail.cern.chThis refers to the perlfaq9 that's distributed with 5.6.0, which in There seem to be a couple of discrepancies in this, of which =head2 How do I redirect to another page? Instead of sending back a C<Content-Type> as the headers of your There have been several discussions of this point in recent months on So, the claim that the URI header is the "official" one and that For background please feel free to check this copy of a posting to http://ppewww.ph.gla.ac.uk/~flavell/www/cgiperl2.html Prompted by earlier discussion on c.l.p.m, which addressed this and http://ppewww.ph.gla.ac.uk/~flavell/www/perlcgifaq.html As I already remarked, I'm not trying to force my particular style on I've now been advised by two of those regulars to make a submission Any advice on whether I should raise the other couple of points best regards |
From [Unknown Contact. See original ticket]I've poured over the HTTP RFC and can't find anything about a URI: header. Inline Patch--- perlfaq9.podo Tue Nov 14 10:57:27 2000
+++ perlfaq9.pod Tue Nov 14 11:03:53 2000
@@ -224,13 +224,11 @@
=head2 How do I redirect to another page?
-Instead of sending back a C<Content-Type> as the headers of your
-reply, send back a C<Location:> header. Officially this should be a
-C<URI:> header, so the CGI.pm module (available from CPAN) sends back
-both:
+According to RFC 2616, "Hypertext Transfer Protocol -- HTTP/1.1", the
+preferred method is to send a C<Location:> header instead of a
+C<Content-Type:> header:
Location: http://www.domain.com/newpage
- URI: http://www.domain.com/newpage
Note that relative URLs in these headers can cause strange effects
because of "optimizations" that servers do. |
From @jhiOn Fri, Nov 17, 2000 at 08:55:45AM -0500, Stephen P. Potter wrote:
Thanks, applied. |
From [Unknown Contact. See original ticket]On 17 Nov 2000, at 8:55, Stephen P. Potter wrote:
Shouldn't this patch include a patch for CGI.pm, as well? After all, the
Cheers, |
From [Unknown Contact. See original ticket]Lightning flashed, thunder crashed and "Philip Newton" <pnewton@gmx.de> whisper I don't believe a patch is necessary. I don't see that CGI.pm sends a URI: -spp |
Migrated from rt.perl.org#3064 (status was 'resolved')
Searchable as RT3064$
The text was updated successfully, but these errors were encountered: