Pop3_ about multipart/related;boundary=

Source: Internet
Author: User

The HTTP protocol has a detailed description of the MIME type, multipart/.... is a single message header that contains multiple message body solutions. Multipart media types are useful for sending non-text media types. These subtype are commonly used at present:

Messages with multiple parts Multipart/mixed
Messages with multiple, alternative parts Multipart/alternative
Message with multiple, related parts multipart/related
Multiple parts is digests Multipart/digest
for reporting of email status (admin.) Multipart/report
Order of parts does not matter Multipart/parallel
Macintosh File Data Multipart/appledouble
Aggregate messages; Descriptor as Header Multipart/header-set
Container for Voice-mail Multipart/voice-message
HTML FORM data (see Ch. 9 and App. B) Multipart/form-data
Infinite Multiparts-see Chapter 9 (Netscape) Multipart/x-mixed-replace

Any type of multipart subtype that is not recognized at execution time is considered a subtype of "mixed". Multipart media types have a common format, which is generally the case:

content-type:multipart/mixed; Boundary=xxxxx

--xxxxx
Body
--xxxxx--

Body can also set body, you can refer to the previous article.

--------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------

The MHTML, or MIME HTML, is defined by RFC 2557 to save the Web content of a multi-attachment (slice, flash animation, etc.) to a single file standard. This standard was proposed by Microsoft and started to support it from IE 5.0. At the same time, Microsoft implements the MHTML protocol, and the default Windows system is installed with the MHTML protocol handler (MHTML Protocol Handler). In IE, when the protocol for the URL of the embedded resource is MHTML, IE calls the MHTML Protocol Handler, which treats the resource as an MHTML format file resolution.

The MHTML file is in multipart format because it is "multi-in-one".

The MHTML Protocol Handler has the following "mild" effects on the MHTML file:
1. MHTML Protocol handler ignores the remote file suffix;
2. MHTML Protocol handler ignores all content in the remote file except for "blank line" in front of Content-type, and if there is a "blank line", the MHTML Protocol handler cannot interpret the file;
3. MHTML Protocol handler ignores all extraneous content after "--_boundary_by_mere-" in the remote file;
4. MHTML Protocol Handler ignores the content-disposition, x-frame-options, and other response headers of the remote server.

Protocol Access format: MHTML: [mhtml_file_url]! [Original_resource_url]

[Original_resource_url] is obtained from the content-location of the message body. If [Original_resource_url] cannot be obtained from [Mhtml_file_url], IE will attempt to download [Original_resource_url] and return the downloaded content.

--------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------

Multipart/related is naturally one of multipart_subtype, such as demo.html:

content-type:multipart/related; boundary= "_boundary_by_mere"

--_boundary_by_mere
Content-location:demo
Content-transfer-encoding:base64

pgh0bww+pgjvzhk+tuhutuwgrevntye8l2jvzhk+pc9odg1spg==
--_boundary_by_mere--

With the MHTML protocol, access to Mhtml:demo.html!demo can access the file's demo data block.

Reference article: The cross-domain harm caused by the MHTML protocol under IE, d4rkwind

--------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------

The HTTP protocol and the MIME protocol are two concepts. Multipurpose Internet Mail Extension Protocol (MIME) is an abbreviation for multipurpose Internet Mail Extensions.

The multipart type is the essence of the MIME message. The message body is divided into several segments, each of which contains both the segment head and the segment body, and the two parts are separated by a blank line. There are three types of common multipart: multipart/mixed, multipart/related and multipart/alternative. If you want to add an attachment in a message, you must define the multipart/mixed segment, or at least define the multipart/related segment if there is an inline resource, or at least define the multipart/alternative segment if the plain text coexists with the hypertext.

What is "at least"? For example, if there is only plain text and hypertext text, it is permissible to magnify the type in the message header, defined as multipart/related, or even multipart/mixed.

The main part of the 1.http protocol is wrapped in HTML, and the HTTP protocol is initially used to transmit HTML, only in combination with the MIME protocol to send off the format data.

2.http and MIME should be two of this protocol respectively, MIME can be subordinate to many other protocols, such as SMTP protocol, using the MIME protocol can contain special format information text in the protocol. For example, the HTTP protocol contains data in PDF format, which can be opened in a browser. The MIME protocol can be used to include the PDF attachment in the message, and the rest of the other protocols that can contain the MIME data, I'm not sure, I think, this should be a lot, because in principle this is just a certain format that contains a special piece of data.

3. The browser can be considered to be used to interpret the HTTP protocol of the client, the final display of content is the HTTP protocol data body part of the HTML format data.

Pop3_ about multipart/related;boundary=

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.