Review HTTP 14.2 HTTP header-Accept-charset (RFC 2616)

Source: Internet
Author: User

HTTP Header

Accept-charset represents the character set supported by the browser

Example: Accept-charset: ISO-8859-1, UTF-8; q = 0.7, *; q = 0.3

This browser prefers the following character sets

1) favorite ISO-8859-1

2) then UTF-8

3) The last is * (all strings are not limited)

The corresponding response HTTP header field is Content-Type

If the character set requested by the browser is not responded by the server, the server should return error 406.

Note that this is only a flag, and the server mustProgramEnsure that the declared character set type is consistent with the character set used in the HTTP body.

For example, declare accept-charset: UTF-8 in the HTTP Header

However, the body uses gb2312 encoding... the browser is garbled --#

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.