我应该使用哪种内容传输编码?

时间:2014-12-16 15:29:12

标签: forms rfc

我以编程方式向端点发送Content-Type': 'multipart/form-data,我的系统(Ubuntu)默认为UTF-8

我的问题是,Content-Transfer-Encoding应该/我应该使用哪个?

以下是表单部分的示例:

Content-Disposition: form-data; name="to"
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: ?

jacob@example.com

哪个Content-Transfer-Encoding最安全?

另一个例子:

Content-Disposition: form-data; name="message"; filename="message.mime"
Content-Type: message/rfc822; charset=UTF-8
Content-Transfer-Encoding: ?

From: jacob@example.com
To: jacob@example.com
Subject: testing Coreor
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0

testing Coreor

1 个答案:

答案 0 :(得分:0)

我已更新我的代码以使用quoted-printable,因此我现在发送以下内容。 它有效,但你看到任何错误,问题或优化吗?

--x.ai/coreor=---14187500275550.5525101518724114
Content-Disposition: form-data; name="to"
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

jacob@example.com
--x.ai/coreor=---14187500275550.5525101518724114
Content-Disposition: form-data; name="message"; filename="message.mime"
Content-Type: message/rfc822; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

X-Mailer: x.ai Coreor v1.test
From: =22Jacob=22 <jacob@example.com>
To: jacob@example.com
Subject: testing Coreor via Mailgun
Content-Type: text/plain; charset=3Dutf-8
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0

testing Coreor
--x.ai/coreor=---14187500275550.5525101518724114--

我使用mimelib进行quoted-printable编码。