如何使用Content-Type:Multipart / Related

时间:2010-08-16 18:18:10

标签: firefox cgi mime

我想向用户发送二进制文件,并在浏览器上显示一些HTML。我正在使用带有apache2的CGI-BIN脚本。我找到了this example on page 4。该链接还显示有关多部分/相关内容类型的详细信息。这是我到目前为止所尝试的:

Content-Type: Multipart/Related; boundary="boundary-content"; start=""; type=\"text/plain\""

--boundary-content
Content-Disposition: inline
Content Type:text/plain
Content-ID: <abc>

hi

--boundary-content
Content Type:application/octet-stream
Content-Disposition: attachment;filename=myfile
Content-ID: 2

...

--boundary-content

第一个Content-Type行后的整个内容显示为单个明文附件。如何让浏览器说hi并提示下载myfile内容为...的内容?

1 个答案:

答案 0 :(得分:0)

我认为浏览器不了解多部分MIME响应

相关问题