summaryrefslogtreecommitdiffstats
path: root/Bugzilla/CGI.pm
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2006-11-01 08:43:13 +0100
committermkanat%bugzilla.org <>2006-11-01 08:43:13 +0100
commit20df5235b9823104d06bd2cd94a6985bdcf5c15d (patch)
tree39f34e368d42bcd49b310a5992a87d28fd2d282f /Bugzilla/CGI.pm
parent89edfad4a52a2924dbf2d67d5609870e1200f7d3 (diff)
downloadbugzilla-20df5235b9823104d06bd2cd94a6985bdcf5c15d.tar.gz
bugzilla-20df5235b9823104d06bd2cd94a6985bdcf5c15d.tar.xz
Bug 357526: buglist.cgi doesn't specify encoding as UTF-8 when the rest of Bugzilla does
Patch By John Beranek <john@redux.org.uk> r=mkanat, a=justdave
Diffstat (limited to 'Bugzilla/CGI.pm')
-rw-r--r--Bugzilla/CGI.pm14
1 files changed, 13 insertions, 1 deletions
diff --git a/Bugzilla/CGI.pm b/Bugzilla/CGI.pm
index b78c077e9..091362306 100644
--- a/Bugzilla/CGI.pm
+++ b/Bugzilla/CGI.pm
@@ -166,7 +166,19 @@ sub multipart_init {
# Have to add the cookies in.
sub multipart_start {
my $self = shift;
- my $headers = $self->SUPER::multipart_start(@_);
+
+ my %args = @_;
+
+ # CGI.pm::multipart_start doesn't accept a -charset parameter, so
+ # we do it ourselves here
+ if (defined $args{-charset} && defined $args{-type}) {
+ # Remove any existing charset specifier
+ $args{-type} =~ s/;.*$//;
+ # and add the specified one
+ $args{-type} .= "; charset=$args{-charset}";
+ }
+
+ my $headers = $self->SUPER::multipart_start(%args);
# Eliminate the one extra CRLF at the end.
$headers =~ s/$CGI::CRLF$//;
# Add the cookies. We have to do it this way instead of