Commit 2096f35b03799f27ac1e12ded345cae328e4d72c
Fix broken MIME multipart emails
Charles Lehner committed on 5/24/2015, 5:26:16 AMParent: 806ab97eba21eba1b9b85de34dca1fbeb197f602
Files changed
ggscrape | changed |
ggscrape | |||
---|---|---|---|
@@ -101,10 +101,13 @@ | |||
101 | 101 … | # with some X-Google stuff. Remove the second set of headers if they are | |
102 | 102 … | # present. | |
103 | 103 … | if sed -n '/^\r$/{ n; /^X-Google-Groups:/q; q 1; }' "$file"; then | |
104 | 104 … | debug_print 'Removing duplicate headers' | |
105 | - sed -i~ '/^X-Google-Groups:/,/^\r$/d' "$file" && rm "$file~" | ||
105 … | + sed -i~ '/^X-Google-Groups:/,/^\r$/d' "$file" | ||
106 | 106 … | fi | |
107 … | + # Add missing multipart/alternative boundary | ||
108 … | + sed -i~ '/^--[^< ]*$/{ n; /^--[^< ]*$/{ s/^--\(.*\)/Content-Type: multipart\/alternative; boundary=\1\n\n\0/; }; }' "$file" | ||
109 … | + rm "$file~" | ||
107 | 110 … | } | |
108 | 111 … | ||
109 | 112 … | download_message() { | |
110 | 113 … | local topic_id="$1" | |
Built with git-ssb-web