application/x-www-form-urlencoded and charset=“utf-8”?

后端 未结 2 689
被撕碎了的回忆
被撕碎了的回忆 2020-12-14 01:21

Is it customary to omit ;charset=\"utf-8\" when the Content-type is application/x-www-form-urlencoded?

In particular, when using acce

2条回答
  •  自闭症患者
    2020-12-14 01:27

    1. There is no charset parameter defined for this media type.

    2. For the encoding guidelines, see https://url.spec.whatwg.org/#application/x-www-form-urlencoded .

    The application/x-www-form-urlencoded standard implies UTF-8 and percent-encoding.

    Though:

    A legacy server-oriented implementation might have to support encodings other than UTF-8 as well as have special logic for tuples of which the name is _charset. Such logic is not described here as only UTF-8 is conforming.

提交回复
热议问题