summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua ben Jore <jjore@cpan.org>2006-02-18 20:58:10 -0600
committerSteve Peters <steve@fisharerojo.org>2006-02-21 00:40:23 +0000
commitcd755de4750e2191b6465129deed94f5a245ab7e (patch)
treec8dc0c13c5485e14834bfa14c54f12b4de58b1d5
parent5ce57cc063e43c30cba8f7b560bf201c2c4beb83 (diff)
downloadperl-cd755de4750e2191b6465129deed94f5a245ab7e.tar.gz
Patches: B, CGI, ExtUtils::MM_Unix
From: "Joshua ben Jore" <twists@gmail.com> Message-ID: <dc5c751d0602190058t78d915fv78c6318370307b63@mail.gmail.com> p4raw-id: //depot/perl@27255
-rw-r--r--AUTHORS1
-rw-r--r--lib/CGI.pm6
2 files changed, 6 insertions, 1 deletions
diff --git a/AUTHORS b/AUTHORS
index 41aef171cb..d7dcc2d9f8 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -438,6 +438,7 @@ Jos I. Boumans <kane@dwim.org>
Jose Auguste-Etienne <Jose.auguste-etienne@cgss-guyane.fr>
Joseph N. Hall <joseph@cscaper.com>
Joseph S. Myers <jsm28@hermes.cam.ac.uk>
+Joshua ben Jore <jjore@cpan.org>
Joshua E. Rodd <jrodd@pbs.org>
Joshua Pritikin <joshua.pritikin@db.com>
Joost van Baal <J.E.vanBaal@uvt.nl>
diff --git a/lib/CGI.pm b/lib/CGI.pm
index e93efc08d4..025c83f0df 100644
--- a/lib/CGI.pm
+++ b/lib/CGI.pm
@@ -1435,7 +1435,11 @@ sub header {
($_ = $header) =~ s/^(\w)(.*)/"\u$1\L$2" . ': '.$self->unescapeHTML($value)/e;
}
- $type .= "; charset=$charset" if $type ne '' and $type !~ /\bcharset\b/ and $charset ne '';
+ $type .= "; charset=$charset"
+ if $type ne ''
+ and $type !~ /\bcharset\b/
+ and defined $charset
+ and $charset ne '';
# Maybe future compatibility. Maybe not.
my $protocol = $ENV{SERVER_PROTOCOL} || 'HTTP/1.0';