Is a URL allowed to contain a space?

后端 未结 10 1399
慢半拍i
慢半拍i 2020-11-22 04:02

Is a URI (specifically an HTTP URL) allowed to contain one or more space characters? If a URL must be encoded, is + just a commonly followed convention

10条回答
  •  没有蜡笔的小新
    2020-11-22 04:25

    Can someone point to an RFC indicating that a URL with a space must be encoded?

    URIs, and thus URLs, are defined in RFC 3986.

    If you look at the grammar defined over there you will eventually note that a space character never can be part of a syntactically legal URL, thus the term "URL with a space" is a contradiction in itself.

提交回复
热议问题