gpt4 book ai didi

url - RFC 1738 : URL: Must the host contain a dot?

转载 作者:行者123 更新时间:2023-12-04 21:22:50 25 4
gpt4 key购买 nike

根据 RFC 1738: Uniform Resource Locators (URL): 3.1. Common Internet Scheme Syntax ,宿主组件是否必须包含一个点,例如“example.com”?即,它可以只由一个域标签组成吗?

最佳答案

不,主机不必包含点。即,是的,只有一个域标签就可以了。看 domain , subdomainlabel ( http://tools.ietf.org/html/rfc1034#section-3.5 ):

<domain> ::= <subdomain> | " "

<subdomain> ::= <label> | <subdomain> "." <label>

<label> ::= <letter> [ [ <ldh-str> ] <let-dig> ]

<ldh-str> ::= <let-dig-hyp> | <let-dig-hyp> <ldh-str>

<let-dig-hyp> ::= <let-dig> | "-"

<let-dig> ::= <letter> | <digit>

<letter> ::= any one of the 52 alphabetic characters A through Z in upper case and a through z in lower case

<digit> ::= any one of the ten digits 0 through 9

本文档引用自 http://tools.ietf.org/html/rfc1738#section-3.1描述主机命名规则。

关于url - RFC 1738 : URL: Must the host contain a dot?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7110010/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com