]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 357526: buglist.cgi doesn't specify encoding as UTF-8 when the rest of Bugzilla...
authormkanat%bugzilla.org <>
Wed, 1 Nov 2006 07:43:13 +0000 (07:43 +0000)
committermkanat%bugzilla.org <>
Wed, 1 Nov 2006 07:43:13 +0000 (07:43 +0000)
Patch By John Beranek <john@redux.org.uk> r=mkanat, a=justdave

Bugzilla/CGI.pm

index b78c077e9ed0dc544bcbaefb9f70b2e1ed7dbd01..091362306934acaa649d2c4f291f05ea1e072643 100644 (file)
@@ -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