What is the difference between Content-Type…charset=X and Content-Encoding=X?
问题 Is there any effective difference between Content-Encoding: UTF-8 Content-Type: text/html; charset=utf-8 ? 回答1: Optional parameter charset makes sense only for text-based content ( Content-Types like text/plain , text/html , and such). Not all messages are text. Content-Encoding means that the whole body has been encoded in some way (usually compressed). Typical values for this header are gzip and deflate . The recipient of this message should decode (e.g. ungzip) the body to get the original