idnits 2.17.1 draft-nottingham-http-link-header-02.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** It looks like you're using RFC 3978 boilerplate. You should update this to the boilerplate described in the IETF Trust License Policy document (see https://trustee.ietf.org/license-info), which is required now. -- Found old boilerplate from RFC 3978, Section 5.1 on line 16. -- Found old boilerplate from RFC 3978, Section 5.5, updated by RFC 4748 on line 521. -- Found old boilerplate from RFC 3979, Section 5, paragraph 1 on line 532. -- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 539. -- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 545. 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 : ---------------------------------------------------------------------------- -- 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 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 lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (July 3, 2008) is 5775 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) ** Obsolete normative reference: RFC 2434 (Obsoleted by RFC 5226) ** 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 informational reference (is this intentional?): RFC 2068 (Obsoleted by RFC 2616) Summary: 4 errors (**), 0 flaws (~~), 1 warning (==), 9 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group M. Nottingham 3 Internet-Draft July 3, 2008 4 Updates: 4287 (if approved) 5 Intended status: Standards Track 6 Expires: January 4, 2009 8 HTTP Header Linking 9 draft-nottingham-http-link-header-02 11 Status of this Memo 13 By submitting this Internet-Draft, each author represents that any 14 applicable patent or other IPR claims of which he or she is aware 15 have been or will be disclosed, and any of which he or she becomes 16 aware will be disclosed, in accordance with Section 6 of BCP 79. 18 Internet-Drafts are working documents of the Internet Engineering 19 Task Force (IETF), its areas, and its working groups. Note that 20 other groups may also distribute working documents as Internet- 21 Drafts. 23 Internet-Drafts are draft documents valid for a maximum of six months 24 and may be updated, replaced, or obsoleted by other documents at any 25 time. It is inappropriate to use Internet-Drafts as reference 26 material or to cite them other than as "work in progress." 28 The list of current Internet-Drafts can be accessed at 29 http://www.ietf.org/ietf/1id-abstracts.txt. 31 The list of Internet-Draft Shadow Directories can be accessed at 32 http://www.ietf.org/shadow.html. 34 This Internet-Draft will expire on January 4, 2009. 36 Abstract 38 This document clarifies the status of the Link HTTP header and 39 attempts to consolidate link relations in a single registry. 41 Table of Contents 43 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 44 2. Notational Conventions . . . . . . . . . . . . . . . . . . . . 3 45 3. The Link Header Field . . . . . . . . . . . . . . . . . . . . 4 46 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5 47 5. Security Considerations . . . . . . . . . . . . . . . . . . . 8 48 6. References . . . . . . . . . . . . . . . . . . . . . . . . . . 9 49 6.1. Normative References . . . . . . . . . . . . . . . . . . . 9 50 6.2. Informative References . . . . . . . . . . . . . . . . . . 9 51 Appendix A. Notes on HTML Links . . . . . . . . . . . . . . . . . 10 52 Appendix B. Notes on Atom Links . . . . . . . . . . . . . . . . . 11 53 Appendix C. Acknowledgements . . . . . . . . . . . . . . . . . . 11 54 Appendix D. Document history . . . . . . . . . . . . . . . . . . 11 55 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 12 56 Intellectual Property and Copyright Statements . . . . . . . . . . 13 58 1. Introduction 60 A means of indicating the relationships between documents on the Web 61 has been available for some time in HTML [W3C.REC-html401-19991224], 62 and was considered as a HTTP header in [RFC2068], but removed from 63 [RFC2616], due to a lack of implementation experience. 65 There have since surfaced many cases where a means of including this 66 information in HTTP headers has proved useful. However, because it 67 was removed, the status of the Link header is unclear, leading some 68 to consider minting new application-specific HTTP headers instead of 69 reusing it. 71 This document seeks to address these shortcomings. 73 Additionally, formats other than HTML -- namely, Atom [RFC4287] -- 74 have also defined generic linking mechanisms that are similar to 75 those in HTML, but not identical. This document aims to reconcile 76 these differences when such links are expressed as headers. 78 [[ NOTE: This is a straw-man draft that is intended to give a ROUGH 79 idea of what it would take to align and consolidate the HTML and Atom 80 link relations into a single registry with reasonable extensibility 81 rules. In particular; a) it changes the registry for Atom link 82 relations, and the process for registration; b) it assigns more 83 generic semantics to several existing link relations, both Atom and 84 HTML; c) it changes the syntax of the Link header (in the case where 85 extensions are present). Feedback is welcome on the 86 ietf-http-wg@w3.org mailing list, although this is NOT a work item of 87 the HTTPBIS WG. ]] 89 2. Notational Conventions 91 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 92 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 93 document are to be interpreted as described in BCP 14, [RFC2119], as 94 scoped to those conformance targets. 96 This document uses the Augmented Backus-Naur Form (ABNF) notation of 97 [RFC2616], and explicitly includes the following rules from it: 98 quoted-string, token, SP (space). Additionally, the following rules 99 are included from [RFC3986]: URI-Reference, and from [RFC4288]: type- 100 name. 102 3. The Link Header Field 104 The Link entity-header field provides a means for describing a 105 relationship between two resources, generally between that of the 106 entity associated with the header and some other resource. An entity 107 MAY include multiple Link values. 109 The Link header field is semantically equivalent to the 110 element in HTML, as well as the atom:link element in Atom [RFC4287]. 112 Link = "Link" ":" #("<" URI-Reference ">" 113 *( ";" link-param ) ) 115 link-param = ( ( "rel" "=" relationship ) 116 | ( "type" "=" type-name ) 117 | ( "title" "=" quoted-string ) 118 | ( link-extension ) ) 120 link-extension = token [ "=" ( token | quoted-string ) ] 122 relationship = URI-Reference | 123 <"> URI-Reference *( SP URI-Reference) <"> ) 125 Relationship values that include a semicolon (";") or comma (",") 126 MUST be quoted. 128 The title parameter MAY be used to label the destination of a link 129 such that it can be used as identification within a human-readable 130 menu. 132 For example: 134 Link: ; rel="previous"; 135 title="previous chapter" 137 This indicates that chapter2 is previous to this resource in a 138 logical navigation path. 140 3.1. Link Relationships 142 Relationship values are URIs that identify the type of link. If the 143 relationship is a relative URI, its base URI MUST be considered to be 144 "http://www.iana.org/assignments/relation/", and the value MUST be 145 present in the link relation registry. 147 4. IANA Considerations 149 4.1. Link Header Registration 151 This specification requires that the Message Header Registry entry 152 for "Link" in HTTP [RFC3864] be updated to refer to this document, 153 and located at "http://www.iana.org/assignments/relation/". 155 Header field: Link 156 Applicable protocol: http 157 Status: standard 158 Author/change controller: 159 IETF (iesg@ietf.org) 160 Internet Engineering Task Force 161 Specification document(s): 162 [ this document ] 164 4.2. Link Relation Registry 166 This specification is intended to update Atom to become the reference 167 for the Link Relation registry, and clarifies its nature and use. 169 A Link relation is a way of indicating the semantics of a link. Link 170 relations are not format-specific, and MUST NOT specify a particular 171 format or media type that they are to be used with. 173 The security considerations of following a particular link are not 174 determined by the link's relation type; they are determined by the 175 specific context of the use and the media type of the response. 177 Likewise, a link relation SHOULD NOT specify what the context of its 178 use is, although the media type of the dereferenced link may 179 constrain how it is applied. 181 Link relations that differ only in case (e.g., "Foo" and "foo") MUST 182 NOT be registered. 184 New relations MAY be registered, subject to IESG Approval, as 185 outlined in [RFC2434]. Requests should be made by email to IANA, 186 which will then forward the request to the IESG, requesting approval. 187 The request should use the following template: 189 o Relation Name: 190 o Description: 191 o Reference: 193 The Link Relation registry replaces the Atom Link Relation registry, 194 using the same address with the following contents: 196 o Relation Name: alternate 197 o Description: Designates a substitute for the link's context. 198 o Reference: [W3C.REC-html401-19991224] 200 o Relation Name: appendix 201 o Description: Refers to an appendix. 202 o Reference: [W3C.REC-html401-19991224] 204 o Relation Name: bookmark 205 o Description: Refers to a bookmark or entry point. 206 o Reference: [W3C.REC-html401-19991224] 208 o Relation Name: chapter 209 o Description: Refers to a chapter in a collection of resources. 210 o Reference: [W3C.REC-html401-19991224] 212 o Relation Name: contents 213 o Description: Refers to a table of contents. 214 o Reference: [W3C.REC-html401-19991224] 216 o Relation Name: copyright 217 o Description: Refers to a copyright statement. 218 o Reference: [W3C.REC-html401-19991224] 220 o Relation Name: current 221 o Description: Refers to a resource containing the most recent 222 item(s) in a collection of resources. 223 o Reference: [RFC5005] 225 o Relation Name: edit 226 o Description: Refers to a resource that can be used to edit the 227 link's context. 228 o Reference: [RFC5023] 230 o Relation Name: edit-media 231 o Description: Refers to a resource that can be used to edit media 232 associated with the link's context. 233 o Reference: [RFC5023] 235 o Relation Name: enclosure 236 o Description: Identifies a related resource that is potentially 237 large and might require special handling. 238 o Reference: [RFC4287] 240 o Relation Name: first 241 o Description: A URI that refers to the furthest preceding resource 242 in a series of resources. 244 o Reference: 246 o Relation Name: glossary 247 o Description: Refers to a glossary of terms. 248 o Reference: [W3C.REC-html401-19991224] 250 o Relation Name: help 251 o Description: Refers to a resource offering help (more information, 252 links to other sources information, etc.) 253 o Reference: [W3C.REC-html401-19991224] 255 o Relation Name: index 256 o Description: Refers to an index. 257 o Reference: [W3C.REC-html401-19991224] 259 o Relation Name: last 260 o Description: A URI that refers to the furthest following resource 261 in a series of resources. 262 o Reference: 264 o Relation Name: license 265 o Description: Refers to a license associated with the link's 266 context. 267 o Reference: [RFC4946] 269 o Relation Name: next 270 o Description: Refers to the next resource in a ordered series of 271 resources. 272 o Reference: [W3C.REC-html401-19991224] 274 o Relation Name: next-archive 275 o Description: Refers to the immediately following archive resource. 276 o Reference: [RFC5005] 278 o Relation Name: payment 279 o Description: indicates a resource where payment is accepted. 280 o Reference: 281 283 o Relation Name: prev 284 o Description: Refers to the previous resource in an ordered series 285 of resources. Synonym for "previous". 286 o Reference: [W3C.REC-html401-19991224] 288 o Relation Name: previous 289 o Description: Refers to the previous resource in an ordered series 290 of resources. Synonym for "prev". 292 o Reference: [W3C.REC-html401-19991224] 294 o Relation Name: prev-archive 295 o Description: Refers to the immediately preceding archive resource. 296 o Reference: [RFC5005] 298 o Relation Name: related 299 o Description: Identifies a related resource. 300 o Reference: [RFC4287] 302 o Relation Name: replies 303 o Description: Identifies a resource that is a reply to the context 304 of the link. 305 o Reference: [RFC4685] 307 o Relation Name: section 308 o Description: Refers to a section in a collection of resources. 309 o Reference: [W3C.REC-html401-19991224] 311 o Relation Name: self 312 o Description: Conveys an identifier for the link's context. 313 o Reference: [RFC4287] 315 o Relation Name: start 316 o Description: Refers to the first resource in a collection of 317 resources. 318 o Reference: [W3C.REC-html401-19991224] 320 o Relation Name: stylesheet 321 o Description: Refers to an external style sheet. 322 o Reference: [W3C.REC-html401-19991224] 324 o Relation Name: subsection 325 o Description: Refers to a resource serving as a subsection in a 326 collection of resources. 327 o Reference: [W3C.REC-html401-19991224] 329 o Relation Name: via 330 o Description: Identifies a resource that is the source of the 331 information in the link's context. 332 o Reference: [RFC4287] 334 5. Security Considerations 336 The content the Link headers is not secure, private or integrity- 337 guaranteed, and due caution should be excercised when using it. 339 Applications that take advantage of these mechanisms should consider 340 the attack vectors opened by automatically following, trusting, or 341 otherwise using links gathered from HTTP headers. 343 6. References 345 6.1. Normative References 347 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 348 Requirement Levels", BCP 14, RFC 2119, March 1997. 350 [RFC2434] Narten, T. and H. Alvestrand, "Guidelines for Writing an 351 IANA Considerations Section in RFCs", BCP 26, RFC 2434, 352 October 1998. 354 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 355 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 356 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 358 [RFC3864] Klyne, G., Nottingham, M., and J. Mogul, "Registration 359 Procedures for Message Header Fields", BCP 90, RFC 3864, 360 September 2004. 362 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 363 Resource Identifier (URI): Generic Syntax", STD 66, 364 RFC 3986, January 2005. 366 [RFC4288] Freed, N. and J. Klensin, "Media Type Specifications and 367 Registration Procedures", BCP 13, RFC 4288, December 2005. 369 6.2. Informative References 371 [RFC2068] Fielding, R., Gettys, J., Mogul, J., Nielsen, H., and T. 372 Berners-Lee, "Hypertext Transfer Protocol -- HTTP/1.1", 373 RFC 2068, January 1997. 375 [RFC4287] Nottingham, M. and R. Sayre, "The Atom Syndication 376 Format", RFC 4287, December 2005. 378 [RFC4685] Snell, J., "Atom Threading Extensions", RFC 4685, 379 September 2006. 381 [RFC4946] Snell, J., "Atom License Extension", RFC 4946, July 2007. 383 [RFC5005] Nottingham, M., "Feed Paging and Archiving", RFC 5005, 384 September 2007. 386 [RFC5023] Gregorio, J. and B. de hOra, "The Atom Publishing 387 Protocol", RFC 5023, October 2007. 389 [W3C.REC-html401-19991224] 390 Raggett, D., Hors, A., and I. Jacobs, "HTML 4.01 391 Specification", W3C REC REC-html401-19991224, 392 December 1999. 394 Appendix A. Notes on HTML Links 396 HTML motivated the original syntax of the Link header, and many of 397 the design decisions in this document are driven by a desire to stay 398 compatible with these uses. 400 All of the link relations defined by HTML4 have been included in the 401 link relation registry, so they can be used without modification. 402 However, extension link relations work differently in HTML4 and the 403 Link header; the former uses a document-wide "profile" URI to scope 404 the relations, while the latter allows the use of full URIs on 405 individual relations. 407 Therefore, when using the profile mechanism in HTML4, it is necessary 408 to map the profiled link relations to URIs when expressed in Link 409 headers. For example, in HTML: 411 412 413 414 415 [...] 417 could be represented as a header like this; 419 Link: ; rel="http://example.com/profile1/foo" 421 Profile authors should note this when creating profile URIs; it may 422 be desirable to use URIs that end in a delimiter (e.g., "/" or "#"), 423 to make extracting the specific relation in use easier. 425 HTML defines link relation values as case-insensitive, while the Link 426 header's syntax does not. Therefore, it is important to case- 427 normalise relation values in HTML before comparing or converting them 428 to Link headers. 430 HTML also defines several attributes on links that are not explicitly 431 defined by the Link header. Although most of these are believed to 432 be defunct, they can be used as link-extensions. 434 Appendix B. Notes on Atom Links 436 Atom conveys links in the atom:link element. When serialising an 437 atom:link into a Link header, it is necessary to convert IRIs (if 438 used) to URIs. 440 Additionally, since the base URI for link relations in Link headers 441 is fixed, extension links (i.e,. those not in the registry) MUST be 442 represented as absolute URIs. 444 Note also that while the Link header allows multiple relations to be 445 associated with a single link, atom:link does not. In this case, a 446 single Link header may map to several atom:link elements. 448 As with HTML, atom:link defines some attributes that are not 449 explicitly mirrored in the Link header syntax, but they may also be 450 used as link-extensions. 452 Appendix C. Acknowledgements 454 This specification lifts the definition of the Link header from 455 RFC2068; credit for it belongs entirely to the authors of and 456 contributors to that document. The link relation registrations 457 themselves are sourced from several documents; see the applicable 458 references. 460 The author would like to thank the many people who commented upon, 461 encouraged and gave feedback to this draft, especially including 462 Frank Ellermann and Julian Reschke. 464 Appendix D. Document history 466 -02 468 o Dropped XLink language. 469 o Removed 'made' example. 470 o Removed 'rev'. Can still be used as an extension. 471 o Added HTML reference to introduction. 472 o Required relationship values that have a ; or , to be quoted. 473 o Changed base URI for relation values. 475 o Noted registry location. 476 o Added advisory text about HTML profile URIs. 477 o Disallowed registration of relations that only differ in case. 478 o Clarified language about IRIs in Atom. 479 o Added descriptions for 'first', 'last', and 'payment', referring 480 to current IANA registry entries, as these were sourced from 481 e-mail. Will this cause self-referential implosion? 482 o Explicitly updates RFC4287. 483 o Added 'type' parameter. 484 o Removed unnecessary advice about non-HTML relations in HTML 485 section. 487 -01 489 o Changed syntax of link-relation to one or more URI; dropped 490 Profile. 491 o Dropped anchor parameter; can still be an extension. 492 o Removed Link-Template header; can be specified by templates spec 493 or elsewhere. 494 o Straw-man for link relation registry. 496 -00 498 o Initial draft; normative text lifted from RFC2068. 500 Author's Address 502 Mark Nottingham 504 Email: mnot@mnot.net 505 URI: http://www.mnot.net/ 507 Full Copyright Statement 509 Copyright (C) The IETF Trust (2008). 511 This document is subject to the rights, licenses and restrictions 512 contained in BCP 78, and except as set forth therein, the authors 513 retain all their rights. 515 This document and the information contained herein are provided on an 516 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 517 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND 518 THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS 519 OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF 520 THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 521 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 523 Intellectual Property 525 The IETF takes no position regarding the validity or scope of any 526 Intellectual Property Rights or other rights that might be claimed to 527 pertain to the implementation or use of the technology described in 528 this document or the extent to which any license under such rights 529 might or might not be available; nor does it represent that it has 530 made any independent effort to identify any such rights. Information 531 on the procedures with respect to rights in RFC documents can be 532 found in BCP 78 and BCP 79. 534 Copies of IPR disclosures made to the IETF Secretariat and any 535 assurances of licenses to be made available, or the result of an 536 attempt made to obtain a general license or permission for the use of 537 such proprietary rights by implementers or users of this 538 specification can be obtained from the IETF on-line IPR repository at 539 http://www.ietf.org/ipr. 541 The IETF invites any interested party to bring to its attention any 542 copyrights, patents or patent applications, or other proprietary 543 rights that may cover technology that may be required to implement 544 this standard. Please address the information to the IETF at 545 ietf-ipr@ietf.org.