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.

19.4.4 Introduction of Content-EncodingRFC 2045 does not include any concept equivalent to HTTP/1.1'sContent-Encoding header field. Since this acts as a modifier on themedia type, proxies and gateways from HTTP to MIME-compliantprotocols MUST either change the value of the Content-Type headerfield or decode the entity-body be<strong>for</strong>e <strong>for</strong>warding the message. (Someexperimental applications of Content-Type <strong>for</strong> Internet mail have useda media-type parameter of ";conversions=" to per<strong>for</strong>ma function equivalent to Content-Encoding. However, this parameter isnot part of RFC 2045.)19.4.5 No Content-Transfer-EncodingHTTP does not use the Content-Transfer-Encoding (CTE) field of RFC2045. Proxies and gateways from MIME-compliant protocols to HTTP MUSTremove any non-identity CTE ("quoted-printable" or "base64") encodingprior to delivering the response message to an HTTP client.Proxies and gateways from HTTP to MIME-compliant protocols areresponsible <strong>for</strong> ensuring that the message is in the correct <strong>for</strong>matand encoding <strong>for</strong> safe transport on that protocol, where "safe<strong>Fielding</strong>, et al. Standards Track [Page 168]RFC <strong>2616</strong> HTTP/1.1 June 1999transport" is defined by the limitations of the protocol being used.Such a proxy or gateway SHOULD label the data with an appropriateContent-Transfer-Encoding if doing so will improve the likelihood ofsafe transport over the destination protocol.19.4.6 Introduction of Transfer-EncodingHTTP/1.1 introduces the Transfer-Encoding header field (section14.41). Proxies/gateways MUST remove any transfer-coding prior to<strong>for</strong>warding a message via a MIME-compliant protocol.A process <strong>for</strong> decoding the "chunked" transfer-coding (section 3.6)can be represented in pseudo-code as:length := 0read chunk-size, chunk-extension (if any) and CRLFwhile (chunk-size > 0) {read chunk-data and CRLFappend chunk-data to entity-bodylength := length + chunk-size

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

Saved successfully!

Ooh no, something went wrong!