在哪里可以获得 RFC 2396 的简要概述?
我想更好地理解 RFC 2396 和整个 URL / URI 的事情,并且由于 Cocoa 的 NSURL 基于 RFC 2396,所以我寻找概述。 RFC 本身对我来说太难读了。
I want to understand RFC 2396 and the whole URL / URI thing better, and since NSURL from Cocoa is based on RFC 2396, I look for an overview. The RFC itself is too hard to read for me.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我假设您真正的问题是关于整个 URI / URL / URN 分割。首先我要说的是,这只是术语,在许多情况下它们是可以互换的。
URL 是统一资源定位器:它标识访问“方案”,例如
http:
,并包含足够的信息来定位该资源使用该方案。它不一定包含足够的信息来访问资源:例如,HTTP URL 会将您带到某个页面,但该页面可能具有访问身份验证要求。URN 是统一资源名称:它也以“方案”开头,然后包含适合该方案的任意信息。 URN 很令人困惑,因为虽然有几个预定义的方案,例如“uuid”,但这些方案没有指定的用途(与 HTTP 不同)。这不一定是坏事:我喜欢将 URN 用于 XML 命名空间之类的东西,我不希望有任何暗示您可以实际检索与该命名空间相关的内容。
URI 是统一资源标识符:包含 URL、URN 和一些其他标识符类型的超集。 RFC 提到了 URL 和 URN,但没有详细介绍。这是因为它关注 URI 的物理构造(一般格式、应如何编码等),而不是用法。
针对挑剔者进行编辑:假设当我说“以方案开始”时,有文本“(当前上下文可能暗示)”。
I'm going to assume that your real question is about the whole URI / URL / URN split. And I'll start by saying that it's just terminology, and in many cases they're interchangeable.
A URL is a Uniform Resource Locator: it identifies an access "scheme", such as
http:
, and contains enough information to locate that resource using that scheme. It doesn't necessarily contain enough information to access the resource: For example, an HTTP URL will get you to a page, but that page may have authentication requirements for access.A URN is a Uniform Resource Name: it also starts with a "scheme", then contains arbitrary information appropriate for that scheme. URNs are confusing because, while there are several predefined schemes such as "uuid", there's no specified use for those schemes (unlike, say, HTTP). This is not necessarily a bad thing: I like to use URNs for things like XML Namespaces, where I don't want there to be any implication that you can actually retrieve something related to that namespace.
A URI is a Uniform Resource Identifier: a superset containing URLs, URNs, and a few other identifier types. The RFC mentions URLs and URNs, but doesn't go into a lot of detail. That's because it focuses on the physical construction of a URI (the general format, how it should be encoded, &c), not the usage.
Edit for the nitpickers: assume that when I say "starts with a scheme", there is the text "(which may be implied by current context)".
RFC 3305 可能会有所帮助:
RFC 3305 might help:
对于概述,实际 RFC 的摘要和介绍应该足够了。您可以选择 RFC 中您想要更好地理解的特定部分。
基本上,要更好或更彻底地理解 RFC 2396 - 这就是您所要求的(以及概述..),老实说,没有什么比阅读 RFC 本身更好的了。对我来说似乎合乎逻辑。
For an overview, the abstract and the introduction of the actual RFC should be sufficient. You can pick specific sections of the RFC out that you want to understand better.
Basically, to understand RFC 2396 better or more thoroughly - which is what you are asking (as well as an overview..), you can't do much better than reading the RFC itself to be honest. Seems logical to me.