Why do you need to encode URLs?

后端 未结 5 1222
没有蜡笔的小新
没有蜡笔的小新 2020-12-08 04:16

Why do you need to encode urls? Is there a good reason why you have to change every space in the GET data to %20?

5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-08 04:39

    From RFC 2936, section 2.4.3:

    The space character is excluded because significant spaces may disappear and insignificant spaces may be introduced when URI are transcribed or typeset or subjected to the treatment of word- processing programs. Whitespace is also used to delimit URI in many contexts.

提交回复
热议问题