Skip to content

Instantly share code, notes, and snippets.

@huanglong-zz
Last active December 31, 2015 14:19
Show Gist options
  • Save huanglong-zz/7999762 to your computer and use it in GitHub Desktop.
Save huanglong-zz/7999762 to your computer and use it in GitHub Desktop.

http://stackoverflow.com/questions/1178024/can-a-url-contain-a-semi-colon http://www.flickr.com/photos/ecoland/tags/wildatlas%3Ahiking%3Df266/ http://www.quora.com/Is-it-safe-to-use-a-colon-in-the-path-of-a-URL

  • ; 可以用来做 & 的替代
  • path 中的 : 会被转义
  • 在 HTTP 协议中 ,冒号已经被用来作为 协议的分割 符,在参数串里面,尽量不要去占用协议本身具备语义的符号

e.g:

attrs=ID-subid-subid,ID-subid-subid,ID-subid

避免:

attrs=ID:subid:subid;ID:subid:subid;ID:subid
attrs=ID,subid,subid-ID,subid,subid-ID,subid

以上讨论来自:@dotnil @nuysoft @kfitfk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment