| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
HTTP Data Transfer, Content Encodings and Transfer Encodings (Page 3 of 3) Use of Content and Transfer Encodings in HTTP Since the two encodings are applied at different levels, it is possible for both to be used at the same time. A content encoding may be applied to an entity and then placed into a message. On some or all of the hops that are used to move the message containing that entity, a transfer encoding may be applied to the entire message (of course including the entity). The transfer encoding is removed first, and then the content encoding. Okay, so what are these used for in practice? Not a great deal. The HTTP standard defines a small number of content and transfer encodings, and specifies that additional methods may be registered with the IANA. As of the time that I write this, however, only the ones defined in the HTTP/1.1 standard are in use. Content encodings are currently used only to implement compression. This is a good example of an encoding that while not strictly necessary, can be useful since it improves performancefor some types of data, dramatically. The RFC 2616 defines three different encoding algorithms: gzip (the compression used by the UNIX gzip program, and described in RFC 1952); compress (again, representing the compression method used by the UNIX program of that name) and deflate (a method defined in RFCs 1950 and 1951).
Since transfer encodings are intended to be used to make data safe for transfer, and weve already discussed the fact that HTTP can handle arbitrary binary data, this suggests that transfer encodings are not really necessary. As it turns out, however, there is one situation where safe transport does become an issue: the matter of identifying the end of a message. This issue is the subject of the next topic.
Home - Table Of Contents - Contact Us The TCP/IP Guide (http://www.TCPIPGuide.com) Version 3.0 - Version Date: September 20, 2005 © Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved. Not responsible for any loss resulting from the use of this site. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||