idnits 2.17.1 draft-nottingham-http-link-header-10.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- == There are 1 instance of lines with non-RFC2606-compliant FQDNs in the document. -- The draft header indicates that this document updates RFC4287, but the abstract doesn't seem to mention this, which it should. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year (Using the creation date from RFC4287, updated by this document, for RFC5378 checks: 2004-07-09) -- The document seems to contain a disclaimer for pre-RFC5378 work, and may have content which was first submitted before 10 November 2008. The disclaimer is necessary when there are original authors that you have been unable to contact, or if some do not wish to grant the BCP78 rights to the IETF Trust. If you are able to get all authors (current and original) to grant those rights, you can and should remove the disclaimer; otherwise, the disclaimer is needed and you can ignore this comment. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (May 5, 2010) is 5077 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: 'TM' is mentioned on line 913, but not defined ** Downref: Normative reference to an Historic draft: draft-reschke-rfc2231-in-http (ref. 'I-D.reschke-rfc2231-in-http') ** Obsolete normative reference: RFC 2616 (Obsoleted by RFC 7230, RFC 7231, RFC 7232, RFC 7233, RFC 7234, RFC 7235) ** Obsolete normative reference: RFC 4288 (Obsoleted by RFC 6838) ** Obsolete normative reference: RFC 5226 (Obsoleted by RFC 8126) -- Obsolete informational reference (is this intentional?): RFC 2068 (Obsoleted by RFC 2616) -- Obsolete informational reference (is this intentional?): RFC 2818 (Obsoleted by RFC 9110) Summary: 4 errors (**), 0 flaws (~~), 3 warnings (==), 5 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group M. Nottingham 3 Internet-Draft May 5, 2010 4 Updates: 4287 (if approved) 5 Intended status: Standards Track 6 Expires: November 6, 2010 8 Web Linking 9 draft-nottingham-http-link-header-10 11 Abstract 13 This document specifies relation types for Web links, and defines a 14 registry for them. It also defines the use of such links in HTTP 15 headers with the Link header-field. 17 Status of this Memo 19 This Internet-Draft is submitted in full conformance with the 20 provisions of BCP 78 and BCP 79. 22 Internet-Drafts are working documents of the Internet Engineering 23 Task Force (IETF). Note that other groups may also distribute 24 working documents as Internet-Drafts. The list of current Internet- 25 Drafts is at http://datatracker.ietf.org/drafts/current/. 27 Internet-Drafts are draft documents valid for a maximum of six months 28 and may be updated, replaced, or obsoleted by other documents at any 29 time. It is inappropriate to use Internet-Drafts as reference 30 material or to cite them other than as "work in progress." 32 This Internet-Draft will expire on November 6, 2010. 34 Copyright Notice 36 Copyright (c) 2010 IETF Trust and the persons identified as the 37 document authors. All rights reserved. 39 This document is subject to BCP 78 and the IETF Trust's Legal 40 Provisions Relating to IETF Documents 41 (http://trustee.ietf.org/license-info) in effect on the date of 42 publication of this document. Please review these documents 43 carefully, as they describe your rights and restrictions with respect 44 to this document. Code Components extracted from this document must 45 include Simplified BSD License text as described in Section 4.e of 46 the Trust Legal Provisions and are provided without warranty as 47 described in the Simplified BSD License. 49 This document may contain material from IETF Documents or IETF 50 Contributions published or made publicly available before November 51 10, 2008. The person(s) controlling the copyright in some of this 52 material may not have granted the IETF Trust the right to allow 53 modifications of such material outside the IETF Standards Process. 54 Without obtaining an adequate license from the person(s) controlling 55 the copyright in such materials, this document may not be modified 56 outside the IETF Standards Process, and derivative works of it may 57 not be created outside the IETF Standards Process, except to format 58 it for publication as an RFC or to translate it into languages other 59 than English. 61 Table of Contents 63 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 64 2. Notational Conventions . . . . . . . . . . . . . . . . . . . . 3 65 3. Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 66 4. Link Relation Types . . . . . . . . . . . . . . . . . . . . . 4 67 4.1. Registered Relation Types . . . . . . . . . . . . . . . . 5 68 4.2. Extension Relation Types . . . . . . . . . . . . . . . . . 6 69 5. The Link Header Field . . . . . . . . . . . . . . . . . . . . 6 70 5.1. Target IRI . . . . . . . . . . . . . . . . . . . . . . . . 7 71 5.2. Context IRI . . . . . . . . . . . . . . . . . . . . . . . 7 72 5.3. Relation Type . . . . . . . . . . . . . . . . . . . . . . 8 73 5.4. Target Attributes . . . . . . . . . . . . . . . . . . . . 8 74 5.5. Examples . . . . . . . . . . . . . . . . . . . . . . . . . 9 75 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10 76 6.1. Link HTTP Header Registration . . . . . . . . . . . . . . 10 77 6.2. Link Relation Type Registry . . . . . . . . . . . . . . . 10 78 6.3. Link Relation Application Data Registry . . . . . . . . . 16 79 7. Security Considerations . . . . . . . . . . . . . . . . . . . 17 80 8. Internationalisation Considerations . . . . . . . . . . . . . 18 81 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 18 82 9.1. Normative References . . . . . . . . . . . . . . . . . . . 18 83 9.2. Informative References . . . . . . . . . . . . . . . . . . 19 84 Appendix A. Link Relation Registry Format . . . . . . . . . . . . 20 85 A.1. Relax NG Grammar . . . . . . . . . . . . . . . . . . . . . 21 86 A.2. Example . . . . . . . . . . . . . . . . . . . . . . . . . 22 87 Appendix B. Notes on Using the Link Header with the HTML4 88 Format . . . . . . . . . . . . . . . . . . . . . . . 22 89 Appendix C. Notes on Using the Link Header with the Atom 90 Format . . . . . . . . . . . . . . . . . . . . . . . 23 91 Appendix D. Acknowledgements . . . . . . . . . . . . . . . . . . 24 92 Appendix E. Document history . . . . . . . . . . . . . . . . . . 24 93 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 28 95 1. Introduction 97 A means of indicating the relationships between resources on the Web, 98 as well as indicating the type of those relationships, has been 99 available for some time in HTML [W3C.REC-html401-19991224], and more 100 recently in Atom [RFC4287]. These mechanisms, although conceptually 101 similar, are separately specified. However, links between resources 102 need not be format-specific; it can be useful to have typed links 103 that are independent of their serialisation, especially when a 104 resource has representations in multiple formats. 106 To this end, this document defines a framework for typed links that 107 isn't specific to a particular serialisation or application. It does 108 so by re-defining the link relation registry established by Atom to 109 have a broader domain, and adding to it the relations that are 110 defined by HTML. 112 Furthermore, an HTTP header-field for conveying typed links was 113 defined in Section 19.6.2.4 of [RFC2068], but removed from [RFC2616], 114 due to a lack of implementation experience. Since then, it has been 115 implemented in some User-Agents (e.g., for stylesheets), and several 116 additional use cases have surfaced. 118 Because it was removed, the status of the Link header is unclear, 119 leading some to consider minting new application-specific HTTP 120 headers instead of reusing it. This document addresses this by re- 121 specifying the Link header as one such serialisation, with updated 122 but backwards-compatible syntax. 124 2. Notational Conventions 126 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 127 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 128 document are to be interpreted as described in BCP 14, [RFC2119], as 129 scoped to those conformance targets. 131 This document uses the Augmented Backus-Naur Form (ABNF) notation of 132 [RFC2616], and explicitly includes the following rules from it: 133 quoted-string, token, SP (space), LOALPHA, DIGIT. 135 Additionally, the following rules are included from [RFC3986]: URI 136 and URI-Reference; from [RFC4288]: type-name and subtype-name; from 137 [W3C.REC-html401-19991224]: MediaDesc; from [RFC5646]: Language-Tag; 138 and from [I-D.reschke-rfc2231-in-http], ext-value and parmname. 140 3. Links 142 In this specification, a link is a typed connection between two 143 resources that are identified by IRIs [RFC3987], and is comprised of: 144 o A context IRI, and 145 o a link relation type (Section 4), and 146 o a target IRI, and 147 o optionally, target attributes. 149 A link can be viewed as a statement of the form "{context IRI} has a 150 {relation type} resource at {target IRI}, which has {target 151 attributes}." 153 Note that in the common case, the context IRI will also be a URI 154 [RFC3986], because many protocols (such as HTTP) do not support 155 dereferencing IRIs. Likewise, the target IRI will be converted to a 156 URI (see [RFC3987], Section 3.1) in serialisations that do not 157 support IRIs (e.g., the Link header). 159 This specification does not place restrictions on the cardinality of 160 links; there can be multiple links from and to a particular IRI, and 161 multiple links of different types between two given IRIs. Likewise, 162 the relative ordering of links in any particular serialisation, or 163 between serialisations (e.g., the Link header and in-content links) 164 is not specified or significant in this specification; applications 165 that wish to consider ordering significant can do so. 167 Target attributes are a set of key/value pairs that describe the link 168 or its target; for example, a media type hint. This specification 169 does not attempt to coordinate their names or use, but does provide 170 common target attributes for use in the Link HTTP header. 172 Finally, this specification does not define a general syntax for 173 expressing links, nor mandate a specific context for any given link; 174 it is expected that serialisations of links will specify both 175 aspects. One such serialisation is communication of links through 176 HTTP headers, specified in Section 5. 178 4. Link Relation Types 180 In the simplest case, a link relation type identifies the semantics 181 of a link. For example, a link with the relation type "copyright" 182 indicates that the resource identified by the target IRI is a 183 statement of the copyright terms applying to the current context IRI. 185 Link relation types can also be used to indicate that the target 186 resource has particular attributes, or exhibits particular 187 behaviours; for example, a "service" link implies that the identified 188 resource is part of a defined protocol (in this case, a service 189 description). 191 Relation types are not to be confused with media types [RFC4288]; 192 they do not identify the format of the representation that results 193 when the link is dereferenced. Rather, they only describe how the 194 current context is related to another resource. 196 Relation types SHOULD NOT infer any additional semantics based upon 197 the presence or absence of another link relation type, or its own 198 cardinality of occurrence. An exception to this is the combination 199 of the "alternate" and "stylesheet" registered relation types, which 200 has special meaning in HTML4 for historical reasons. 202 There are two kinds of relation types: registered and extension. 204 4.1. Registered Relation Types 206 Well-defined relation types can be registered as tokens for 207 convenience and/or to promote reuse by other applications. This 208 specification establishes an IANA registry of such relation types; 209 see Section 6.2. 211 Registered relation type names MUST conform to the reg-rel-type rule, 212 and MUST be compared character-by-character in a case-insensitive 213 fashion. They SHOULD be appropriate to the specificity of the 214 relation type; i.e., if the semantics are highly specific to a 215 particular application, the name should reflect that, so that more 216 general names are available for less specific use. 218 Registered relation types MUST NOT constrain the media type of the 219 context IRI, and MUST NOT constrain the available representation 220 media types of the target IRI. However, they can specify the 221 behaviours and properties of the target resource (e.g., allowable 222 HTTP methods, request and response media types which must be 223 supported). 225 Additionally, specific applications of linking may require additional 226 data to be included in the registry. For example, Web browsers might 227 want to know what kinds of links should be downloaded when they 228 archive a Web page; if this application-specific information is in 229 the registry, new link relation types can control this behaviour 230 without unnecessary coordination. 232 To accommodate this, per-entry application data can be added to the 233 Link Relation Type Registry, by registering it in the Link Relation 234 Application Data Registry (Section 6.3). 236 4.2. Extension Relation Types 238 Applications that don't wish to register a relation type can use an 239 extension relation type, which is a URI [RFC3986] that uniquely 240 identifies the relation type. Although the URI can point to a 241 resource that contains a definition of the semantics of the relation 242 type, clients SHOULD NOT automatically access that resource to avoid 243 overburdening its server. 245 When extension relation types are compared, they MUST be compared as 246 strings (after converting to URIs if serialised in a different 247 format, such as a Curie [W3C.CR-curie-20090116]) in a case- 248 insensitive fashion, character-by-character. Because of this, all- 249 lowercase URIs SHOULD be used for extension relations. 251 Note that while extension relation types are required to be URIs, a 252 serialisation of links can specify that they are expressed in another 253 form, as long as they can be converted to URIs. 255 5. The Link Header Field 257 The Link entity-header field provides a means for serialising one or 258 more links in HTTP headers. It is semantically equivalent to the 259 element in HTML, as well as the atom:link feed-level element 260 in Atom [RFC4287]. 262 Link = "Link" ":" #link-value 263 link-value = "<" URI-Reference ">" *( ";" link-param ) 264 link-param = ( ( "rel" "=" relation-types ) 265 | ( "anchor" "=" <"> URI-Reference <"> ) 266 | ( "rev" "=" relation-types ) 267 | ( "hreflang" "=" Language-Tag ) 268 | ( "media" "=" ( MediaDesc | ( <"> MediaDesc <"> ) ) ) 269 | ( "title" "=" quoted-string ) 270 | ( "title*" "=" ext-value ) 271 | ( "type" "=" ( media-type | quoted-mt ) ) 272 | ( link-extension ) ) 273 link-extension = ( parmname [ "=" ( ptoken | quoted-string ) ] ) 274 | ( ext-name-star "=" ext-value ) 275 ext-name-star = parmname "*" ; reserved for RFC2231-profiled 276 ; extensions. Whitespace NOT 277 ; allowed in between. 278 ptoken = 1*ptokenchar 279 ptokenchar = "!" | "#" | "$" | "%" | "&" | "'" | "(" 280 | ")" | "*" | "+" | "-" | "." | "/" | DIGIT 281 | ":" | "<" | "=" | ">" | "?" | "@" | ALPHA 282 | "[" | "]" | "^" | "_" | "`" | "{" | "|" 283 | "}" | "~" 284 media-type = type-name "/" subtype-name 285 quoted-mt = <"> media-type <"> 286 relation-types = relation-type 287 | <"> relation-type *( 1*SP relation-type ) <"> 288 relation-type = reg-rel-type | ext-rel-type 289 reg-rel-type = LOALPHA *( LOALPHA | DIGIT | "." | "-" ) 290 ext-rel-type = URI 292 5.1. Target IRI 294 Each link-value conveys one target IRI as a URI-Reference (after 295 conversion to one, if necessary; see [RFC3987], Section 3.1) inside 296 angle brackets ("<>"). If the URI-Reference is relative, parsers 297 MUST resolve it as per [RFC3986], Section 5. Note that any base IRI 298 from the message's content is not applied. 300 5.2. Context IRI 302 By default, the context of a link conveyed in the Link header field 303 is the IRI of the requested resource. 305 When present, the anchor parameter overrides this with another URI, 306 such as a fragment of this resource, or a third resource (i.e., when 307 the anchor value is an absolute URI). If the anchor parameter's 308 value is a relative URI, parsers MUST resolve it as per [RFC3986], 309 Section 5. Note that any base URI from the body's content is not 310 applied. 312 Consuming implementations can choose to ignore links with an anchor 313 parameter. For example, the application in use may not allow the 314 context IRI to be assigned to a different resource. In such cases, 315 the entire link is to be ignored; consuming implementations MUST NOT 316 process the link without applying the anchor. 318 Note that depending on HTTP status code and response headers, the 319 context IRI might be "anonymous" (i.e., no context IRI is available). 320 For instance, this is the case on a 404 response to a GET request. 322 5.3. Relation Type 324 The relation type of a link is conveyed in the "rel" parameter's 325 value. The "rel" parameter MUST NOT appear more than once in a given 326 link-value; occurrences after the first MUST be ignored by parsers. 328 The "rev" parameter has been used in the past to indicate that the 329 semantics of the relationship are in the reverse direction. I.e., a 330 link from A to B with REL="X" expresses the same relationship as a 331 link from B to A with REV="X". "rev" is deprecated by this 332 specification because it often confuses authors and readers; in most 333 cases using a separate relation type is preferable. 335 Note that extension relation types are REQUIRED to be absolute URIs 336 in Link headers, and MUST be quoted if they contain a semicolon (";") 337 or comma (",") (as these characters are used as delimiters in the 338 header itself). 340 5.4. Target Attributes 342 The "hreflang", "media", "title", "title*", "type" and any link- 343 extension link-params are considered to be target attributes for the 344 link. 346 The "hreflang" parameter, when present, is a hint indicating what the 347 language of the result of dereferencing the link should be. Note 348 that this is only a hint; for example, it does not override the 349 Content-Language header of a HTTP response obtained by actually 350 following the link. Multiple hreflang parameters on a single link- 351 value indicate that multiple languages are available from the 352 indicated resource. 354 The "media" parameter, when present, is used to indicate intended 355 destination medium or media for style information (see 356 [W3C.REC-html401-19991224], Section 6.13). Note that this may be 357 updated by [W3C.CR-css3-mediaqueries-20090915]). Its value MUST be 358 quoted if it contains a semicolon (";") or comma (","), and there 359 MUST NOT be more than one media parameter in a link-value. 361 The "title" parameter, when present, is used to label the destination 362 of a link such that it can be used as a human-readable identifier 363 (e.g. a menu entry) in the language indicated by the Content-Language 364 header (if present). The "title" parameter MUST NOT appear more than 365 once in a given link-value; occurrences after the first MUST be 366 ignored by parsers. 368 The "title*" parameter can be used to encode this label in a 369 different character set, and/or contain language information as per 370 [I-D.reschke-rfc2231-in-http]. The "title*" parameter MUST NOT 371 appear more than once in a given link-value; occurrences after the 372 first MUST be ignored by parsers. If the parameter does not contain 373 language information, its language is indicated by the Content- 374 Language header (when present). 376 If both the "title" and "title*" parameters appear in a link-value, 377 processors SHOULD use the "title*" parameter's value. 379 The "type" parameter, when present, is a hint indicating what the 380 media type of the result of dereferencing the link should be. Note 381 that this is only a hint; for example, it does not override the 382 Content-Type header of a HTTP response obtained by actually following 383 the link. There MUST NOT be more than one type parameter in a link- 384 value. 386 5.5. Examples 388 For example: 390 Link: ; rel="previous"; 391 title="previous chapter" 393 indicates that "chapter2" is previous to this resource in a logical 394 navigation path. 396 Similarly, 398 Link: ; rel="http://example.net/foo" 400 indicates that the root resource ("/") is related to this resource 401 with the extension relation type "http://example.net/foo". 403 The example below shows an instance of the Link header encoding 404 multiple links, and also the use of RFC 2231 encoding to encode both 405 non-ASCII characters and language information. 407 Link: ; 408 rel="previous"; title*=UTF-8'de'letztes%20Kapitel, 409 ; 410 rel="next"; title*=UTF-8'de'n%c3%a4chstes%20Kapitel 412 Here, both links have titles encoded in UTF-8, use the German 413 language ("de"), and the second link contains the Unicode code point 414 U+00E4 ("LATIN SMALL LETTER A WITH DIAERESIS"). 416 Note that link-values can convey multiple links between the same 417 target and context IRIs; for example: 419 Link: ; 420 rel="start http://example.net/relation/other" 422 Here, the link to "http://example.org/" has the registered relation 423 type "start" and the extension relation type 424 "http://example.net/relation/other". 426 6. IANA Considerations 428 6.1. Link HTTP Header Registration 430 This specification updates the Message Header Registry entry for 431 "Link" in HTTP [RFC3864] to refer to this document. 433 Header field: Link 434 Applicable protocol: http 435 Status: standard 436 Author/change controller: 437 IETF (iesg@ietf.org) 438 Internet Engineering Task Force 439 Specification document(s): 440 [ this document ] 442 6.2. Link Relation Type Registry 444 This specification establishes the Link Relation Type Registry, and 445 updates Atom [RFC4287] to refer to it in place of the "Registry of 446 Link Relations". 448 [[ Note to IESG: Entries in the Atom registry that are not listed 449 below at the time that IANA implements this change (i.e., those that 450 are registered before this document comes into effect) should be 451 referred to the Designated Expert. ]] 453 6.2.1. Registering new Link Relation Types 455 Relation types are registered on the advice of a Designated Expert 456 (appointed by the IESG or their delegate), with a Specification 457 Required (using terminology from [RFC5226]). 459 The requirements for registered relation types are described in 460 Section 4.1. 462 Registration requests consist of the completed registration template 463 below, typically published in an RFC or Open Standard (in the sense 464 described by [RFC2026], Section 7). However, to allow for the 465 allocation of values prior to publication, the Designated Expert may 466 approve registration once they are satisfied that a specification 467 will be published. 469 Note that relation types can be registered by third parties, if the 470 Designated Expert determines that an unregistered relation type is 471 widely deployed and not likely to be registered in a timely manner. 473 The registration template is: 475 o Relation Name: 476 o Description: 477 o Reference: 478 o Notes: [optional] 479 o Application Data: [optional] 481 Registration requests should be sent to the [TBD]@ietf.org mailing 482 list, marked clearly in the subject line (e.g,. "NEW RELATION 483 REQUEST"). 485 Within at most 14 days of the request, the Designated Expert(s) will 486 either approve or deny the registration request, communicating this 487 decision to the review list. Denials should include an explanation 488 and, if applicable, suggestions as to how to make the request 489 successful. 491 Decisions (or lack thereof) made by the Designated Expert can be 492 first appealed to Application Area Directors (contactable using 493 app-ads@tools.ietf.org email address or directly by looking up their 494 email addresses on http://www.iesg.org/ website) and, if the 495 appellant is not satisfied with the response, to the full IESG (using 496 the iesg@iesg.org mailing list). 498 When a registration request is successful, the Designated Expert(s) 499 will update the registry XML file (using the format described in 500 Appendix A including the MIT license) and send it to the [TBD-2]@ 501 ietf.org mailing list (which SHOULD NOT be centrally archived, so as 502 to avoid load issues from automated agents, and only accept posts 503 from the Designated Expert(s)), so that implementers interested in 504 receiving a machine-readable registry can do so. Simultaneously, 505 they will send a text (not XML) version of the registry to IANA for 506 publication. 508 IANA should only accept registry updates from the Designated 509 Expert(s), and should direct all requests for registration to the 510 review mailing list. 512 6.2.2. Initial Registry Contents 514 The Link Relation Type registry's initial contents are: 516 o Relation Name: alternate 517 o Description: Designates a substitute for the link's context. 518 o Reference: [W3C.REC-html401-19991224] 520 o Relation Name: appendix 521 o Description: Refers to an appendix. 522 o Reference: [W3C.REC-html401-19991224] 524 o Relation Name: bookmark 525 o Description: Refers to a bookmark or entry point. 526 o Reference: [W3C.REC-html401-19991224] 528 o Relation Name: chapter 529 o Description: Refers to a chapter in a collection of resources. 530 o Reference: [W3C.REC-html401-19991224] 532 o Relation Name: contents 533 o Description: Refers to a table of contents. 534 o Reference: [W3C.REC-html401-19991224] 536 o Relation Name: copyright 537 o Description: Refers to a copyright statement that applies to the 538 link's context. 539 o Reference: [W3C.REC-html401-19991224] 541 o Relation Name: current 542 o Description: Refers to a resource containing the most recent 543 item(s) in a collection of resources. 544 o Reference: [RFC5005] 546 o Relation Name: describedby 547 o Description: Refers to a resource providing information about the 548 link's context. 549 o Documentation: 551 o Relation Name: edit 552 o Description: Refers to a resource that can be used to edit the 553 link's context. 554 o Reference: [RFC5023] 556 o Relation Name: edit-media 557 o Description: Refers to a resource that can be used to edit media 558 associated with the link's context. 559 o Reference: [RFC5023] 561 o Relation Name: enclosure 562 o Description: Identifies a related resource that is potentially 563 large and might require special handling. 564 o Reference: [RFC4287] 566 o Relation Name: first 567 o Description: An IRI that refers to the furthest preceding resource 568 in a series of resources. 569 o Reference: [this document] 570 o Notes: this relation type registration did not indicate a 571 reference. Originally requested by Mark Nottingham in December 572 2004. 574 o Relation Name: glossary 575 o Description: Refers to a glossary of terms. 576 o Reference: [W3C.REC-html401-19991224] 578 o Relation Name: help 579 o Description: Refers to a resource offering help (more information, 580 links to other sources information, etc.) 581 o Reference: [W3C.REC-html401-19991224] 583 o Relation Name: hub 584 o Description: Refers to a hub that enables registration for 585 notification of updates to the context. 586 o Reference: 588 o Notes: this relation type was requested by Brett Slatkin. 590 o Relation Name: index 591 o Description: Refers to an index. 592 o Reference: [W3C.REC-html401-19991224] 593 o Relation Name: last 594 o Description: An IRI that refers to the furthest following resource 595 in a series of resources. 596 o Reference: [this document] 597 o Notes: this relation type registration did not indicate a 598 reference. Originally requested by Mark Nottingham in December 599 2004. 601 o Relation Name: latest-version 602 o Description: Points to a resource containing the latest (e.g., 603 current) version of the context. 604 o Reference: [RFC5829] 606 o Relation Name: license 607 o Description: Refers to a license associated with the link's 608 context. 609 o Reference: [RFC4946] 611 o Relation Name: next 612 o Description: Refers to the next resource in a ordered series of 613 resources. 614 o Reference: [W3C.REC-html401-19991224] 616 o Relation Name: next-archive 617 o Description: Refers to the immediately following archive resource. 618 o Reference: [RFC5005] 620 o Relation Name: payment 621 o Description: indicates a resource where payment is accepted. 622 o Reference: [this document] 623 o Notes: this relation type registration did not indicate a 624 reference. Requested by Joshua Kinberg and Robert Sayre. It is 625 meant as a general way to facilitate acts of payment, and thus 626 this specification makes no assumptions on the type of payment or 627 transaction protocol. Examples may include a web page where 628 donations are accepted or where goods and services are available 629 for purchase. rel="payment" is not intended to initiate an 630 automated transaction. In Atom documents, a link element with a 631 rel="payment" attribute may exist at the feed/channel level and/or 632 the entry/item level. For example, a rel="payment" link at the 633 feed/channel level may point to a "tip jar" URI, whereas an entry/ 634 item containing a book review may include a rel="payment" link 635 that points to the location where the book may be purchased 636 through an online retailer. 638 o Relation Name: prev 639 o Description: Refers to the previous resource in an ordered series 640 of resources. Synonym for "previous". 641 o Reference: [W3C.REC-html401-19991224] 643 o Relation Name: predecessor-version 644 o Description: Points to a resource containing the predecessor 645 version in the version history. 646 o Reference: [RFC5829] 648 o Relation Name: previous 649 o Description: Refers to the previous resource in an ordered series 650 of resources. Synonym for "prev". 651 o Reference: [W3C.REC-html401-19991224] 653 o Relation Name: prev-archive 654 o Description: Refers to the immediately preceding archive resource. 655 o Reference: [RFC5005] 657 o Relation Name: related 658 o Description: Identifies a related resource. 659 o Reference: [RFC4287] 661 o Relation Name: replies 662 o Description: Identifies a resource that is a reply to the context 663 of the link. 664 o Reference: [RFC4685] 666 o Relation Name: section 667 o Description: Refers to a section in a collection of resources. 668 o Reference: [W3C.REC-html401-19991224] 670 o Relation Name: self 671 o Description: Conveys an identifier for the link's context. 672 o Reference: [RFC4287] 674 o Relation Name: service 675 o Description: Indicates a URI that can be used to retrieve a 676 service document. 677 o Reference: [RFC5023] 678 o Notes: When used in an Atom document, this relation type specifies 679 Atom Publishing Protocol service documents by default. Requested 680 by James Snell. 682 o Relation Name: start 683 o Description: Refers to the first resource in a collection of 684 resources. 686 o Reference: [W3C.REC-html401-19991224] 688 o Relation Name: stylesheet 689 o Description: Refers to an external style sheet. 690 o Reference: [W3C.REC-html401-19991224] 692 o Relation Name: subsection 693 o Description: Refers to a resource serving as a subsection in a 694 collection of resources. 695 o Reference: [W3C.REC-html401-19991224] 697 o Relation Name: successor-version 698 o Description: Points to a resource containing the successor version 699 in the version history. 700 o Reference: [RFC5829] 702 o Relation Name: up 703 o Description: Refers to a parent document in a hierarchy of 704 documents. 705 o Reference: [this document] 706 o Notes: this relation type registration did not indicate a 707 reference. Requested by Noah Slater. 709 o Relation Name: version-history 710 o Description: points to a resource containing the version history 711 for the context. 712 o Reference: [RFC5829] 714 o Relation Name: via 715 o Description: Identifies a resource that is the source of the 716 information in the link's context. 717 o Reference: [RFC4287] 719 o Relation Name: working-copy 720 o Description: Points to a working copy for this resource. 721 o Reference: [RFC5829] 723 o Relation Name: working-copy-of 724 o Description: Points to the versioned resource from which this 725 working copy was obtained. 726 o Reference: [RFC5829] 728 6.3. Link Relation Application Data Registry 730 This specification also establishes the Link Relation Application 731 Field Registry, to allow entries in the Link Relation Type Registry 732 to be extended with application-specific data (hereafter, "app data") 733 specific to all instances of a given link relation type. 735 Application data is registered on the advice of a Designated Expert 736 (appointed by the IESG or their delegate), with a Specification 737 Required (using terminology from [RFC5226]). 739 Registration requests consist of the completed registration template 740 below; 742 o Application Name: 743 o Description: 744 o Default Value: 745 o Notes: [optional] 747 The Description SHOULD identify the value space of the app data. The 748 Default Value MUST be appropriate to entries which the app data does 749 not apply to. 751 Entries that pre-date the addition of app data will automatically be 752 considered to have the default value for that app data; if there are 753 exceptions, the modification of such entries should be coordinated by 754 the Designated Expert(s), in consultation with the author of the 755 proposed app data as well as the registrant of the existing entry (if 756 possible). 758 Registration requests should be sent to the [TBD]@ietf.org mailing 759 list, marked clearly in the subject line (e.g,. "NEW APP DATA"). 761 Within at most 14 days of the request, the Designated Expert will 762 either approve or deny the registration request, communicating this 763 decision to the review list. Denials should include an explanation 764 and, if applicable, suggestions as to how to make the request 765 successful. Registration requests that are undetermined for a period 766 longer than 21 days can be brought to the IESG's attention (using the 767 iesg@iesg.org mailing list) for resolution. 769 When a registration request is successful, the Designated Expert will 770 forward it to IANA for publication. IANA should only accept registry 771 updates from the Designated Expert(s), and should direct all requests 772 for registration to the review mailing list. 774 7. Security Considerations 776 The content of the Link header-field is not secure, private or 777 integrity-guaranteed, and due caution should be exercised when using 778 it. Use of TLS with HTTP ([RFC2818] and [RFC2817]) is currently the 779 only end-to-end way to provide such protection. 781 Applications that take advantage of typed links should consider the 782 attack vectors opened by automatically following, trusting, or 783 otherwise using links gathered from HTTP headers. In particular, 784 Link headers that use the "anchor" parameter to associate a link's 785 context with another resource should be treated with due caution. 787 The Link entity-header field makes extensive use of IRIs and URIs. 788 See [RFC3987] for security considerations relating to IRIs. See 789 [RFC3986] for security considerations relating to URIs. See 790 [RFC2616] for security considerations relating to HTTP headers. 792 8. Internationalisation Considerations 794 Target IRIs may need to be converted to URIs in order to express them 795 in serialisations that do not support IRIs. This includes the Link 796 HTTP header. 798 Similarly, the anchor parameter of the Link header does not support 799 IRIs, and therefore IRIs must be converted to URIs before inclusion 800 there. 802 Relation types are defined as URIs, not IRIs, to aid in their 803 comparison. It is not expected that they will be displayed to end 804 users. 806 9. References 808 9.1. Normative References 810 [I-D.reschke-rfc2231-in-http] 811 Reschke, J., "Character Set and Language Encoding for 812 Hypertext Transfer Protocol (HTTP) Header Field 813 Parameters", draft-reschke-rfc2231-in-http-12 (work in 814 progress), April 2010. 816 [RFC2026] Bradner, S., "The Internet Standards Process -- Revision 817 3", BCP 9, RFC 2026, October 1996. 819 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 820 Requirement Levels", BCP 14, RFC 2119, March 1997. 822 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 823 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 824 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 826 [RFC3864] Klyne, G., Nottingham, M., and J. Mogul, "Registration 827 Procedures for Message Header Fields", BCP 90, RFC 3864, 828 September 2004. 830 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 831 Resource Identifier (URI): Generic Syntax", STD 66, 832 RFC 3986, January 2005. 834 [RFC3987] Duerst, M. and M. Suignard, "Internationalized Resource 835 Identifiers (IRIs)", RFC 3987, January 2005. 837 [RFC4288] Freed, N. and J. Klensin, "Media Type Specifications and 838 Registration Procedures", BCP 13, RFC 4288, December 2005. 840 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 841 IANA Considerations Section in RFCs", BCP 26, RFC 5226, 842 May 2008. 844 [RFC5646] Phillips, A. and M. Davis, "Tags for Identifying 845 Languages", BCP 47, RFC 5646, September 2009. 847 9.2. Informative References 849 [RFC2068] Fielding, R., Gettys, J., Mogul, J., Nielsen, H., and T. 850 Berners-Lee, "Hypertext Transfer Protocol -- HTTP/1.1", 851 RFC 2068, January 1997. 853 [RFC2817] Khare, R. and S. Lawrence, "Upgrading to TLS Within 854 HTTP/1.1", RFC 2817, May 2000. 856 [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000. 858 [RFC4287] Nottingham, M., Ed. and R. Sayre, Ed., "The Atom 859 Syndication Format", RFC 4287, December 2005. 861 [RFC4685] Snell, J., "Atom Threading Extensions", RFC 4685, 862 September 2006. 864 [RFC4946] Snell, J., "Atom License Extension", RFC 4946, July 2007. 866 [RFC5005] Nottingham, M., "Feed Paging and Archiving", RFC 5005, 867 September 2007. 869 [RFC5023] Gregorio, J. and B. de hOra, "The Atom Publishing 870 Protocol", RFC 5023, October 2007. 872 [RFC5829] Brown, A., Clemm, G., and J. Reschke, "Link Relation Types 873 for Simple Version Navigation between Web Resources", 874 RFC 5829, April 2010. 876 [W3C.CR-css3-mediaqueries-20090915] 877 van Kesteren, A., Glazman, D., Lie, H., and T. Celik, 878 "Media Queries", W3C Candidate Recommendation CR-css3- 879 mediaqueries-20090915, September 2009, 880 . 883 Latest version available at 884 . 886 [W3C.CR-curie-20090116] 887 Birbeck, M. and S. McCarron, "CURIE Syntax 1.0", W3C 888 Candidate Recommendation CR-curie-20090116, January 2009, 889 . 891 Latest version available at . 893 [W3C.REC-html401-19991224] 894 Le Hors, A., Raggett, D., and I. Jacobs, "HTML 4.01 895 Specification", W3C Recommendation REC-html401-19991224, 896 December 1999, 897 . 899 Latest version available at 900 . 902 [W3C.REC-rdfa-syntax-20081014] 903 Adida, B., Birbeck, M., McCarron, S., and S. Pemberton, 904 "RDFa in XHTML: Syntax and Processing", W3C 905 Recommendation REC-rdfa-syntax-20081014, October 2008, 906 . 908 Latest version available at 909 . 911 [W3C.REC-xhtml-basic-20080729] 912 Baker, M., Ishikawa, M., Stark, P., Matsui, S., Wugofski, 913 T., and T. Yamakami, "XHTML[TM] Basic 1.1", W3C 914 Recommendation REC-xhtml-basic-20080729, July 2008, 915 . 917 Latest version available at 918 . 920 Appendix A. Link Relation Registry Format 922 To facilitate applications that wish to use registry data in an 923 automated fashion, this specification defines an XML-based format for 924 the registry entries. 926 Each registered relation type is represented by a RelationType 927 element, and if any of the app data values are other than the default 928 value identified in the Application Data Registry, they will be 929 represented by appdata elements. 931 Note that this format is NOT that which IANA publishes the registry 932 in, because doing so would subject IANA's servers to, potentially, 933 very high load (e.g., if Web browsers were to automatically update 934 their copies of the registry). Instead, this format is published to 935 the [TBD-2]@ietf.org mailing list, so that interested implementors 936 can subscribe and distribute the machine-readable document using 937 their own infrastructure. 939 A.1. Relax NG Grammar 941 element RelationTypes { 942 element RelationType { 943 attribute name { text }, 944 attribute reference { text }, 945 element description { text }, 946 element notes { text }?, 947 element appdata { 948 attribute name { text }, 949 text 950 }* 951 }+ 952 } 954 A.2. Example 956 957 980 982 This is an example relation type. 983 This is the value of Foo. 984 985 986 988 Appendix B. Notes on Using the Link Header with the HTML4 Format 990 HTML motivated the original syntax of the Link header, and many of 991 the design decisions in this document are driven by a desire to stay 992 compatible with these uses. 994 In HTML4, the link element can be mapped to links as specified here 995 by using the "href" attribute for the target URI, and "rel" to convey 996 the relation type, as in the Link header. The context of the link is 997 the URI associated with the entire HTML document. 999 All of the link relation types defined by HTML4 have been included in 1000 the link relation type registry, so they can be used without 1001 modification. However, there are several potential ways to serialise 1002 extension relation types into HTML4, including 1004 o As absolute URIs, or 1005 o using the document-wide "profile" attribute's URI as a prefix for 1006 relation types, or 1007 o using the RDFa [W3C.REC-rdfa-syntax-20081014] convention of 1008 mapping token prefixes to URIs (in a manner similar to XML name 1009 spaces) (note that RDFa is only defined to work in XHTML 1010 [W3C.REC-xhtml-basic-20080729], but is sometimes used in HTML4). 1012 Individual applications of linking will therefore need to define how 1013 their extension links should be serialised into HTML4. 1015 Surveys of existing HTML content have shown that unregistered link 1016 relation types that are not URIs are (perhaps inevitably) common. 1017 Consuming HTML implementations should not consider such unregistered 1018 short links to be errors, but rather relation types with a local 1019 scope (i.e., their meaning is specific and perhaps private to that 1020 document). 1022 HTML4 also defines several attributes on links that are not 1023 explicitly defined by the Link header. These attributes can be 1024 serialised as link-extensions to maintain fidelity. 1026 Finally, the HTML4 specification gives a special meaning when the 1027 "alternate" and "stylesheet" relation types coincide in the same 1028 link. Such links should be serialised in the Link header using a 1029 single list of relation-types (e.g., rel="alternate stylesheet") to 1030 preserve this relationship. 1032 Appendix C. Notes on Using the Link Header with the Atom Format 1034 Atom conveys links in the atom:link element, with the "href" 1035 attribute indicating the target IRI and the "rel" attribute 1036 containing the relation type. The context of the link is either a 1037 feed IRI or an entry ID, depending on where it appears; generally, 1038 feed-level links are obvious candidates for transmission as a Link 1039 header. 1041 When serialising an atom:link into a Link header, it is necessary to 1042 convert target IRIs (if used) to URIs. 1044 Atom defines extension relation types in terms of IRIs. This 1045 specification re-defines them as URIs, to simplify and reduce errors 1046 in their comparison. 1048 Atom allows registered link relation types to be serialised as 1049 absolute URIs. Such relation types SHOULD be converted to the 1050 appropriate registered form (e.g., 1051 "http://www.iana.org/assignments/relation/self" to "self") so that 1052 they are not mistaken for extension relation types. 1054 Furthermore, Atom link relation types are always compared in a case- 1055 sensitive fashion; therefore, registered link relation types SHOULD 1056 be converted to their registered form (usually, lower case) when 1057 serialised in an Atom document. 1059 Note also that while the Link header allows multiple relations to be 1060 serialised in a single link, atom:link does not. In this case, a 1061 single link-value may map to several atom:link elements. 1063 As with HTML, atom:link defines some attributes that are not 1064 explicitly mirrored in the Link header syntax, but they can also be 1065 used as link-extensions to maintain fidelity. 1067 Appendix D. Acknowledgements 1069 This specification lifts the idea and definition for the Link header 1070 from RFC2068; credit for it belongs entirely to the authors of and 1071 contributors to that document. The link relation type registrations 1072 themselves are sourced from several documents; see the applicable 1073 references. 1075 The author would like to thank the many people who commented upon, 1076 encouraged and gave feedback to this specification, especially 1077 including Frank Ellermann, Roy Fielding, Eran Hammer-Lahav, and 1078 Julian Reschke. 1080 Appendix E. Document history 1082 [[ to be removed by the RFC editor before publication as an RFC. ]] 1084 -10 (result of IESG review) 1086 o Clarified media BNF. 1087 o Added various security considerations. 1088 o Updated registration procedures. 1089 o Added more detail to 'payment' relation. 1090 o Corrected 'hub' relation. 1092 -09 1093 o Corrected ptoken / ptokenchar BNF. 1094 o Disallow multiple title* parameters. 1095 o Prefer title* over title when available. 1096 o Remove "\" from ptokenchar. 1097 o Explain why mailing list isn't archived. 1098 o Define default language for title and title*, based on Content- 1099 Language (when present). 1100 o Adjust MAY requirements. 1102 -08 1104 o Licensed machine-readable data under MIT. 1105 o Clarified URI comparison for extension relation types. 1106 o Various editorial tweaks (thanks, Julian!). 1107 o Changed "fields" to "appdata" to avoid confusion, and add example 1108 to clarify. 1109 o Defined REV according to HTML2, deprecated. 1110 o Clarified allowable characters in link-extensions. 1111 o Changed RFC2231 reference to draft-reschke-rfc2231-in-http. 1112 o Added hub, latest-version, predecessor-version, successor-version, 1113 version-history, working-copy and working-copy-of relation types 1114 to initial registry. 1115 o Adjusted text regarding when anchor parameter is appropriate. 1117 -07 1119 o Allowed multiple spaces between relation types. 1120 o Relaxed requirements for registered relations. 1121 o Removed Defining New Link Serialisations appendix. 1122 o Added Field registry. 1123 o Added registry XML format. 1124 o Changed registration procedure to use mailing list(s), giving the 1125 Designated Experts more responsibility for the smooth running of 1126 the registry. 1127 o Loosened prohibition against media-specific relation types to 1128 SHOULD NOT. 1129 o Disallowed registration of media-specific relation types (can 1130 still be used as extension types). 1131 o Clarified that parsers are responsible for resolving relative 1132 URIs. 1133 o Fixed ABNF for extended-initial-value. 1134 o Fixed title* parameter quoting in example. 1135 o Added notes for registered relations that lack a reference. 1136 o Added hreflang parameter. 1137 o Clarified status of 'rev'. 1138 o Removed advice to use @profile in HTML4. 1140 o Clarified what multiple *title and hreflang attributes mean. 1141 o Disallowed multiple type, rel and title attributes. 1142 o Removed text about absolute URI form of registered relations. 1143 o Required registered relations to conform to sgml-name (now just 1144 rel-relation-type). 1145 o Required registered relations to be lowercase. 1146 o Made comparison of extension relations case insensitive. 1147 o Clarified requirements on registered relation types regarding 1148 media types, etc. 1149 o Allowed applications to ignore links with anchor parameters if 1150 they're concerned. 1151 o Made 'rev' text a bit less confusing. 1152 o Extension relation URIs SHOULD be all-lowercase. 1153 o Added media parameter. 1154 o Required applications to specifically call out use of anchor 1155 parameter. 1157 -06 1159 o Added "up" and "service" relation types. 1160 o Fixed "type" attribute syntax and added prose. 1161 o Added note about RDFa and XHTML to HTML4 notes. 1162 o Removed specific location for the registry, since IANA seems to 1163 have its own ideas about that. 1165 -05 1167 o Clarified how to resolve relative URIs in the 'anchor' parameter. 1168 o Tweaked language about dereferencing relation type URIs. 1169 o Separated out examples. 1170 o Made target-parameters more explicit in the model. 1171 o Discourage special semantics between different relations, or based 1172 upon cardinality. 1173 o Grandfathered in special semantics of 'alternate stylesheet' for 1174 HTML4. 1175 o Note that extension types can be serialised in ways other than as 1176 URIs, as long as they can be converted to URIs. 1177 o Change default context of a link header to that of the requested 1178 resource. 1179 o Use this document as reference for relations that don't have a 1180 formal definition other than the registry entries; avoids circular 1181 references. 1182 o Noted that ordering of links is not significant or defined in this 1183 spec, but may be in specific applications. 1184 o Adjusted uses of 'application' to 'serialisation' where 1185 appropriate. 1187 o Added 'Defining New Link Serialisations' section. 1188 o Added note about case sensitivity when comparing registered 1189 relation types in Atom. 1191 -04 1193 o Defined context as a resource, rather than a representation. 1194 o Removed concept of link directionality; relegated to a deprecated 1195 Link header extension. 1196 o Relation types split into registered (non-URI) and extension 1197 (URI). 1198 o Changed wording around finding URIs for registered relation types. 1199 o Changed target and context URIs to IRIs (but not extension 1200 relation types). 1201 o Add RFC2231 encoding for title parameter, explicit BNF for title*. 1202 o Add i18n considerations. 1203 o Specify how to compare relation types. 1204 o Changed registration procedure to Designated Expert. 1205 o Softened language around presence of relations in the registry. 1206 o Added describedby relation. 1207 o Re-added 'anchor' parameter, along with security consideration for 1208 third-party anchors. 1209 o Softened language around HTML4 attributes that aren't directly 1210 accommodated. 1211 o Various tweaks to abstract, introduction and examples. 1213 -03 1215 o Inverted focus from Link headers to link relations. 1216 o Specified was a link relation type is. 1217 o Based on discussion, re-added 'rev'. 1218 o Changed IESG Approval to IETF Consensus for relation registrations 1219 (i.e., require a document). 1220 o Updated RFC2434 reference to RFC5226. 1221 o Registered relations SHOULD conform to sgml-name. 1222 o Cautioned against confusing relation types with media types. 1224 -02 1226 o Dropped XLink language. 1227 o Removed 'made' example. 1228 o Removed 'rev'. Can still be used as an extension. 1229 o Added HTML reference to introduction. 1230 o Required relationship values that have a ; or , to be quoted. 1231 o Changed base URI for relation values. 1232 o Noted registry location. 1234 o Added advisory text about HTML profile URIs. 1235 o Disallowed registration of relations that only differ in case. 1236 o Clarified language about IRIs in Atom. 1237 o Added descriptions for 'first', 'last', and 'payment', referring 1238 to current IANA registry entries, as these were sourced from 1239 e-mail. Will this cause self-referential implosion? 1240 o Explicitly updates RFC4287. 1241 o Added 'type' parameter. 1242 o Removed unnecessary advice about non-HTML relations in HTML 1243 section. 1245 -01 1247 o Changed syntax of link-relation to one or more URI; dropped 1248 Profile. 1249 o Dropped anchor parameter; can still be an extension. 1250 o Removed Link-Template header; can be specified by templates spec 1251 or elsewhere. 1252 o Straw-man for link relation registry. 1254 -00 1256 o Initial draft; normative text lifted from RFC2068. 1258 Author's Address 1260 Mark Nottingham 1262 Email: mnot@mnot.net 1263 URI: http://www.mnot.net/