11.07.2015 Views

Network Working Group R. Fielding Request for Comments: 2616 ...

Network Working Group R. Fielding Request for Comments: 2616 ...

Network Working Group R. Fielding Request for Comments: 2616 ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

When in canonical <strong>for</strong>m, media subtypes of the "text" type use CRLF asthe text line break. HTTP relaxes this requirement and allows thetransport of text media with plain CR or LF alone representing a linebreak when it is done consistently <strong>for</strong> an entire entity-body. HTTPapplications MUST accept CRLF, bare CR, and bare LF as beingrepresentative of a line break in text media received via HTTP. Inaddition, if the text is represented in a character set that does notuse octets 13 and 10 <strong>for</strong> CR and LF respectively, as is the case <strong>for</strong>some multi-byte character sets, HTTP allows the use of whatever octetsequences are defined by that character set to represent theequivalent of CR and LF <strong>for</strong> line breaks. This flexibility regardingline breaks applies only to text media in the entity-body; a bare CRor LF MUST NOT be substituted <strong>for</strong> CRLF within any of the HTTP controlstructures (such as header fields and multipart boundaries).If an entity-body is encoded with a content-coding, the underlyingdata MUST be in a <strong>for</strong>m defined above prior to being encoded.The "charset" parameter is used with some media types to define thecharacter set (section 3.4) of the data. When no explicit charsetparameter is provided by the sender, media subtypes of the "text"type are defined to have a default charset value of "ISO-8859-1" whenreceived via HTTP. Data in character sets other than "ISO-8859-1" orits subsets MUST be labeled with an appropriate charset value. Seesection 3.4.1 <strong>for</strong> compatibility problems.3.7.2 Multipart TypesMIME provides <strong>for</strong> a number of "multipart" types -- encapsulations ofone or more entities within a single message-body. All multiparttypes share a common syntax, as defined in section 5.1.1 of RFC 2046<strong>Fielding</strong>, et al. Standards Track [Page 27]RFC <strong>2616</strong> HTTP/1.1 June 1999[40], and MUST include a boundary parameter as part of the media typevalue. The message body is itself a protocol element and MUSTthere<strong>for</strong>e use only CRLF to represent line breaks between body-parts.Unlike in RFC 2046, the epilogue of any multipart message MUST beempty; HTTP applications MUST NOT transmit the epilogue (even if theoriginal multipart contains an epilogue). These restrictions exist inorder to preserve the self-delimiting nature of a multipart messagebody,wherein the "end" of the message-body is indicated by theending multipart boundary.In general, HTTP treats a multipart message-body no differently than

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!