浏览代码

Default Content-Transfer-Encoding is now RFC-compliant "7bit" instead of "us-ascii". (#1942060)

pdontthink 16 年之前
父节点
当前提交
5fcffc7336
共有 3 个文件被更改,包括 4 次插入4 次删除
  1. 1 1
      class/mime/Message.class.php
  2. 1 1
      src/download.php
  3. 2 2
      src/read_body.php

+ 1 - 1
class/mime/Message.class.php

@@ -357,7 +357,7 @@ class Message {
                                 $hdr = new MessageHeader();
                                 $hdr = new MessageHeader();
                                 $hdr->type0 = 'text';
                                 $hdr->type0 = 'text';
                                 $hdr->type1 = 'plain';
                                 $hdr->type1 = 'plain';
-                                $hdr->encoding = 'us-ascii';
+                                $hdr->encoding = '7bit';
                             } else {
                             } else {
                                 $msg->header->type0 = 'multipart';
                                 $msg->header->type0 = 'multipart';
                                 $msg->type0 = 'multipart';
                                 $msg->type0 = 'multipart';

+ 1 - 1
src/download.php

@@ -87,7 +87,7 @@ if ($ent_id) {
     /* raw message */
     /* raw message */
     $type0 = 'message';
     $type0 = 'message';
     $type1 = 'rfc822';
     $type1 = 'rfc822';
-    $encoding = 'US-ASCII';
+    $encoding = '7bit';
     $header = $message->header;
     $header = $message->header;
 }
 }
 
 

+ 2 - 2
src/read_body.php

@@ -206,7 +206,7 @@ function SendMDN ( $mailbox, $passed_id, $message, $imapConnection) {
     if ($special_encoding) {
     if ($special_encoding) {
         $mime_header->encoding = $special_encoding;
         $mime_header->encoding = $special_encoding;
     } else {
     } else {
-        $mime_header->encoding = 'us-ascii';
+        $mime_header->encoding = '7bit';
     }
     }
     if ($default_charset) {
     if ($default_charset) {
         $mime_header->parameters['charset'] = $default_charset;
         $mime_header->parameters['charset'] = $default_charset;
@@ -230,7 +230,7 @@ function SendMDN ( $mailbox, $passed_id, $message, $imapConnection) {
     $mime_header = new MessageHeader;
     $mime_header = new MessageHeader;
     $mime_header->type0 = 'message';
     $mime_header->type0 = 'message';
     $mime_header->type1 = 'disposition-notification';
     $mime_header->type1 = 'disposition-notification';
-    $mime_header->encoding = 'us-ascii';
+    $mime_header->encoding = '7bit';
     $part2->mime_header = $mime_header;
     $part2->mime_header = $mime_header;
 
 
     $composeMessage = new Message();
     $composeMessage = new Message();