< 上一个 | 内容 | 下一个 >

4.5 Uniform resource identifiers

HTTP uses ASCII text for transferring URIs between clients and servers, as well as for including options and details regarding the message content. These transfers occur with every transaction. If the naming scheme used for URIs is overly verbose, these transactions become needlessly inefficient on constrained networks. Of course, if the naming scheme used is overly cryptic, the advantages of a text-based protocol are lost, and it becomes difficult for someone troubleshooting to decipher a transaction.


The following conventions are used for URI naming:


a) URI elements are at most four characters, but recognizable to a knowledgeable engineer. Element names as short as one character are acceptable provided their meaning is clear.

b) URI elements are constructed of consonants only, unless inclusion of a vowel adds clarity, such as a leading vowel or well-known abbreviation.

c) URI elements are in all lower case.

d) URIs SHALL NOT be greater than 255 bytes in length. In practice, URIs SHOULD be much smaller than 80 bytes.