rfc8288.txt   rfc8288.txt 
skipping to change at page 2, line 19 skipping to change at page 3, line 7
modifications of such material outside the IETF Standards Process. modifications of such material outside the IETF Standards Process.
Without obtaining an adequate license from the person(s) controlling Without obtaining an adequate license from the person(s) controlling
the copyright in such materials, this document may not be modified the copyright in such materials, this document may not be modified
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 . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1. Notational Conventions . . . . . . . . . . . . . . . . . 3 1.1. Notational Conventions . . . . . . . . . . . . . . . . . 4
1.2. Conformance and Error Handling . . . . . . . . . . . . . 3 1.2. Conformance and Error Handling . . . . . . . . . . . . . 4
2. Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.1. Link Relation Types . . . . . . . . . . . . . . . . . . . 5 2.1. Link Relation Types . . . . . . . . . . . . . . . . . . . 6
2.1.1. Registered Relation Types . . . . . . . . . . . . . . 5 2.1.1. Registered Relation Types . . . . . . . . . . . . . . 6
2.1.2. Extension Relation Types . . . . . . . . . . . . . . 7 2.1.2. Extension Relation Types . . . . . . . . . . . . . . 8
2.2. Target Attributes . . . . . . . . . . . . . . . . . . . . 7 2.2. Target Attributes . . . . . . . . . . . . . . . . . . . . 9
3. Link Serialisation in HTTP Headers . . . . . . . . . . . . . 8 3. Link Serialisation in HTTP Headers . . . . . . . . . . . . . 9
3.1. Link Target . . . . . . . . . . . . . . . . . . . . . . . 9 3.1. Link Target . . . . . . . . . . . . . . . . . . . . . . . 10
3.2. Link Context . . . . . . . . . . . . . . . . . . . . . . 9 3.2. Link Context . . . . . . . . . . . . . . . . . . . . . . 10
3.3. Relation Type . . . . . . . . . . . . . . . . . . . . . . 9 3.3. Relation Type . . . . . . . . . . . . . . . . . . . . . . 11
3.4. Target Attributes . . . . . . . . . . . . . . . . . . . . 10 3.4. Target Attributes . . . . . . . . . . . . . . . . . . . . 11
3.4.1. Serialisation-Defined Attributes . . . . . . . . . . 10 3.4.1. Serialisation-Defined Attributes . . . . . . . . . . 11
3.4.2. Extension Attributes . . . . . . . . . . . . . . . . 12 3.4.2. Extension Attributes . . . . . . . . . . . . . . . . 13
3.5. Link Header Field Examples . . . . . . . . . . . . . . . 12 3.5. Link Header Field Examples . . . . . . . . . . . . . . . 13
4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 13 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 14
4.1. Link HTTP Header Field Registration . . . . . . . . . . . 13 4.1. Link HTTP Header Field Registration . . . . . . . . . . . 14
4.2. Link Relation Type Registry . . . . . . . . . . . . . . . 13 4.2. Link Relation Type Registry . . . . . . . . . . . . . . . 14
4.3. Link Relation Application Data Registry . . . . . . . . . 14 4.3. Link Relation Application Data Registry . . . . . . . . . 15
5. Security Considerations . . . . . . . . . . . . . . . . . . . 14 5. Security Considerations . . . . . . . . . . . . . . . . . . . 15
6. Internationalisation Considerations . . . . . . . . . . . . . 14 6. Internationalisation Considerations . . . . . . . . . . . . . 16
7. References . . . . . . . . . . . . . . . . . . . . . . . . . 15 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 16
7.1. Normative References . . . . . . . . . . . . . . . . . . 15 7.1. Normative References . . . . . . . . . . . . . . . . . . 16
7.2. Informative References . . . . . . . . . . . . . . . . . 16 7.2. Informative References . . . . . . . . . . . . . . . . . 17
Appendix A. Notes on Other Link Serialisations . . . . . . . . . 17 Appendix A. Notes on Other Link Serialisations . . . . . . . . . 19
A.1. Link Serialisation in HTML . . . . . . . . . . . . . . . 17 A.1. Link Serialisation in HTML . . . . . . . . . . . . . . . 19
A.2. Link Serialisation in Atom . . . . . . . . . . . . . . . 17 A.2. Link Serialisation in Atom . . . . . . . . . . . . . . . 19
Appendix B. Algorithms for Parsing Link Header Fields . . . . . 18 Appendix B. Algorithms for Parsing Link Header Fields . . . . . 20
B.1. Parsing a Header Set for Links . . . . . . . . . . . . . 18 B.1. Parsing a Header Set for Links . . . . . . . . . . . . . 20
B.2. Parsing a Link Field Value . . . . . . . . . . . . . . . 19 B.2. Parsing a Link Field Value . . . . . . . . . . . . . . . 21
B.3. Parsing Parameters . . . . . . . . . . . . . . . . . . . 20 B.3. Parsing Parameters . . . . . . . . . . . . . . . . . . . 22
B.4. Parsing a Quoted String . . . . . . . . . . . . . . . . . 21 B.4. Parsing a Quoted String . . . . . . . . . . . . . . . . . 23
Appendix C. Changes from RFC 5988 . . . . . . . . . . . . . . . 22 Appendix C. Changes from RFC 5988 . . . . . . . . . . . . . . . 24
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 22 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 24
1. Introduction 1. Introduction
This specification defines a model for the relationships between This specification defines a model for the relationships between
resources on the Web ("links") and the type of those relationships resources on the Web ("links") and the type of those relationships
("link relation types"). ("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; Section 2 generalises this into a defined concepts of linking; Section 2 generalises this into a
framework that encompasses linking in these formats and (potentially) framework that encompasses linking in these formats and (potentially)
skipping to change at page 16, line 30 skipping to change at page 17, line 35
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>. May 2017, <https://www.rfc-editor.org/info/rfc8174>.
[RFC8187] Reschke, J., "Indicating Character Encoding and Language [RFC8187] Reschke, J., "Indicating Character Encoding and Language
for HTTP Header Field Parameters", RFC 8187, for HTTP Header Field Parameters", RFC 8187,
DOI 10.17487/RFC8187, September 2017, DOI 10.17487/RFC8187, September 2017,
<https://www.rfc-editor.org/info/rfc8187>. <https://www.rfc-editor.org/info/rfc8187>.
[W3C.REC-css3-mediaqueries-20120619] [W3C.REC-css3-mediaqueries-20120619]
Rivoal, F., "Media Queries", W3C Recommendation REC-css3- Rivoal, F., "Media Queries", W3C Recommendation
mediaqueries-20120619, June 2012, REC-css3-mediaqueries-20120619, June 2012,
<http://www.w3.org/TR/2012/ <http://www.w3.org/TR/2012/
REC-css3-mediaqueries-20120619>. REC-css3-mediaqueries-20120619>.
7.2. Informative References 7.2. Informative References
[RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail [RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail
Extensions (MIME) Part Two: Media Types", RFC 2046, Extensions (MIME) Part Two: Media Types", RFC 2046,
DOI 10.17487/RFC2046, November 1996, DOI 10.17487/RFC2046, November 1996,
<https://www.rfc-editor.org/info/rfc2046>. <https://www.rfc-editor.org/info/rfc2046>.
skipping to change at page 19, line 7 skipping to change at page 20, line 48
B.1. Parsing a Header Set for Links B.1. Parsing a Header Set for Links
This algorithm can be used to parse the Link header fields that a This algorithm can be used to parse the Link header fields that a
HTTP header set contains. Given a header_set of (string field_name, HTTP header set contains. Given a header_set of (string field_name,
string field_value) pairs, assuming ASCII encoding, it returns a list string field_value) pairs, assuming ASCII encoding, it returns a list
of link objects. of link objects.
1. Let field_values be a list containing the members of header_set 1. Let field_values be a list containing the members of header_set
whose field_name is a case-insensitive match for "link". whose field_name is a case-insensitive match for "link".
2. Let links be an empty list. 2. Let links be an empty list.
3. For each field_value in field_values:
3. For each field_value in field_values:
1. Let value_links be the result of Parsing a Link Field Value 1. Let value_links be the result of Parsing a Link Field Value
(Appendix B.2) from field_value. (Appendix B.2) from field_value.
2. Append each member of value_links to links. 2. Append each member of value_links to links.
4. Return links. 4. Return links.
B.2. Parsing a Link Field Value B.2. Parsing a Link Field Value
This algorithm parses zero or more comma-separated link-values from a This algorithm parses zero or more comma-separated link-values from a
Link header field. Given a string field_value, assuming ASCII Link header field. Given a string field_value, assuming ASCII
encoding, it returns a list of link objects. encoding, it returns a list of link objects.
1. Let links be an empty list. 1. Let links be an empty list.
2. While field_value has content:
2. While field_value has content:
1. Consume any leading OWS. 1. Consume any leading OWS.
2. If the first character is not "<", return links. 2. If the first character is not "<", return links.
3. Discard the first character ("<"). 3. Discard the first character ("<").
4. Consume up to but not including the first ">" character or 4. Consume up to but not including the first ">" character or
end of field_value and let the result be target_string. end of field_value and let the result be target_string.
5. If the next character is not ">", return links. 5. If the next character is not ">", return links.
6. Discard the leading ">" character. 6. Discard the leading ">" character.
7. Let link_parameters be the result of Parsing Parameters 7. Let link_parameters be the result of Parsing Parameters
(Appendix B.3) from field_value (consuming zero or more (Appendix B.3) from field_value (consuming zero or more
characters of it). characters of it).
skipping to change at page 20, line 49 skipping to change at page 22, line 47
3. Return links. 3. Return links.
B.3. Parsing Parameters B.3. Parsing Parameters
This algorithm parses the parameters from a header field value. This algorithm parses the parameters from a header field value.
Given input, an ASCII string, it returns a list of (string Given input, an ASCII string, it returns a list of (string
parameter_name, string parameter_value) tuples that it contains. parameter_name, string parameter_value) tuples that it contains.
input is modified to remove the parsed parameters. input is modified to remove the parsed parameters.
1. Let parameters be an empty list. 1. Let parameters be an empty list.
2. While input has content:
2. While input has content:
1. Consume any leading OWS. 1. Consume any leading OWS.
2. If the first character is not ";", return parameters. 2. If the first character is not ";", return parameters.
3. Discard the leading ";" character. 3. Discard the leading ";" character.
4. Consume any leading OWS. 4. Consume any leading OWS.
5. Consume up to but not including the first BWS, "=", ";", or 5. Consume up to but not including the first BWS, "=", ";", or
"," character, or up to the end of input, and let the result "," character, or up to the end of input, and let the result
be parameter_name. be parameter_name.
6. Consume any leading BWS. 6. Consume any leading BWS.
7. If the next character is "=": 7. If the next character is "=":
1. Discard the leading "=" character. 1. Discard the leading "=" character.
2. Consume any leading BWS. 2. Consume any leading BWS.
3. If the next character is DQUOTE, let parameter_value be 3. If the next character is DQUOTE, let parameter_value be
the result of Parsing a Quoted String (Appendix B.4) the result of Parsing a Quoted String (Appendix B.4)
from input (consuming zero or more characters of it). from input (consuming zero or more characters of it).
4. Else, consume the contents up to but not including the 4. Else, consume the contents up to but not including the
first ";" or "," character, or up to the end of input, first ";" or "," character, or up to the end of input,
and let the results be parameter_value. and let the results be parameter_value.
5. If the last character of parameter_name is an asterisk 5. If the last character of parameter_name is an asterisk
("*"), decode parameter_value according to [RFC8187]. ("*"), decode parameter_value according to [RFC8187].
skipping to change at page 21, line 41 skipping to change at page 23, line 37
12. If the next character is "," or the end of input, stop 12. If the next character is "," or the end of input, stop
processing input and return parameters. processing input and return parameters.
B.4. Parsing a Quoted String B.4. Parsing a Quoted String
This algorithm parses a quoted string, as per [RFC7230], This algorithm parses a quoted string, as per [RFC7230],
Section 3.2.6. Given input, an ASCII string, it returns an unquoted Section 3.2.6. Given input, an ASCII string, it returns an unquoted
string. input is modified to remove the parsed string. string. input is modified to remove the parsed string.
1. Let output be an empty string. 1. Let output be an empty string.
2. If the first character of input is not DQUOTE, return output. 2. If the first character of input is not DQUOTE, return output.
3. Discard the first character. 3. Discard the first character.
4. While input has content:
4. While input has content:
1. If the first character is a backslash ("\"): 1. If the first character is a backslash ("\"):
1. Discard the first character. 1. Discard the first character.
2. If there is no more input, return output. 2. If there is no more input, return output.
3. Else, consume the first character and append it to 3. Else, consume the first character and append it to
output. output.
2. Else, if the first character is DQUOTE, discard it and return 2. Else, if the first character is DQUOTE, discard it and return
output. output.
3. Else, consume the first character and append it to output. 3. Else, consume the first character and append it to output.
5. Return output. 5. Return output.
Appendix C. Changes from RFC 5988 Appendix C. Changes from RFC 5988
This specification has the following differences from its This specification has the following differences from its
predecessor, RFC 5988: predecessor, RFC 5988:
o The initial relation type registrations were removed, since o The initial relation type registrations were removed, since
they've already been registered by RFC 5988. they've already been registered by RFC 5988.
o The introduction has been shortened. o The introduction has been shortened.
 End of changes. 20 change blocks. 
45 lines changed or deleted 47 lines changed or added

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