git ssb

0+

cel / ggscrape



Commit 2096f35b03799f27ac1e12ded345cae328e4d72c

Fix broken MIME multipart emails

Charles Lehner committed on 5/24/2015, 5:26:16 AM
Parent: 806ab97eba21eba1b9b85de34dca1fbeb197f602

Files changed

ggscrapechanged
ggscrapeView
@@ -101,10 +101,13 @@
101101 # with some X-Google stuff. Remove the second set of headers if they are
102102 # present.
103103 if sed -n '/^\r$/{ n; /^X-Google-Groups:/q; q 1; }' "$file"; then
104104 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"
106106 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~"
107110 }
108111
109112 download_message() {
110113 local topic_id="$1"

Built with git-ssb-web