且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

URL 可以包含分号并且仍然有效吗?

更新时间:2023-11-26 14:14:34

A 保留分号 并且应该仅用于其特殊目的(这取决于方案).

A semicolon is reserved and should only for its special purpose (which depends on the scheme).

第 2.2 节:

许多 URL 方案保留某些具有特殊含义的字符:他们出现在URL 的特定于方案的部分有一个指定语义.如果性格对应一个八位字节是在方案中保留,八位字节必须被编码.那些角色 ";",/"、?"、:"、@"、="和&"是可能是的字符为特殊含义保留方案.不能有其他字符在方案中保留.

Many URL schemes reserve certain characters for a special meaning: their appearance in the scheme-specific part of the URL has a designated semantics. If the character corresponding to an octet is reserved in a scheme, the octet must be encoded. The characters ";", "/", "?", ":", "@", "=" and "&" are the characters which may be reserved for special meaning within a scheme. No other characters may be reserved within a scheme.