2016-11-05 82 views
0

URL格式有一个有趣的事情:
URL的路径段中的参数。URL的路径段中的参数

欲了解更多信息,请参见 “2.2.5” 在
奥赖利 - HTTP - 权威指南”。

or in official specification https://www.ietf.org/rfc/rfc2396.txt section 3.3。

这本书可以在互联网上免费找到。

让我们考虑以下网址:

http://www.example.com/first-segment/second-segment/index.html?type=HelloWorld 

这里/first-segment/second-segment/index.html是URL的路径部分。

  1. first-segment是路径
  2. second-segment的第一段是路径
  3. index.html的第二段该路径的第三段

正是在这本书指出,每个段可以具有用分号“;”分隔的单个参数。在我们的例子则可能是:

http://www.example.com/first-segment;f1=WWW/second-segment;s1=1;s2=2/index.html;i1=100;abc=200?type=HelloWorld 
  1. 这里f1 - 参数first-segment
  2. s1s2 - 参数second-segment
  3. i1abc参数index.html

的问题是:你知道任何实际的例子吗? URL中的这些参数?

回答

1

我不知道路径段中参数的确切示例。

但是关闭的例子是连接和SFTP参数在(过期)SFTP URL proposal

还有一个建议connection parameter,该fingerprint的SSH主机密钥指纹:

sftp://username:password;[email protected]/ 

而提出的一种SFTP parameter,该typecode的传输模式(ASCII与二进制)。有没有官方的例子,但它应该是这样的:

sftp://username:[email protected]/path/file;typecode=i 

(究竟是什么,而语义不同,有你的“路径”参数的语法)