例如,我遇到这个网址类型:http://username:[email protected]/protected/files
。
我在网上搜索了这个,但我找不到我的预期。
维基百科很好地解释了the syntax of a URI:
scheme:[//[user[:password]@]host[:port]][/path][?query][#fragment]
您的username:[email protected]/protected/files
可能看起来像和URL,但如果不是,因为它不包括访问数据的协议。这是一个uri。
浏览器(我想你指的是Web浏览器)可以使用URL,它是包含协议的URI的子类型。请注意Web浏览器不能使用所有现有协议,只能使用其中一些协议(http,https,ftp,file ...)username
不是协议。