在哪里可以获得 RFC 2396 的简要概述?

发布于 2024-08-18 20:13:13 字数 97 浏览 2 评论 0原文

我想更好地理解 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

鲜肉鲜肉永远不皱 2024-08-25 20:13:13

我假设您真正的问题是关于整个 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)".

不奢求什么 2024-08-25 20:13:13

RFC 3305 可能会有所帮助:

本文档[...]解决并试图澄清与 URI 相关的问题。本文档讨论了 URI 空间的划分方式以及 URI、URL 和 URN 之间的关系,描述了 URI 方案和 URN 命名空间 ID 的注册方式,并提出了有关该主题的继续工作的建议。

RFC 3305 might help:

This document [...] addresses and attempts to clarify issues pertaining to URIs. This document addresses how URI space is partitioned and the relationship between URIs, URLs, and URNs, describes how URI schemes and URN namespaces ids are registered, and presents recommendations for continued work on this subject.

靖瑶 2024-08-25 20:13:13

对于概述,实际 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文