Internet-Draft | Meta-URIs | July 2024 |
Lasso | Expires 30 January 2025 | [Page] |
This document describes a format for embedding a URI inside a URI, as part of a URI scheme's syntax definition.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 30 January 2025.¶
Copyright (c) 2024 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
Sometimes, it is useful to encode application-specific metadata as part of a URI. Traditionally, URIs provide very little support for application-specific metadata: [RFC3986] (Section 4.5) defines URI fragments, but they are specified by "the media type of [the resource]", not the application. In practice, some applications have alternatively made use of fragments for application-specific metadata, in conflict with its intended usage. This document defines a generic syntax for encoding application-specific metadata in a URI.¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
An URI scheme describes a meta-URI if the scheme's syntax conforms to the syntax described here in Augmented BNF [RFC5234], borrrowing various terms from [RFC3986].¶
metaURI = scheme ":" hier-part "?" meta-query "&&" URI-reference meta-query = [ meta-qattr *("&" meta-qattr) ] meta-q-res-avail = ":" / "@" / "!" / "$" / "'" / "(" / ")" / "*" / "+" / "," / "=" meta-qchar = unreserved / meta-q-res-avail / pct-encoded meta-qattr = 1*meta-qchar¶
As per Section 2.1 of [RFC8820], the meta-URI scheme MAY require support for specific embedded schemes, but SHOULD NOT restrict the allowed embedded schemes.¶
The fragment identifier, if any, is not part of the embedded URI, but instead applies to the whole Meta-URI, as per Section 3.5 of [RFC3986]. While the URI-reference term used above includes the fragment identifier, this approach merely enables future updates to [RFC3986] to also apply to this document automatically.¶
This document has no IANA considerations.¶
It is up to the scheme authors to evaluate any security implications of using this syntax.¶
IPv6 literals cannot be encoded in the embedded URI, as square brackets ("[" and "]") are not allowed in the query element. A future update to [RFC3986] may change this.¶
No encoding considerations are known at this time.¶
Some of the ABNF rules in this document were adapted from [RFC7512].¶