* [9front] patch Mail(1) to fix attachments
@ 2021-04-17 23:46 unobe
0 siblings, 0 replies; only message in thread
From: unobe @ 2021-04-17 23:46 UTC (permalink / raw)
To: 9front
[-- Attachment #1: Type: text/plain, Size: 14 bytes --]
See attached.
[-- Attachment #2: mail-attach.patch --]
[-- Type: text/plain, Size: 1157 bytes --]
changeset: 8409:61f3cece9395
branch: mbp-2011
user: Romano <unobe@cpan.org>
date: Sat Apr 17 14:32:37 2021 -0700
files: sys/src/cmd/upas/Mail/comp.c
description:
Setting the headers breaks e-mail attachments. Marshal(1) already
sets the proper content-type and content-transfer-encoding based on if
there is a codepoint above 0x7f--if we want to change the default from
Latin-1, that's where the fix should be. Without this fix, the wrong
content-type and content-transfer-encoding is set for multipart
messages, and therefore 'Include:' or 'Attach:' instructions will send
malformed e-mail.
diff -r f2ec0867a0ae -r 61f3cece9395 sys/src/cmd/upas/Mail/comp.c
--- a/sys/src/cmd/upas/Mail/comp.c Tue Apr 13 23:29:34 2021 -0700
+++ b/sys/src/cmd/upas/Mail/comp.c Sat Apr 17 14:32:37 2021 -0700
@@ -67,9 +67,6 @@
chanfree(c->sync);
close(c->fd[0]);
- /* needed because mail is by default Latin-1 */
- fprint(c->fd[1], "Content-Type: text/plain; charset=\"UTF-8\"\n");
- fprint(c->fd[1], "Content-Transfer-Encoding: 8bit\n");
buf = emalloc(Bufsz);
while((n = read(fd, buf, Bufsz)) > 0)
if(write(c->fd[1], buf, n) != n)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-04-18 0:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-17 23:46 [9front] patch Mail(1) to fix attachments unobe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).