rfc-9652

The Link-Template HTTP Header Field

M. Nottingham
date2024-09 streamIETF areawit wghttpapi statusPROPOSED STANDARD pages5 canonicalhttps://www.rfc-editor.org/rfc/rfc9652 doi10.17487/RFC9652
This specification defines the Link-Template HTTP header field, providing a means for describing the structure of a link between two resources so that new links can be generated.

Extracted elements (12)

design-rationale §2.1

The 'var-base' Parameter exists to allow template variables to be globally identified via URIs, enabling dereferencing to discover the syntax or semantics of a variable. The specification intentionally leaves the format of such information out of scope.

http

interoperability-note §2

Some target attribute names will not serialize as Structured Field Parameter keys (per Section 3.1.2 of RFC 9651), which implementations must account for when encoding link target attributes.

http

interoperability-note §1

The Link-Template header field is complementary to, not a replacement for, the Link header field defined in RFC 8288. The Link header field carries links directly while Link-Template carries URI Templates for constructing links.

http

normative-requirement §2 MUST

Implementations MUST support all levels of URI Template defined by RFC 6570 in the link String and the 'anchor' Parameter.

http

normative-requirement §2 MUST

Target attribute Parameter values MUST be Strings, unless they contain non-ASCII characters, in which case they MUST be Display Strings.

http

normative-requirement §2 MUST

The 'anchor' and 'rel' Parameters on the Link-Template header field MUST be Strings, consistent with their usage in the Link header field.

http

normative-requirement §2 MAY

The 'anchor' Parameter MAY contain a URI Template, allowing the link context itself to be templated (e.g., anchor="#{book_id}").

http

protocol-element §2

The Link-Template header field is a Structured Field whose value is a List of Strings, where each String contains a URI Template and can have Parameters carrying metadata. It is semantically equivalent to the Link header field except that the link target and link anchor can contain URI Templates.

http

protocol-element §2.1

The 'var-base' Parameter on a templated link conveys a URI-reference used as a base URI for variable names in the URI Template, allowing template variables to be globally identified rather than context-specific.

http

protocol-element §2.1

To determine the URI for a given variable under 'var-base', the value is used as a base URI in reference resolution (per RFC 3986). If the resulting URI is still relative, the link context is used as a further base URI per the Web Linking specification.

http

registry §4

This specification registers 'Link-Template' as a Permanent field name in the IANA Hypertext Transfer Protocol (HTTP) Field Name Registry.

http, registry

security-consideration §3

The security considerations for the Link header field (RFC 8288) and for URI Templates (RFC 6570) both apply to Link-Template. Target attributes conveyed via Display Strings are vulnerable to a wide variety of attacks; implementers should consult Unicode Technical Report #36 for handling guidance.

http, security