[PATCH] bugzilla: set mime types for log files as text/plain

Lei Zhang thestig at google.com
Sat Mar 15 12:28:44 CDT 2008


---

 Bugzilla/Attachment.pm |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm
index a08c0d5..fa2994d 100644
--- a/Bugzilla/Attachment.pm
+++ b/Bugzilla/Attachment.pm
@@ -578,6 +578,10 @@ sub validate_content_type {
         if ( !$contenttype ) {
             $throw_error ? ThrowUserError("missing_content_type") : return 0;
         }
+
+        if ($contenttype eq 'text/x-log') {
+            $contenttype = 'text/plain';
+        }
         $cgi->param('contenttype', $contenttype);
     }
     elsif ($cgi->param('contenttypemethod') eq 'list') {




More information about the wine-cvs mailing list