< draft-nottingham-rfc5988bis-00.txt   draft-nottingham-rfc5988bis-01.txt >
Network Working Group M. Nottingham Network Working Group M. Nottingham
Internet-Draft November 4, 2015 Internet-Draft May 3, 2016
Obsoletes: 5988 (if approved) Obsoletes: 5988 (if approved)
Intended status: Standards Track Intended status: Standards Track
Expires: May 7, 2016 Expires: November 4, 2016
Web Linking Web Linking
draft-nottingham-rfc5988bis-00 draft-nottingham-rfc5988bis-01
Abstract Abstract
This specification defines a way to indicate the relationships This specification defines a way to indicate the relationships
between resources on the Web ("links") and the type of those between resources on the Web ("links") and the type of those
relationships ("link relation types"). relationships ("link relation types").
It also defines the use of such links in HTTP headers with the Link It also defines the use of such links in HTTP headers with the Link
header field. header field.
skipping to change at page 1, line 49 skipping to change at page 1, line 49
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on May 7, 2016. This Internet-Draft will expire on November 4, 2016.
Copyright Notice Copyright Notice
Copyright (c) 2015 IETF Trust and the persons identified as the Copyright (c) 2016 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
skipping to change at page 2, line 37 skipping to change at page 2, line 37
outside the IETF Standards Process, and derivative works of it may outside the IETF Standards Process, and derivative works of it may
not be created outside the IETF Standards Process, except to format not be created outside the IETF Standards Process, except to format
it for publication as an RFC or to translate it into languages other it for publication as an RFC or to translate it into languages other
than English. than English.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Notational Conventions . . . . . . . . . . . . . . . . . . . 3 2. Notational Conventions . . . . . . . . . . . . . . . . . . . 3
3. Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3. Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
4. Link Relation Types . . . . . . . . . . . . . . . . . . . . . 4 4. Link Relation Types . . . . . . . . . . . . . . . . . . . . . 5
4.1. Registered Relation Types . . . . . . . . . . . . . . . . 5 4.1. Registered Relation Types . . . . . . . . . . . . . . . . 5
4.1.1. Registering Link Relation Types . . . . . . . . . . . 5 4.1.1. Registering Link Relation Types . . . . . . . . . . . 6
4.2. Extension Relation Types . . . . . . . . . . . . . . . . 6 4.2. Extension Relation Types . . . . . . . . . . . . . . . . 7
5. The Link Header Field . . . . . . . . . . . . . . . . . . . . 7 5. Link Serialisation in the Link HTTP Header Field . . . . . . 7
5.1. Link Target . . . . . . . . . . . . . . . . . . . . . . . 7 5.1. Link Target . . . . . . . . . . . . . . . . . . . . . . . 8
5.2. Link Context . . . . . . . . . . . . . . . . . . . . . . 8 5.2. Link Context . . . . . . . . . . . . . . . . . . . . . . 8
5.3. Relation Type . . . . . . . . . . . . . . . . . . . . . . 8 5.3. Relation Type . . . . . . . . . . . . . . . . . . . . . . 9
5.4. Target Attributes . . . . . . . . . . . . . . . . . . . . 8 5.4. Target Attributes . . . . . . . . . . . . . . . . . . . . 9
5.5. Examples . . . . . . . . . . . . . . . . . . . . . . . . 9 5.5. Examples . . . . . . . . . . . . . . . . . . . . . . . . 10
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11
6.1. Link HTTP Header Registration . . . . . . . . . . . . . . 10 6.1. Link HTTP Header Field Registration . . . . . . . . . . . 11
6.2. Link Relation Type Registry . . . . . . . . . . . . . . . 11 6.2. Link Relation Type Registry . . . . . . . . . . . . . . . 11
7. Security Considerations . . . . . . . . . . . . . . . . . . . 11 7. Security Considerations . . . . . . . . . . . . . . . . . . . 12
8. Internationalisation Considerations . . . . . . . . . . . . . 12 8. Internationalisation Considerations . . . . . . . . . . . . . 12
9. References . . . . . . . . . . . . . . . . . . . . . . . . . 12 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 13
9.1. Normative References . . . . . . . . . . . . . . . . . . 12 9.1. Normative References . . . . . . . . . . . . . . . . . . 13
9.2. Informative References . . . . . . . . . . . . . . . . . 13 9.2. Informative References . . . . . . . . . . . . . . . . . 14
Appendix A. Using the Link Header with the HTML Format . . . . . 15 Appendix A. Link Serialisation in HTML . . . . . . . . . . . . . 16
Appendix B. Using the Link Header with the Atom Format . . . . . 15 Appendix B. Link Serialisation in Atom . . . . . . . . . . . . . 16
Appendix C. Changes from RFC5988 . . . . . . . . . . . . . . . . 16 Appendix C. Changes from RFC5988 . . . . . . . . . . . . . . . . 17
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 17 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 18
1. Introduction 1. Introduction
This specification defines a way to indicate the relationships This specification defines a way to indicate the relationships
between resources on the Web ("links") and the type of those between resources on the Web ("links") and the type of those
relationships ("link relation types"). relationships ("link relation types").
HTML [W3C.REC-html5-20141028] and Atom [RFC4287] both have well- HTML [W3C.REC-html5-20141028] and Atom [RFC4287] both have well-
defined concepts of linking; this specification generalises this into defined concepts of linking; this specification generalises this into
a framework that encompasses linking in these formats and a framework that encompasses linking in these formats and
skipping to change at page 3, line 48 skipping to change at page 3, line 48
and URI-Reference; from [RFC6838]: type-name and subtype-name; from and URI-Reference; from [RFC6838]: type-name and subtype-name; from
[W3C.CR-css3-mediaqueries-20090915]: media_query_list; from [W3C.CR-css3-mediaqueries-20090915]: media_query_list; from
[RFC5646]: Language-Tag; and from [I-D.ietf-httpbis-rfc5987bis], ext- [RFC5646]: Language-Tag; and from [I-D.ietf-httpbis-rfc5987bis], ext-
value and parmname. value and parmname.
3. Links 3. Links
In this specification, a link is a typed connection between two In this specification, a link is a typed connection between two
resources, and is comprised of: resources, and is comprised of:
o A link context, o A _link context_,
o a link relation type (Section 4), o a _link relation type_ (Section 4),
o a link target, and o a _link target_, and
o optionally, target attributes. o optionally, _target attributes_.
A link can be viewed as a statement of the form "{link context} has a A link can be viewed as a statement of the form "{link context} has a
{link relation type} resource at {link target}, which has {target {link relation type} resource at {link target}, which has {target
attributes}". attributes}".
Link contexts and link targets are both IRIs [RFC3987]. However, in Link contexts and link targets are both IRIs [RFC3987]. However, in
the common case, the link context will also be a URI [RFC3986], the common case, the link context will also be a URI [RFC3986],
because many protocols (such as HTTP) do not support dereferencing because many protocols (such as HTTP) do not support dereferencing
IRIs. Likewise, the link target will be sometimes be converted to a IRIs. Likewise, the link target will be sometimes be converted to a
URI (see [RFC3987], Section 3.1) in places that do not support IRIs URI (see [RFC3987], Section 3.1) in places that do not support IRIs
(such as the Link header field defined in Section 5). (such as the Link header field defined in Section 5).
This specification does not place restrictions on the cardinality of This specification does not place restrictions on the cardinality of
links; there can be multiple links to and from a particular target, links; there can be multiple links to and from a particular target,
and multiple links of the same or different types between a given and multiple links of the same or different types between a given
context and target. Likewise, the relative ordering of links in any context and target. Likewise, the relative ordering of links in any
particular serialisation, or between serialisations (e.g., the Link particular serialisation, or between serialisations (e.g., the Link
header and in-content links) is not specified or significant in this header field and in-content links) is not specified or significant in
specification; applications that wish to consider ordering this specification; applications that wish to consider ordering
significant can do so. significant can do so.
Target attributes are a set of key/value pairs that describe the link _Target attributes_ are a set of key/value pairs that describe the
or its target; for example, a media type hint. This specification link or its target; for example, a media type hint. This
does not attempt to coordinate their names or use, but does provide specification does not attempt to coordinate their names, cardinality
common target attributes for use in the Link HTTP header. or use, but individual link relations, link serialisations and link
applications can do so. This specification does provide common
target attributes for use in the Link HTTP header field.
Finally, this specification does not define a general syntax for Links are conveyed in _link serialisations_; they are the "bytes on
expressing links, nor does it mandate a specific context for any the wire", and can occur in various forms. This specification does
given link; it is expected that serialisations of links will specify not define a general syntax for links, nor does it mandate a specific
both aspects. One such serialisation is communication of links context for any given link; it is expected that serialisations of
through HTTP headers, specified in Section 5. links will specify both aspects. One such serialisation is
communication of links through HTTP headers, specified in Section 5.
Finally, links are consumed by _link applications_. Generally, an
application will define the link relation types it uses, along with
the serialisations that they might occur within. For example, the
application "Web browsing" looks for the "stylesheet" link relation
type in the HTML link serialisation.
4. Link Relation Types 4. Link Relation Types
In the simplest case, a link relation type identifies the semantics In the simplest case, a link relation type identifies the semantics
of a link. For example, a link with the relation type "copyright" of a link. For example, a link with the relation type "copyright"
indicates that the resource identified by the link target is a indicates that the resource identified by the link target is a
statement of the copyright terms applying to the current link statement of the copyright terms applying to the current link
context. context.
Link relation types can also be used to indicate that the target Link relation types can also be used to indicate that the target
skipping to change at page 5, line 38 skipping to change at page 6, line 5
particular application, the name should reflect that, so that more particular application, the name should reflect that, so that more
general names are available for less specific use. general names are available for less specific use.
Registered relation types MUST NOT constrain the media type of the Registered relation types MUST NOT constrain the media type of the
link context, and MUST NOT constrain the available representation link context, and MUST NOT constrain the available representation
media types of the link target. However, they can specify the media types of the link target. However, they can specify the
behaviours and properties of the target resource (e.g., allowable behaviours and properties of the target resource (e.g., allowable
HTTP methods, request and response media types that must be HTTP methods, request and response media types that must be
supported). supported).
Applications that wish to refer to a registered relation type with a Historically, applications have sometimes referred to registered
URI [RFC3986] MAY do so by prepending relation types with a URI [RFC3986] (e.g., Appendix B) by prefixing
"http://www.iana.org/assignments/relation/" to its name. Note that their names with an application-defined base URI. This practice is
the resulting strings are not considered equivalent to the registered NOT RECOMMENDED, because the resulting strings will not be considered
relation types by many processors, and SHOULD NOT be serialised equivalent to the registered relation types by other processors.
unless the application using link relations specifically allows them. Applications that do use such URIs internally MUST NOT use them in
link serialisations that do not explicitly accommodate them.
4.1.1. Registering Link Relation Types 4.1.1. Registering Link Relation Types
Relation types are registered on the advice of a Designated Expert Relation types are registered on the advice of a Designated Expert
(appointed by the IESG or their delegate), with a Specification (appointed by the IESG or their delegate), with a Specification
Required (using terminology from [RFC5226]). Required (using terminology from [RFC5226]).
The Expert(s) will establish procedures for requesting registrations, The Expert(s) will establish procedures for requesting registrations,
and make them available from the registry page. and make them available from the registry page.
skipping to change at page 6, line 46 skipping to change at page 7, line 14
4.2. Extension Relation Types 4.2. Extension Relation Types
Applications that don't wish to register a relation type can use an Applications that don't wish to register a relation type can use an
extension relation type, which is a URI [RFC3986] that uniquely extension relation type, which is a URI [RFC3986] that uniquely
identifies the relation type. Although the URI can point to a identifies the relation type. Although the URI can point to a
resource that contains a definition of the semantics of the relation resource that contains a definition of the semantics of the relation
type, clients SHOULD NOT automatically access that resource to avoid type, clients SHOULD NOT automatically access that resource to avoid
overburdening its server. overburdening its server.
The URI used for an extension relation type SHOULD be under the
control of the person or party defining it, or be delegated to them.
These URIs also SHOULD NOT use the base URI defined by an application
for registered relation types (as per Section 4.1).
When extension relation types are compared, they MUST be compared as When extension relation types are compared, they MUST be compared as
strings (after converting to URIs if serialised in a different strings (after converting to URIs if serialised in a different
format, such as a XML QNames [W3C.REC-xml-names-20091208]) in a case- format, such as a XML QNames [W3C.REC-xml-names-20091208]) in a case-
insensitive fashion, character-by-character. Because of this, all- insensitive fashion, character-by-character. Because of this, all-
lowercase URIs SHOULD be used for extension relations. lowercase URIs SHOULD be used for extension relations.
Note that while extension relation types are required to be URIs, a Note that while extension relation types are required to be URIs, a
serialisation of links can specify that they are expressed in another serialisation of links can specify that they are expressed in another
form, as long as they can be converted to URIs. form, as long as they can be converted to URIs.
5. The Link Header Field 5. Link Serialisation in the Link HTTP Header Field
The Link entity-header field provides a means for serialising one or The Link header field provides a means for serialising one or more
more links in HTTP headers. links into HTTP headers.
Link = "Link" ":" #link-value Link = "Link" ":" #link-value
link-value = "<" URI-Reference ">" *( ";" link-param ) link-value = "<" URI-Reference ">" *( ";" link-param )
link-param = ( ( "rel" "=" relation-types ) link-param = ( ( "rel" "=" relation-types )
| ( "anchor" "=" <"> URI-Reference <"> ) | ( "anchor" "=" <"> URI-Reference <"> )
| ( "rev" "=" relation-types ) | ( "rev" "=" relation-types )
| ( "hreflang" "=" Language-Tag ) | ( "hreflang" "=" Language-Tag )
| ( "media" "=" | ( "media" "="
( media_query_list | ( <"> media_query_list <"> ) ) ( media_query_list | ( <"> media_query_list <"> ) )
) )
skipping to change at page 8, line 8 skipping to change at page 8, line 48
Each link-value conveys one target IRI as a URI-Reference (after Each link-value conveys one target IRI as a URI-Reference (after
conversion to one, if necessary; see [RFC3987], Section 3.1) inside conversion to one, if necessary; see [RFC3987], Section 3.1) inside
angle brackets ("<>"). If the URI-Reference is relative, parsers angle brackets ("<>"). If the URI-Reference is relative, parsers
MUST resolve it as per [RFC3986], Section 5. Note that any base IRI MUST resolve it as per [RFC3986], Section 5. Note that any base IRI
from the message's content is not applied. from the message's content is not applied.
5.2. Link Context 5.2. Link Context
By default, the context of a link conveyed in the Link header field By default, the context of a link conveyed in the Link header field
is the IRI of the requested resource. is identity of the representation it is associated with, as defined
in [RFC7231], Section 3.1.4.1, serialised as a URI.
When present, the anchor parameter overrides this with another URI, When present, the anchor parameter overrides this with another URI,
such as a fragment of this resource, or a third resource (i.e., when such as a fragment of this resource, or a third resource (i.e., when
the anchor value is an absolute URI). If the anchor parameter's the anchor value is an absolute URI). If the anchor parameter's
value is a relative URI, parsers MUST resolve it as per [RFC3986], value is a relative URI, parsers MUST resolve it as per [RFC3986],
Section 5. Note that any base URI from the body's content is not Section 5. Note that any base URI from the body's content is not
applied. applied.
Consuming implementations can choose to ignore links with an anchor Consuming implementations can choose to ignore links with an anchor
parameter. For example, the application in use might not allow the parameter. For example, the application in use might not allow the
skipping to change at page 8, line 44 skipping to change at page 9, line 36
The "rev" parameter has been used in the past to indicate that the The "rev" parameter has been used in the past to indicate that the
semantics of the relationship are in the reverse direction. That is, semantics of the relationship are in the reverse direction. That is,
a link from A to B with REL="X" expresses the same relationship as a a link from A to B with REL="X" expresses the same relationship as a
link from B to A with REV="X". "rev" is deprecated by this link from B to A with REV="X". "rev" is deprecated by this
specification because it often confuses authors and readers; in most specification because it often confuses authors and readers; in most
cases, using a separate relation type is preferable. cases, using a separate relation type is preferable.
Note that extension relation types are REQUIRED to be absolute URIs Note that extension relation types are REQUIRED to be absolute URIs
in Link headers, and MUST be quoted if they contain a semicolon (";") in Link headers, and MUST be quoted if they contain a semicolon (";")
or comma (",") (as these characters are used as delimiters in the or comma (",") (as these characters are used as delimiters in the
header itself). header field itself).
5.4. Target Attributes 5.4. Target Attributes
The "hreflang", "media", "title", "title*", "type", and any link- The "hreflang", "media", "title", "title*", "type", and any link-
extension link-params are considered to be target attributes for the extension link-params are considered to be target attributes for the
link. link.
The "hreflang" parameter, when present, is a hint indicating what the The "hreflang" parameter, when present, is a hint indicating what the
language of the result of dereferencing the link should be. Note language of the result of dereferencing the link should be. Note
that this is only a hint; for example, it does not override the that this is only a hint; for example, it does not override the
Content-Language header of a HTTP response obtained by actually Content-Language header field of a HTTP response obtained by actually
following the link. Multiple "hreflang" parameters on a single link- following the link. Multiple "hreflang" parameters on a single link-
value indicate that multiple languages are available from the value indicate that multiple languages are available from the
indicated resource. indicated resource.
The "media" parameter, when present, is used to indicate intended The "media" parameter, when present, is used to indicate intended
destination medium or media for style information (see destination medium or media for style information (see
[W3C.REC-html5-20141028], Section 4.2.4). Its value MUST be quoted [W3C.REC-html5-20141028], Section 4.2.4). Its value MUST be quoted
if it contains a semicolon (";") or comma (","), and there MUST NOT if it contains a semicolon (";") or comma (","), and there MUST NOT
be more than one "media" parameter in a link-value. be more than one "media" parameter in a link-value.
The "title" parameter, when present, is used to label the destination The "title" parameter, when present, is used to label the destination
of a link such that it can be used as a human-readable identifier of a link such that it can be used as a human-readable identifier
(e.g., a menu entry) in the language indicated by the Content- (e.g., a menu entry) in the language indicated by the Content-
Language header (if present). The "title" parameter MUST NOT appear Language header field (if present). The "title" parameter MUST NOT
more than once in a given link-value; occurrences after the first appear more than once in a given link-value; occurrences after the
MUST be ignored by parsers. first MUST be ignored by parsers.
The "title*" parameter can be used to encode this label in a The "title*" parameter can be used to encode this label in a
different character set, and/or contain language information as per different character set, and/or contain language information as per
[I-D.ietf-httpbis-rfc5987bis]. The "title*" parameter MUST NOT [I-D.ietf-httpbis-rfc5987bis]. The "title*" parameter MUST NOT
appear more than once in a given link-value; occurrences after the appear more than once in a given link-value; occurrences after the
first MUST be ignored by parsers. If the parameter does not contain first MUST be ignored by parsers. If the parameter does not contain
language information, its language is indicated by the Content- language information, its language is indicated by the Content-
Language header (when present). Language header field (when present).
If both the "title" and "title*" parameters appear in a link-value, If both the "title" and "title*" parameters appear in a link-value,
processors SHOULD use the "title*" parameter's value. processors SHOULD use the "title*" parameter's value.
The "type" parameter, when present, is a hint indicating what the The "type" parameter, when present, is a hint indicating what the
media type of the result of dereferencing the link should be. Note media type of the result of dereferencing the link should be. Note
that this is only a hint; for example, it does not override the that this is only a hint; for example, it does not override the
Content-Type header of a HTTP response obtained by actually following Content-Type header field of a HTTP response obtained by actually
the link. There MUST NOT be more than one type parameter in a link- following the link. The "type" parameter MUST NOT appear more than
value. once in a given link-value; occurrences after the first MUST be
ignored by parsers.
5.5. Examples 5.5. Examples
For example: For example:
Link: <http://example.com/TheBook/chapter2>; rel="previous"; Link: <http://example.com/TheBook/chapter2>; rel="previous";
title="previous chapter" title="previous chapter"
indicates that "chapter2" is previous to this resource in a logical indicates that "chapter2" is previous to this resource in a logical
navigation path. navigation path.
Similarly, Similarly,
Link: </>; rel="http://example.net/foo" Link: </>; rel="http://example.net/foo"
indicates that the root resource ("/") is related to this resource indicates that the root resource ("/") is related to this resource
with the extension relation type "http://example.net/foo". with the extension relation type "http://example.net/foo".
The example below shows an instance of the Link header encoding The example below shows an instance of the Link header field encoding
multiple links, and also the use of RFC 5987 encoding to encode both multiple links, and also the use of RFC 5987 encoding to encode both
non-ASCII characters and language information. non-ASCII characters and language information.
Link: </TheBook/chapter2>; Link: </TheBook/chapter2>;
rel="previous"; title*=UTF-8'de'letztes%20Kapitel, rel="previous"; title*=UTF-8'de'letztes%20Kapitel,
</TheBook/chapter4>; </TheBook/chapter4>;
rel="next"; title*=UTF-8'de'n%c3%a4chstes%20Kapitel rel="next"; title*=UTF-8'de'n%c3%a4chstes%20Kapitel
Here, both links have titles encoded in UTF-8, use the German Here, both links have titles encoded in UTF-8, use the German
language ("de"), and the second link contains the Unicode code point language ("de"), and the second link contains the Unicode code point
skipping to change at page 10, line 41 skipping to change at page 11, line 34
Here, the link to "http://example.org/" has the registered relation Here, the link to "http://example.org/" has the registered relation
type "start" and the extension relation type type "start" and the extension relation type
"http://example.net/relation/other". "http://example.net/relation/other".
6. IANA Considerations 6. IANA Considerations
In addition to the actions below, IANA should terminate the Link In addition to the actions below, IANA should terminate the Link
Relation Application Data Registry, as it has not been used, and Relation Application Data Registry, as it has not been used, and
future use is not anticipated. future use is not anticipated.
6.1. Link HTTP Header Registration 6.1. Link HTTP Header Field Registration
This specification updates the Message Header registry entry for This specification updates the Message Header registry entry for
"Link" in HTTP [RFC3864] to refer to this document. "Link" in HTTP [RFC3864] to refer to this document.
Header field: Link Header field: Link
Applicable protocol: http Applicable protocol: http
Status: standard Status: standard
Author/change controller: Author/change controller:
IETF (iesg@ietf.org) IETF (iesg@ietf.org)
Internet Engineering Task Force Internet Engineering Task Force
skipping to change at page 11, line 50 skipping to change at page 12, line 35
(<http://trustee.ietf.org/license-info>). (<http://trustee.ietf.org/license-info>).
7. Security Considerations 7. Security Considerations
The content of the Link header field is not secure, private or The content of the Link header field is not secure, private or
integrity-guaranteed, and due caution should be exercised when using integrity-guaranteed, and due caution should be exercised when using
it. Use of Transport Layer Security (TLS) with HTTP ([RFC2818] and it. Use of Transport Layer Security (TLS) with HTTP ([RFC2818] and
[RFC2817]) is currently the only end-to-end way to provide such [RFC2817]) is currently the only end-to-end way to provide such
protection. protection.
Applications that take advantage of typed links should consider the Link applications ought to consider the attack vectors opened by
attack vectors opened by automatically following, trusting, or automatically following, trusting, or otherwise using links gathered
otherwise using links gathered from HTTP headers. In particular, from HTTP headers. In particular, Link header fields that use the
Link headers that use the "anchor" parameter to associate a link's "anchor" parameter to associate a link's context with another
context with another resource should be treated with due caution. resource should be treated with due caution.
The Link entity-header field makes extensive use of IRIs and URIs. The Link header field makes extensive use of IRIs and URIs. See
See [RFC3987] for security considerations relating to IRIs. See [RFC3987] for security considerations relating to IRIs. See
[RFC3986] for security considerations relating to URIs. See [RFC3986] for security considerations relating to URIs. See
[RFC7230] for security considerations relating to HTTP headers. [RFC7230] for security considerations relating to HTTP headers.
8. Internationalisation Considerations 8. Internationalisation Considerations
Link targets may need to be converted to URIs in order to express Link targets may need to be converted to URIs in order to express
them in serialisations that do not support IRIs. This includes the them in serialisations that do not support IRIs. This includes the
Link HTTP header. Link HTTP header field.
Similarly, the anchor parameter of the Link header does not support Similarly, the anchor parameter of the Link header field does not
IRIs, and therefore IRIs must be converted to URIs before inclusion support IRIs, and therefore IRIs must be converted to URIs before
there. inclusion there.
Relation types are defined as URIs, not IRIs, to aid in their Relation types are defined as URIs, not IRIs, to aid in their
comparison. It is not expected that they will be displayed to end comparison. It is not expected that they will be displayed to end
users. users.
Note that registered Relation Names are required to be lower-case Note that registered Relation Names are required to be lower-case
ASCII letters. ASCII letters.
9. References 9. References
9.1. Normative References 9.1. Normative References
[I-D.ietf-httpbis-rfc5987bis] [I-D.ietf-httpbis-rfc5987bis]
Reschke, J., "Indicating Character Encoding and Language Reschke, J., "Indicating Character Encoding and Language
for HTTP Header Field Parameters", draft-ietf-httpbis- for HTTP Header Field Parameters", draft-ietf-httpbis-
rfc5987bis-00 (work in progress), October 2015. rfc5987bis-01 (work in progress), March 2016.
[RFC2026] Bradner, S., "The Internet Standards Process -- Revision [RFC2026] Bradner, S., "The Internet Standards Process -- Revision
3", BCP 9, RFC 2026, DOI 10.17487/RFC2026, October 1996, 3", BCP 9, RFC 2026, DOI 10.17487/RFC2026, October 1996,
<http://www.rfc-editor.org/info/rfc2026>. <http://www.rfc-editor.org/info/rfc2026>.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/ Requirement Levels", BCP 14, RFC 2119,
RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997,
<http://www.rfc-editor.org/info/rfc2119>. <http://www.rfc-editor.org/info/rfc2119>.
[RFC3864] Klyne, G., Nottingham, M., and J. Mogul, "Registration [RFC3864] Klyne, G., Nottingham, M., and J. Mogul, "Registration
Procedures for Message Header Fields", BCP 90, RFC 3864, Procedures for Message Header Fields", BCP 90, RFC 3864,
DOI 10.17487/RFC3864, September 2004, DOI 10.17487/RFC3864, September 2004,
<http://www.rfc-editor.org/info/rfc3864>. <http://www.rfc-editor.org/info/rfc3864>.
[RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
Resource Identifier (URI): Generic Syntax", STD 66, RFC Resource Identifier (URI): Generic Syntax", STD 66,
3986, DOI 10.17487/RFC3986, January 2005, RFC 3986, DOI 10.17487/RFC3986, January 2005,
<http://www.rfc-editor.org/info/rfc3986>. <http://www.rfc-editor.org/info/rfc3986>.
[RFC3987] Duerst, M. and M. Suignard, "Internationalized Resource [RFC3987] Duerst, M. and M. Suignard, "Internationalized Resource
Identifiers (IRIs)", RFC 3987, DOI 10.17487/RFC3987, Identifiers (IRIs)", RFC 3987, DOI 10.17487/RFC3987,
January 2005, <http://www.rfc-editor.org/info/rfc3987>. January 2005, <http://www.rfc-editor.org/info/rfc3987>.
[RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an
IANA Considerations Section in RFCs", BCP 26, RFC 5226, IANA Considerations Section in RFCs", BCP 26, RFC 5226,
DOI 10.17487/RFC5226, May 2008, DOI 10.17487/RFC5226, May 2008,
<http://www.rfc-editor.org/info/rfc5226>. <http://www.rfc-editor.org/info/rfc5226>.
[RFC5646] Phillips, A., Ed. and M. Davis, Ed., "Tags for Identifying [RFC5646] Phillips, A., Ed. and M. Davis, Ed., "Tags for Identifying
Languages", BCP 47, RFC 5646, DOI 10.17487/RFC5646, Languages", BCP 47, RFC 5646, DOI 10.17487/RFC5646,
September 2009, <http://www.rfc-editor.org/info/rfc5646>. September 2009, <http://www.rfc-editor.org/info/rfc5646>.
[RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type [RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type
Specifications and Registration Procedures", BCP 13, RFC Specifications and Registration Procedures", BCP 13,
6838, DOI 10.17487/RFC6838, January 2013, RFC 6838, DOI 10.17487/RFC6838, January 2013,
<http://www.rfc-editor.org/info/rfc6838>. <http://www.rfc-editor.org/info/rfc6838>.
[RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer
Protocol (HTTP/1.1): Message Syntax and Routing", RFC Protocol (HTTP/1.1): Message Syntax and Routing",
7230, DOI 10.17487/RFC7230, June 2014, RFC 7230, DOI 10.17487/RFC7230, June 2014,
<http://www.rfc-editor.org/info/rfc7230>. <http://www.rfc-editor.org/info/rfc7230>.
[RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer
Protocol (HTTP/1.1): Semantics and Content", RFC 7231,
DOI 10.17487/RFC7231, June 2014,
<http://www.rfc-editor.org/info/rfc7231>.
[W3C.CR-css3-mediaqueries-20090915] [W3C.CR-css3-mediaqueries-20090915]
Lie, H., Celik, T., Glazman, D., and A. Kesteren, "Media Lie, H., Celik, T., Glazman, D., and A. Kesteren, "Media
Queries", World Wide Web Consortium CR CR-css3- Queries", World Wide Web Consortium CR CR-css3-
mediaqueries-20090915, September 2009, mediaqueries-20090915, September 2009,
<http://www.w3.org/TR/2009/CR-css3-mediaqueries-20090915>. <http://www.w3.org/TR/2009/CR-css3-mediaqueries-20090915>.
9.2. Informative References 9.2. Informative References
[RFC2068] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., and T. [RFC2068] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., and T.
Berners-Lee, "Hypertext Transfer Protocol -- HTTP/1.1", Berners-Lee, "Hypertext Transfer Protocol -- HTTP/1.1",
RFC 2068, DOI 10.17487/RFC2068, January 1997, RFC 2068, DOI 10.17487/RFC2068, January 1997,
<http://www.rfc-editor.org/info/rfc2068>. <http://www.rfc-editor.org/info/rfc2068>.
[RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H.,
Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext
Transfer Protocol -- HTTP/1.1", RFC 2616, DOI 10.17487/ Transfer Protocol -- HTTP/1.1", RFC 2616,
RFC2616, June 1999, DOI 10.17487/RFC2616, June 1999,
<http://www.rfc-editor.org/info/rfc2616>. <http://www.rfc-editor.org/info/rfc2616>.
[RFC2817] Khare, R. and S. Lawrence, "Upgrading to TLS Within [RFC2817] Khare, R. and S. Lawrence, "Upgrading to TLS Within
HTTP/1.1", RFC 2817, DOI 10.17487/RFC2817, May 2000, HTTP/1.1", RFC 2817, DOI 10.17487/RFC2817, May 2000,
<http://www.rfc-editor.org/info/rfc2817>. <http://www.rfc-editor.org/info/rfc2817>.
[RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, DOI 10.17487/ [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818,
RFC2818, May 2000, DOI 10.17487/RFC2818, May 2000,
<http://www.rfc-editor.org/info/rfc2818>. <http://www.rfc-editor.org/info/rfc2818>.
[RFC4287] Nottingham, M., Ed. and R. Sayre, Ed., "The Atom [RFC4287] Nottingham, M., Ed. and R. Sayre, Ed., "The Atom
Syndication Format", RFC 4287, DOI 10.17487/RFC4287, Syndication Format", RFC 4287, DOI 10.17487/RFC4287,
December 2005, <http://www.rfc-editor.org/info/rfc4287>. December 2005, <http://www.rfc-editor.org/info/rfc4287>.
[W3C.REC-html-rdfa-20150317] [W3C.REC-html-rdfa-20150317]
Sporny, M., "HTML+RDFa 1.1 - Second Edition", World Wide Sporny, M., "HTML+RDFa 1.1 - Second Edition", World Wide
Web Consortium Recommendation REC-html-rdfa-20150317, Web Consortium Recommendation REC-html-rdfa-20150317,
March 2015, March 2015,
skipping to change at page 15, line 5 skipping to change at page 16, line 5
html5-20141028, October 2014, html5-20141028, October 2014,
<http://www.w3.org/TR/2014/REC-html5-20141028>. <http://www.w3.org/TR/2014/REC-html5-20141028>.
[W3C.REC-xml-names-20091208] [W3C.REC-xml-names-20091208]
Bray, T., Hollander, D., Layman, A., Tobin, R., and H. Bray, T., Hollander, D., Layman, A., Tobin, R., and H.
Thompson, "Namespaces in XML 1.0 (Third Edition)", World Thompson, "Namespaces in XML 1.0 (Third Edition)", World
Wide Web Consortium Recommendation REC-xml-names-20091208, Wide Web Consortium Recommendation REC-xml-names-20091208,
December 2009, December 2009,
<http://www.w3.org/TR/2009/REC-xml-names-20091208>. <http://www.w3.org/TR/2009/REC-xml-names-20091208>.
Appendix A. Using the Link Header with the HTML Format Appendix A. Link Serialisation in HTML
HTML motivated the original syntax of the Link header, and many of HTML [W3C.REC-html5-20141028] motivated the original syntax of the
the design decisions in this document are driven by a desire to stay Link header field, and many of the design decisions in this document
compatible with it. are driven by a desire to stay compatible with it.
In HTML, the link element can be mapped to links as specified here by In HTML, the link element can be mapped to links as specified here by
using the "href" attribute for the target URI, and "rel" to convey using the "href" attribute for the target URI, and "rel" to convey
the relation type, as in the Link header. The context of the link is the relation type, as in the Link header field. The context of the
the URI associated with the entire HTML document. link is the URI associated with the entire HTML document.
All of the link relation types defined by HTML have been included in All of the link relation types defined by HTML have been included in
the Link Relation Type registry, so they can be used without the Link Relation Type registry, so they can be used without
modification. However, there are several potential ways to serialise modification. However, there are several potential ways to serialise
extension relation types into HTML, including: extension relation types into HTML, including:
o As absolute URIs, o As absolute URIs,
o using the RDFa [W3C.REC-html-rdfa-20150317] convention of mapping o using the RDFa [W3C.REC-html-rdfa-20150317] convention of mapping
token prefixes to URIs (in a manner similar to XML name spaces). token prefixes to URIs (in a manner similar to XML name spaces).
skipping to change at page 15, line 41 skipping to change at page 16, line 41
Consuming HTML implementations ought not consider such unregistered Consuming HTML implementations ought not consider such unregistered
short links to be errors, but rather relation types with a local short links to be errors, but rather relation types with a local
scope (i.e., their meaning is specific and perhaps private to that scope (i.e., their meaning is specific and perhaps private to that
document). document).
HTML also defines several attributes on links that can be see as HTML also defines several attributes on links that can be see as
target attributes, including "media", "hreflang", "type" and "sizes". target attributes, including "media", "hreflang", "type" and "sizes".
Finally, the HTML specification gives a special meaning when the Finally, the HTML specification gives a special meaning when the
"alternate" and "stylesheet" relation types coincide in the same "alternate" and "stylesheet" relation types coincide in the same
link. Such links ought to be serialised in the Link header using a link. Such links ought to be serialised in the Link header field
single list of relation-types (e.g., rel="alternate stylesheet") to using a single list of relation-types (e.g., rel="alternate
preserve this relationship. stylesheet") to preserve this relationship.
Appendix B. Using the Link Header with the Atom Format Appendix B. Link Serialisation in Atom
Atom conveys links in the atom:link element, with the "href" Atom [RFC4287] is a link serialisation that conveys links in the
attribute indicating the link target and the "rel" attribute atom:link element, with the "href" attribute indicating the link
containing the relation type. The context of the link is either a target and the "rel" attribute containing the relation type. The
feed locator or an entry ID, depending on where it appears; context of the link is either a feed locator or an entry ID,
generally, feed-level links are obvious candidates for transmission depending on where it appears; generally, feed-level links are
as a Link header. obvious candidates for transmission as a Link header field.
When serialising an atom:link into a Link header, it is necessary to When serialising an atom:link into a Link header field, it is
convert link targets (if used) to URIs. necessary to convert link targets (if used) to URIs.
Atom defines extension relation types in terms of IRIs. This Atom defines extension relation types in terms of IRIs. This
specification re-defines them as URIs, to simplify and reduce errors specification re-defines them as URIs, to simplify and reduce errors
in their comparison. in their comparison.
Atom allows registered link relation types to be serialised as Atom allows registered link relation types to be serialised as
absolute URIs. Such relation types SHOULD be converted to the absolute URIs using a prefix, "http://www.iana.org/assignments/
appropriate registered form (e.g., relation/". This prefix is specific to the Atom serialisation.
"http://www.iana.org/assignments/relation/self" to "self") so that
they are not mistaken for extension relation types.
Furthermore, Atom link relation types are always compared in a case- Furthermore, link relation types are always compared in a case-
sensitive fashion; therefore, registered link relation types SHOULD sensitive fashion; therefore, registered link relation types SHOULD
be converted to their registered form (usually, lowercase) when be converted to their registered form (usually, lowercase) when
serialised in an Atom document. serialised in an Atom document.
Note also that while the Link header allows multiple relations to be Note also that while the Link header field allows multiple relations
serialised in a single link, atom:link does not. In this case, a to be serialised in a single link, atom:link does not. In this case,
single link-value may map to several atom:link elements. a single link-value may map to several atom:link elements.
As with HTML, atom:link defines some attributes that are not As with HTML, atom:link defines some attributes that are not
explicitly mirrored in the Link header syntax, but they can also be explicitly mirrored in the Link header field syntax, but they can
used as link-extensions to maintain fidelity. also be used as link-extensions to maintain fidelity.
Appendix C. Changes from RFC5988 Appendix C. Changes from RFC5988
This specification has the following differences from its This specification has the following differences from its
predecessor, RFC5988: predecessor, RFC5988:
o The initial relation type registrations were removed, since o The initial relation type registrations were removed, since
they've already been registered by 5988. they've already been registered by 5988.
o The introduction has been shortened. o The introduction has been shortened.
skipping to change at page 17, line 5 skipping to change at page 17, line 50
o Incorporated errata. o Incorporated errata.
o Updated references. o Updated references.
o Link cardinality was clarified. o Link cardinality was clarified.
o Terminology was changed from "target IRI" and "context IRI" to o Terminology was changed from "target IRI" and "context IRI" to
"link target" and "link context" respectively. "link target" and "link context" respectively.
o A convention for assigning a URI to registered relation types was o Made assigning a URI to registered relation types application-
defined. specific.
o Removed misleading statement that the link header field is o Removed misleading statement that the link header field is
semantically equivalent to HTML and Atom links. semantically equivalent to HTML and Atom links.
o More carefully defined how the Experts and IANA should interact. o More carefully defined how the Experts and IANA should interact.
o More carefully defined and used "link serialisations" and "link
applications."
o Clarified the cardinality of target attributes (generically and
for "type").
o Corrected the default link context for the Link header field, to
be dependent upon the identity of the representation (as per
RFC7231).
Author's Address Author's Address
Mark Nottingham Mark Nottingham
EMail: mnot@mnot.net EMail: mnot@mnot.net
URI: http://www.mnot.net/ URI: http://www.mnot.net/
 End of changes. 53 change blocks. 
113 lines changed or deleted 143 lines changed or added

This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/