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.
精彩评论