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 ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
the Transfer-Encoding header field (section 14.41).Whenever a transfer-coding is applied to a message-body, the set oftransfer-codings MUST include "chunked", unless the message isterminated by closing the connection. When the "chunked" transfercodingis used, it MUST be the last transfer-coding applied to themessage-body. The "chunked" transfer-coding MUST NOT be applied morethan once to a message-body. These rules allow the recipient todetermine the transfer-length of the message (section 4.4).Transfer-codings are analogous to the Content-Transfer-Encodingvalues of MIME [7], which were designed to enable safe transport ofbinary data over a 7-bit transport service. However, safe transporthas a different focus <strong>for</strong> an 8bit-clean transfer protocol. In HTTP,the only unsafe characteristic of message-bodies is the difficulty indetermining the exact body length (section 7.2.2), or the desire toencrypt data over a shared transport.<strong>Fielding</strong>, et al. Standards Track [Page 24]RFC <strong>2616</strong> HTTP/1.1 June 1999The Internet Assigned Numbers Authority (IANA) acts as a registry <strong>for</strong>transfer-coding value tokens. Initially, the registry contains thefollowing tokens: "chunked" (section 3.6.1), "identity" (section3.6.2), "gzip" (section 3.5), "compress" (section 3.5), and "deflate"(section 3.5).New transfer-coding value tokens SHOULD be registered in the same wayas new content-coding value tokens (section 3.5).A server which receives an entity-body with a transfer-coding it doesnot understand SHOULD return 501 (Unimplemented), and close theconnection. A server MUST NOT send transfer-codings to an HTTP/1.0client.3.6.1 Chunked Transfer CodingThe chunked encoding modifies the body of a message in order totransfer it as a series of chunks, each with its own size indicator,followed by an OPTIONAL trailer containing entity-header fields. Thisallows dynamically produced content to be transferred along with thein<strong>for</strong>mation necessary <strong>for</strong> the recipient to verify that it hasreceived the full message.Chunked-Body = *chunklast-chunktrailer