From: unobe@cpan.org
To: 9front@9front.org
Subject: [9front] patch Mail(1) to fix attachments
Date: Sat, 17 Apr 2021 16:46:37 -0700 [thread overview]
Message-ID: <6004672BD7153B9F37A8D2B9A845590B@smtp.pobox.com> (raw)
[-- 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)
reply other threads:[~2021-04-18 0:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6004672BD7153B9F37A8D2B9A845590B@smtp.pobox.com \
--to=unobe@cpan.org \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).