Bugzilla – Attachment 96641 Details for
Bug 22838
Warning from runreport.pl 'Explicitly setting a MIME header field (content-type) is dangerous'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22838: Specify a content-type for other formats
Bug-22838-Specify-a-content-type-for-other-formats.patch (text/plain), 1.05 KB, created by
Jonathan Druart
on 2019-12-26 12:31:29 UTC
(
hide
)
Description:
Bug 22838: Specify a content-type for other formats
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2019-12-26 12:31:29 UTC
Size:
1.05 KB
patch
obsolete
>From 73bc0889a39c399cb244fa9120ddd58efa826315 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 26 Dec 2019 13:30:48 +0100 >Subject: [PATCH] Bug 22838: Specify a content-type for other formats > >--- > misc/cronjobs/runreport.pl | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/misc/cronjobs/runreport.pl b/misc/cronjobs/runreport.pl >index fbea88944a..2d02679cdb 100755 >--- a/misc/cronjobs/runreport.pl >+++ b/misc/cronjobs/runreport.pl >@@ -322,11 +322,11 @@ foreach my $report_id (@ARGV) { > > my $msg = MIME::Lite->new(%mail); > >+ my $contenttype = "text/$format"; > if ( $format eq 'html' ) { > $message = "<html><head><style>tr:nth-child(2n+1) { background-color: #ccc;}</style></head><body>$message</body></html>"; >- $args->{contenttype} = 'text/html'; > } >- $msg-> attr("content-type" => $args->{contenttype}); >+ $msg->attr("content-type" => $contenttype); > > $msg->attach( > Type => "text/$format", >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 22838
:
96383
|
96515
| 96641