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.

CRLFchunk = chunk-size [ chunk-extension ] CRLFchunk-data CRLFchunk-size = 1*HEXlast-chunk = 1*("0") [ chunk-extension ] CRLFchunk-extension= *( ";" chunk-ext-name [ "=" chunk-ext-val ] )chunk-ext-name = tokenchunk-ext-val = token | quoted-stringchunk-data = chunk-size(OCTET)trailer = *(entity-header CRLF)The chunk-size field is a string of hex digits indicating the size ofthe chunk. The chunked encoding is ended by any chunk whose size iszero, followed by the trailer, which is terminated by an empty line.The trailer allows the sender to include additional HTTP headerfields at the end of the message. The Trailer header field can beused to indicate which header fields are included in a trailer (seesection 14.40).<strong>Fielding</strong>, et al. Standards Track [Page 25]RFC <strong>2616</strong> HTTP/1.1 June 1999A server using chunked transfer-coding in a response MUST NOT use thetrailer <strong>for</strong> any header fields unless at least one of the following istrue:a)the request included a TE header field that indicates "trailers" isacceptable in the transfer-coding of the response, as described insection 14.39; or,b)the server is the origin server <strong>for</strong> the response, the trailerfields consist entirely of optional metadata, and the recipientcould use the message (in a manner acceptable to the origin server)without receiving this metadata. In other words, the origin serveris willing to accept the possibility that the trailer fields mightbe silently discarded along the path to the client.This requirement prevents an interoperability failure when themessage is being received by an HTTP/1.1 (or later) proxy and<strong>for</strong>warded to an HTTP/1.0 recipient. It avoids a situation wherecompliance with the protocol would have necessitated a possiblyinfinite buffer on the proxy.

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

Saved successfully!

Ooh no, something went wrong!