Different behaviours of treating \ (backslash) in the url by FireFox and Chrome

后端 未结 3 1342
萌比男神i
萌比男神i 2021-01-11 12:26

BACKGROUND

According to my experience when my ubuntu workstation is configured on domain with active directory, the user name created for me was acc

3条回答
  •  花落未央
    2021-01-11 13:15

    The unified solution to deal with backslash in a URL is to use %5C. RFC 2396 did not allow that character in URLs at all (so any behavior regarding that character was just error-recovery behavior). RFC 3986 does allow it, but is not widely implemented, not least because it's not exactly compatible with existing URL processors.

    Chrome, in particular, does the same thing as IE: assumes you meant a forward slash any time you type a backslash, as you discovered, because that's what Windows file paths do.

提交回复
热议问题