开发者

Does a URI include the protocol?

Will the URI of this URL, for example http://news.bbc.co.uk/sport include http:// at the fr开发者_Go百科ont, making the URI http://news.bbc.co.uk ?

Or, is the URI just news.bbc.co.uk ?


A URI per RFC 3986 has the grammar:

URI         = scheme ":" hier-part [ "?" query ] [ "#" fragment ]

So, yes, the scheme http as well as the separating : and the // prefix of the hier-part are part of the URI. news.bbc.co.uk is only the host.


The URI Scheme (http, ftp, file et.c.) is part of the uri.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜