blob: ce770b02064c29acb0230bd89ca6a25b78a4d5d6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
--- ./class/deliver/Deliver.class.php.orig 2010-08-03 16:33:49.000000000 -0400
+++ ./class/deliver/Deliver.class.php 2010-08-03 16:35:25.000000000 -0400
@@ -542,7 +542,19 @@
$cnt = count($header);
$hdr_s = '';
for ($i = 0 ; $i < $cnt ; $i++) {
- $hdr_s .= $this->foldLine($header[$i]);
+ /*
+ * FIXME: Leave some name fields (filename, username) as they
+ * are, for now. If you want to fold these fields,
+ *
+ * 1) Count columns with base64 encoded chars, and
+ * 2) Split RAW text (before encoding), and
+ * 3) encode each splitted RAW texts.
+ */
+ if (strstr($header[$i], 'name') === false) {
+ $hdr_s .= $this->foldLine($header[$i], 78);
+ } else {
+ $hdr_s .= $header[$i];
+ }
}
$header = $hdr_s;
$header .= $rn; /* One blank line to separate mimeheader and body-entity */
@@ -778,6 +790,7 @@
case 'Cc':
case 'Bcc':
case 'From':
+ case 'Subject': // Prevent from base64-folding corruption.
$hdr_s .= $header[$i];
break;
default: $hdr_s .= $this->foldLine($header[$i]); break;
|