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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The extension-header mechanism allows additional entity-header fieldsto be defined without changing the protocol, but these fields cannotbe assumed to be recognizable by the recipient. Unrecognized headerfields SHOULD be ignored by the recipient and MUST be <strong>for</strong>warded bytransparent proxies.<strong>Fielding</strong>, et al. Standards Track [Page 42]RFC <strong>2616</strong> HTTP/1.1 June 19997.2 Entity BodyThe entity-body (if any) sent with an HTTP request or response is ina <strong>for</strong>mat and encoding defined by the entity-header fields.entity-body= *OCTETAn entity-body is only present in a message when a message-body ispresent, as described in section 4.3. The entity-body is obtainedfrom the message-body by decoding any Transfer-Encoding that mighthave been applied to ensure safe and proper transfer of the message.7.2.1 TypeWhen an entity-body is included with a message, the data type of thatbody is determined via the header fields Content-Type and Content-Encoding. These define a two-layer, ordered encoding model:entity-body := Content-Encoding( Content-Type( data ) )Content-Type specifies the media type of the underlying data.Content-Encoding may be used to indicate any additional contentcodings applied to the data, usually <strong>for</strong> the purpose of datacompression, that are a property of the requested resource. There isno default encoding.Any HTTP/1.1 message containing an entity-body SHOULD include aContent-Type header field defining the media type of that body. Ifand only if the media type is not given by a Content-Type field, therecipient MAY attempt to guess the media type via inspection of itscontent and/or the name extension(s) of the URI used to identify theresource. If the media type remains unknown, the recipient SHOULDtreat it as type "application/octet-stream".7.2.2 Entity LengthThe entity-length of a message is the length of the message-bodybe<strong>for</strong>e any transfer-codings have been applied. Section 4.4 defines

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

Saved successfully!

Ooh no, something went wrong!