in reply to Re^4: CGI Cookie Inconsistencies
in thread CGI Cookie Inconsistencies

And we were just discussing Dunning–Kruger the other day...

use strict; use warnings; use CGI::Pretty (); use URI (); my $cgi = CGI::Pretty->new(); print $cgi->header(), $cgi->start_html(), $cgi->h3("CAN I HAZ PURL?"), $cgi->h4("YUR DOIN IT RONG"), $cgi->blockquote( yours($cgi) ), $cgi->h4("YUR DOIN IT... PRETY GUD AKSHULY"), $cgi->blockquote( mine($cgi) ), $cgi->end_html(); exit 0; sub yours { my $cgi = shift; $cgi->url(-relative=>1) . '?a='; } sub mine { my $cgi = shift; my $uri = URI->new( $cgi->url ); ( my $path = $uri->path ) =~ s![^/]+\z!!; $uri->path( $path || "/" ); $uri->query_form( a => undef ); $uri; }

CAN I HAZ PURL?

YUR DOIN IT RONG

pm-805175.cgi?a=

YUR DOIN IT... PRETY GUD AKSHULY

http://localhost/cgi/?a=

Replies are listed 'Best First'.
Re^6: CGI Cookie Inconsistencies
by Anonymous Monk on Nov 08, 2009 at 23:47 UTC