summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSteve Peters <steve@fisharerojo.org>2007-03-29 23:11:29 +0000
committerSteve Peters <steve@fisharerojo.org>2007-03-29 23:11:29 +0000
commit2c454cbd693e2f6a6c12d8a4c7f82f006f7cc257 (patch)
treea5eb8e2d40a8f292abda97499365e61e335867af /lib
parent6b202754e48fe50b2e197258ffdabd22fc2752c2 (diff)
downloadperl-2c454cbd693e2f6a6c12d8a4c7f82f006f7cc257.tar.gz
Upgrade to CGI.pm-3.28
p4raw-id: //depot/perl@30778
Diffstat (limited to 'lib')
-rw-r--r--lib/CGI.pm9
-rw-r--r--lib/CGI/Changes6
-rw-r--r--lib/CGI/Cookie.pm4
3 files changed, 13 insertions, 6 deletions
diff --git a/lib/CGI.pm b/lib/CGI.pm
index 7582cb10bb..a65bed23d7 100644
--- a/lib/CGI.pm
+++ b/lib/CGI.pm
@@ -18,8 +18,8 @@ use Carp 'croak';
# The most recent version and complete docs are available at:
# http://stein.cshl.org/WWW/software/CGI/
-$CGI::revision = '$Id: CGI.pm,v 1.227 2007/02/23 23:03:16 lstein Exp $';
-$CGI::VERSION='3.27';
+$CGI::revision = '$Id: CGI.pm,v 1.229 2007/03/29 15:35:40 lstein Exp $';
+$CGI::VERSION='3.28';
# HARD-CODED LOCATION FOR FILE UPLOAD TEMPORARY FILES.
# UNCOMMENT THIS ONLY IF YOU KNOW WHAT YOU'RE DOING.
@@ -2707,7 +2707,8 @@ sub url {
if ($full) {
my $protocol = $self->protocol();
$url = "$protocol://";
- my $vh = http('x_forwarded_host') || http('host');
+ my $vh = http('x_forwarded_host') || http('host') || '';
+ $vh =~ s/\:\d+$//; # some clients add the port number (incorrectly). Get rid of it.
if ($vh) {
$url .= $vh;
} else {
@@ -3052,7 +3053,7 @@ END_OF_FUNC
sub script_name {
my ($self,@p) = self_or_default(@_);
if (@p) {
- $self->{'.script_name'} = shift;
+ $self->{'.script_name'} = shift @p;
} elsif (!exists $self->{'.script_name'}) {
my ($script_name,$path_info) = $self->_name_and_path_from_env();
$self->{'.script_name'} = $script_name;
diff --git a/lib/CGI/Changes b/lib/CGI/Changes
index 6e656a5077..03a44b1527 100644
--- a/lib/CGI/Changes
+++ b/lib/CGI/Changes
@@ -1,3 +1,9 @@
+ Version 3.28
+ 1. Applied patch from Allen Day that makes Cookie parsing RFC2109 compliant
+ (attribute/values can be separated by commas as well as semicolons).
+ 2. Applied patch from Stephan Struckmann that allows script_name() to be set correctly.
+ 3. Fixed problem with url(-full) in which port number appears twice.
+
Version 3.27
1. Applied patch from Steve Taylor that allows checkbox_groups to be
disabled with a new -disabled=> option.
diff --git a/lib/CGI/Cookie.pm b/lib/CGI/Cookie.pm
index 926109ce3c..897e33122e 100644
--- a/lib/CGI/Cookie.pm
+++ b/lib/CGI/Cookie.pm
@@ -13,7 +13,7 @@ package CGI::Cookie;
# wish, but if you redistribute a modified version, please attach a note
# listing the modifications you have made.
-$CGI::Cookie::VERSION='1.27';
+$CGI::Cookie::VERSION='1.28';
use CGI::Util qw(rearrange unescape escape);
use CGI;
@@ -51,7 +51,7 @@ sub fetch {
my %results;
my($key,$value);
- my(@pairs) = split("; ?",$raw_cookie);
+ my(@pairs) = split("[;,] ?",$raw_cookie);
foreach (@pairs) {
s/\s*(.*?)\s*/$1/;
if (/^([^=]+)=(.*)/) {