<?xml version="1.0" encoding="utf-8"?>

<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc toc="yes" ?>
<?rfc tocdepth="1" ?>
<?rfc tocindent="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes"?>
<?rfc iprnotified="no" ?>
<?rfc strict="yes" ?>
<?rfc compact="yes" ?>
<?rfc comments="yes" ?>
<?rfc inline="yes" ?>
<rfc ipr="full3978" docName="draft-nottingham-http-link-header-00">
    <front>        
      <title>HTTP Header Linking</title>		
      <author initials="M." surname="Nottingham" fullname="Mark Nottingham">
	<organization></organization>
	<address>		
	  <email>mnot@pobox.com</email>	
	  <uri>http://www.mnot.net/</uri>		
	</address>	
      </author>		      
     <date year="2006" month="June" day="16"/>

      <abstract>
<t>This specification clarifies the status of the Link HTTP header and introduces
the complimentary Profile and Link-Template HTTP headers.</t>
      </abstract>    
	  
  </front>    

  <middle>
  
<section title="Introduction">

<t>A means of indicating the relationships between documents on the Web has been
available for some time in HTML, and was considered as a HTTP 
header in <xref target="RFC2068"/>, but removed from <xref target="RFC2616"/>, 
due to a lack of implementation experience.</t>

<t>There have since surfaced many cases where a means of including this
information in HTTP headers has proved useful. However, because it was removed, 
the status of the Link header is unclear, leading some to consider
minting new application-specific HTTP headers instead of reusing it.</t>

<t>Additionally, the complementary "profile" mechanism -- which is often 
used to disambiguate link relationship types -- is not available as a 
HTTP header.</t>

<t>This specification seeks to address these shortcomings. It also introduces
a new header, Link-Template, that allows the structure of links to be 
described.</t>
</section>

<section title="Notational Conventions">

<t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document
are to be interpreted as described in BCP 14, <xref target="RFC2119"/>, as
scoped to those conformance targets.</t>

<t>This specification uses the Augmented Backus-Naur Form (ABNF)
   notation of <xref target="RFC2616"/>, and explicitly includes the following 
   rules from it: quoted-string, token, SP (space), ALPHA (letters), 
   DIGIT (decimal digit). Additionally, the following rules are included from
   <xref target="RFC3986"/>: URI-Reference, reserved, unreserved.</t>
   
</section>

<section title="The Link Header Field">

<t>The Link entity-header field provides a means for describing a
relationship between two resources, generally between the requested
resource and some other resource. An entity MAY include multiple Link
values. Links at the metainformation level typically indicate
relationships like hierarchical structure and navigation paths. The
Link field is semantically equivalent to the &lt;LINK&gt; element in
HTML.</t>

<figure>
<artwork xml:space="preserve"><![CDATA[
    Link           = "Link" ":" #("<" URI-Reference ">" 
                   *( ";" link-param ) )
    
    link-param     = ( ( "rel" "=" relationship )
                   | ( "rev" "=" relationship )
                   | ( "title" "=" quoted-string )
                   | ( "anchor" "=" <"> URI-Reference <"> )
                   | ( link-extension ) )
    
    link-extension = token [ "=" ( token | quoted-string ) ]
    
    relationship   = sgml-name
                   | ( <"> sgml-name *( SP sgml-name) <"> )
    
    sgml-name      = ALPHA *( ALPHA | DIGIT | "." | "-" )
]]></artwork>
</figure>

<t>Relationship values are case-insensitive and MAY be extended within
the constraints of the sgml-name syntax. The title parameter MAY be
used to label the destination of a link such that it can be used as
identification within a human-readable menu. The anchor parameter MAY
be used to indicate a source anchor other than the entire current
resource, such as a fragment of this resource or a third resource.</t>

<t>Examples of usage include:</t>

<figure>
<artwork xml:space="preserve"><![CDATA[
    Link: <http://www.cern.ch/TheBook/chapter2>; rel="Previous"
    Link: <mailto:timbl@w3.org>; rev="Made"; title="Tim Berners-Lee"
]]></artwork>
</figure>

<t>The first example indicates that chapter2 is previous to this
resource in a logical navigation path. The second indicates that the
person responsible for making the resource available is identified by
the given e-mail address.</t>

</section>

<section title="The Profile Header Field">

<t>The Profile entity-header field provides a means to indicate the meta 
data profile of the entity. Commonly, it is used to disambiguate the meaning
of relationships in links.</t>

<t>Note that this URI MAY be used as either an identifier (e.g., to uniquely
identify links, without dereferencing the URI), or as a link that is intended
to be dereferenced.</t>

<t>The Profile field is semantically equivalent to the profile attribute of the 
HEAD element in HTML <xref target="W3C.REC-html401-19991224"/>. Note, however,
that its use is not limited to HTML entities.</t>
    
<figure>
<artwork xml:space="preserve"><![CDATA[
    Profile       = "Profile" ":" #("<" URI-Reference ">")
]]></artwork>
</figure>

<t>For example:</t>
     
<figure>
<artwork xml:space="preserve"><![CDATA[
    Profile: <http://www.acme.com/profiles/core>
    Profile: <http://example.com/p1>, </profiles/other-profile>
]]></artwork>
</figure>

</section>


<section title="The Link-Template Header Field">

<t>The Link-Template entity-header field provides a means for describing 
the structure of a link between two resources, so that new links can be 
generated.</t>

<t>It does so through by allowing brace ("{}") -delimited strings
to be interposed throughout a URI reference. These correspond to variables
which, after being replaced with content in a relation-specified manner, are
semantically equivalent to the corresponding Link header.</t>

<t>For example,</t>

<figure>
<artwork xml:space="preserve"><![CDATA[
    Link-Template: <http://example.com/home/{userid}>; rel="home"
]]></artwork>
</figure>

<t>This link indicates that the "home" link relation can be constructed if the
userid variable is known; if it were known to be "bob", this header would be
considered equivalent to</t>

<figure>
<artwork xml:space="preserve"><![CDATA[
    Link: <http://example.com/home/bob>; rel="home"
]]></artwork>
</figure>

<t>This specification does not define when or how template variables are
interposed into link templates. Link relations that wish to allow templating
SHOULD specify such details.</t>

<t>This specification does not define the correct behaviour in the face of a
conflict between a Link-Template header and a Link header with the same 
relation. Link relations allowing templating SHOULD specify their relative
precedence.</t>

<t>Applications SHOULD NOT use link relations that do not explicitly allow
such templating in the Link-Template header.</t>

<figure>
<artwork xml:space="preserve"><![CDATA[
    Link-Template  = "Link-Template" ":" #("<" template ">" 
                   *( ";" link-param ) )

    template       = *( uri-char | template-var )
    
    template-var   = "{" 1*( uri-char ) "}"

    uri-char       = ( reserved | unreserved )   
]]></artwork>
</figure>

</section>
      
<section title="IANA Considerations">

<t>This specification requires registration of two Message Header Fields for HTTP
<xref target="RFC3864"/>. Note that "Link" is already present in the registry; this registration only 
updates its specification document.</t>

<figure>
<artwork xml:space="preserve">
Header field: Link
Applicable protocol: http
Status: standard
Author/change controller:
    IETF  (iesg@ietf.org)
    Internet Engineering Task Force
Specification document(s):
   [ this document ]
</artwork>
</figure>

<figure>
<artwork xml:space="preserve">
Header field: Profile
Applicable protocol: http
Status: standard
Author/change controller:
    IETF  (iesg@ietf.org)
    Internet Engineering Task Force
Specification document(s):
   [ this document ]
</artwork>
</figure>

<figure>
<artwork xml:space="preserve">
Header field: Link-Template
Applicable protocol: http
Status: standard
Author/change controller:
    IETF  (iesg@ietf.org)
    Internet Engineering Task Force
Specification document(s):
   [ this document ]
</artwork>
</figure>

</section>

<section title="Security Considerations">

<t>The content of both the Link and Profile headers are not secure, private
or integrity-guaranteed, and due caution should be excercised when using them.
</t>

<t>Applications that take advantage of these mechanisms should consider the 
attack vectors opened by automatically following, trusting, or otherwise using
links gathered from HTTP headers.</t>

</section>


	</middle> 

	<back> 
	  
	  <references title="Normative References">
	   

<reference anchor="RFC2119">

<front>
<title abbrev="RFC Key Words">Key words for use in RFCs to Indicate Requirement Levels</title>
<author initials="S." surname="Bradner" fullname="Scott Bradner">
<organization>Harvard University</organization>
<address>
<postal>
<street>1350 Mass. Ave.</street>
<street>Cambridge</street>
<street>MA 02138</street></postal>
<phone>- +1 617 495 3864</phone>
<email>sob@harvard.edu</email></address></author>
<date year="1997" month="March"/>
<area>General</area>
<keyword>keyword</keyword>
<abstract>
<t>
   In many standards track documents several words are used to signify
   the requirements in the specification.  These words are often
   capitalized.  This document defines these words as they should be
   interpreted in IETF documents.  Authors who follow these guidelines
   should incorporate this phrase near the beginning of their document:

<list>
<t>
      The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
      NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED",  "MAY", and
      "OPTIONAL" in this document are to be interpreted as described in
      RFC 2119.
</t></list></t>
<t>
   Note that the force of these words is modified by the requirement
   level of the document in which they are used.
</t></abstract></front>

<seriesInfo name="BCP" value="14"/>
<seriesInfo name="RFC" value="2119"/>
<format type="TXT" octets="4723" target="ftp://ftp.isi.edu/in-notes/rfc2119.txt"/>
<format type="HTML" octets="16553" target="http://xml.resource.org/public/rfc/html/rfc2119.html"/>
<format type="XML" octets="5703" target="http://xml.resource.org/public/rfc/xml/rfc2119.xml"/>
</reference>

	   

<reference anchor="RFC3986">

<front>
<title abbrev="URI Generic Syntax">Uniform Resource Identifier (URI): Generic Syntax</title>
<author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
<organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
<address>
<postal>
<street>Massachusetts Institute of Technology</street>
<street>77 Massachusetts Avenue</street>
<city>Cambridge</city>
<region>MA</region>
<code>02139</code>
<country>USA</country></postal>
<phone>+1-617-253-5702</phone>
<facsimile>+1-617-258-5999</facsimile>
<email>timbl@w3.org</email>
<uri>http://www.w3.org/People/Berners-Lee/</uri></address></author>
<author initials="R." surname="Fielding" fullname="Roy T. Fielding">
<organization abbrev="Day Software">Day Software</organization>
<address>
<postal>
<street>5251 California Ave., Suite 110</street>
<city>Irvine</city>
<region>CA</region>
<code>92617</code>
<country>USA</country></postal>
<phone>+1-949-679-2960</phone>
<facsimile>+1-949-679-2972</facsimile>
<email>fielding@gbiv.com</email>
<uri>http://roy.gbiv.com/</uri></address></author>
<author initials="L." surname="Masinter" fullname="Larry Masinter">
<organization abbrev="Adobe Systems">Adobe Systems Incorporated</organization>
<address>
<postal>
<street>345 Park Ave</street>
<city>San Jose</city>
<region>CA</region>
<code>95110</code>
<country>USA</country></postal>
<phone>+1-408-536-3024</phone>
<email>LMM@acm.org</email>
<uri>http://larry.masinter.net/</uri></address></author>
<date year="2005" month="January"/>
<area>Applications</area>
<keyword>uniform resource identifier</keyword>
<keyword>URI</keyword>
<keyword>URL</keyword>
<keyword>URN</keyword>
<keyword>WWW</keyword>
<keyword>resource</keyword>
<abstract>
<t>
A Uniform Resource Identifier (URI) is a compact sequence of characters
that identifies an abstract or physical resource.  This specification
defines the generic URI syntax and a process for resolving URI references
that might be in relative form, along with guidelines and security
considerations for the use of URIs on the Internet.
The URI syntax defines a grammar that is a superset of all valid URIs,
allowing an implementation to parse the common components of a URI
reference without knowing the scheme-specific requirements of every
possible identifier.  This specification does not define a generative
grammar for URIs; that task is performed by the individual
specifications of each URI scheme.
</t></abstract></front>

<seriesInfo name="STD" value="66"/>
<seriesInfo name="RFC" value="3986"/>
<format type="TXT" octets="141811" target="ftp://ftp.isi.edu/in-notes/rfc3986.txt"/>
<format type="HTML" octets="200858" target="http://xml.resource.org/public/rfc/html/rfc3986.html"/>
<format type="XML" octets="165759" target="http://xml.resource.org/public/rfc/xml/rfc3986.xml"/>
</reference>

	   

<reference anchor="RFC2616">

<front>
<title abbrev="HTTP/1.1">Hypertext Transfer Protocol -- HTTP/1.1</title>
<author initials="R." surname="Fielding" fullname="Roy T. Fielding">
<organization abbrev="UC Irvine">Department of Information and Computer Science</organization>
<address>
<postal>
<street>University of California, Irvine</street>
<city>Irvine</city>
<region>CA</region>
<code>92697-3425</code></postal>
<facsimile>+1(949)824-1715</facsimile>
<email>fielding@ics.uci.edu</email></address></author>
<author initials="J." surname="Gettys" fullname="James Gettys">
<organization abbrev="Compaq/W3C">World Wide Web Consortium</organization>
<address>
<postal>
<street>MIT Laboratory for Computer Science, NE43-356</street>
<street>545 Technology Square</street>
<city>Cambridge</city>
<region>MA</region>
<code>02139</code></postal>
<facsimile>+1(617)258-8682</facsimile>
<email>jg@w3.org</email></address></author>
<author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
<organization abbrev="Compaq">Compaq Computer Corporation</organization>
<address>
<postal>
<street>Western Research Laboratory</street>
<street>250 University Avenue</street>
<city>Palo Alto</city>
<region>CA</region>
<code>94305</code></postal>
<email>mogul@wrl.dec.com</email></address></author>
<author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
<organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
<address>
<postal>
<street>MIT Laboratory for Computer Science, NE43-356</street>
<street>545 Technology Square</street>
<city>Cambridge</city>
<region>MA</region>
<code>02139</code></postal>
<facsimile>+1(617)258-8682</facsimile>
<email>frystyk@w3.org</email></address></author>
<author initials="L." surname="Masinter" fullname="Larry Masinter">
<organization abbrev="Xerox">Xerox Corporation</organization>
<address>
<postal>
<street>MIT Laboratory for Computer Science, NE43-356</street>
<street>3333 Coyote Hill Road</street>
<city>Palo Alto</city>
<region>CA</region>
<code>94034</code></postal>
<email>masinter@parc.xerox.com</email></address></author>
<author initials="P." surname="Leach" fullname="Paul J. Leach">
<organization abbrev="Microsoft">Microsoft Corporation</organization>
<address>
<postal>
<street>1 Microsoft Way</street>
<city>Redmond</city>
<region>WA</region>
<code>98052</code></postal>
<email>paulle@microsoft.com</email></address></author>
<author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
<organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
<address>
<postal>
<street>MIT Laboratory for Computer Science, NE43-356</street>
<street>545 Technology Square</street>
<city>Cambridge</city>
<region>MA</region>
<code>02139</code></postal>
<facsimile>+1(617)258-8682</facsimile>
<email>timbl@w3.org</email></address></author>
<date year="1999" month="June"/>
<abstract>
<t>
   The Hypertext Transfer Protocol (HTTP) is an application-level
   protocol for distributed, collaborative, hypermedia information
   systems. It is a generic, stateless, protocol which can be used for
   many tasks beyond its use for hypertext, such as name servers and
   distributed object management systems, through extension of its
   request methods, error codes and headers . A feature of HTTP is
   the typing and negotiation of data representation, allowing systems
   to be built independently of the data being transferred.
</t>
<t>
   HTTP has been in use by the World-Wide Web global information
   initiative since 1990. This specification defines the protocol
   referred to as "HTTP/1.1", and is an update to RFC 2068 .
</t></abstract></front>

<seriesInfo name="RFC" value="2616"/>
<format type="TXT" octets="422317" target="ftp://ftp.isi.edu/in-notes/rfc2616.txt"/>
<format type="PS" octets="5529857" target="ftp://ftp.isi.edu/in-notes/rfc2616.ps"/>
<format type="PDF" octets="550558" target="ftp://ftp.isi.edu/in-notes/rfc2616.pdf"/>
<format type="HTML" octets="620835" target="http://xml.resource.org/public/rfc/html/rfc2616.html"/>
<format type="XML" octets="490204" target="http://xml.resource.org/public/rfc/xml/rfc2616.xml"/>
</reference>

	   

<reference anchor="RFC3864">

<front>
<title>Registration Procedures for Message Header Fields</title>
<author initials="G." surname="Klyne" fullname="G. Klyne">
<organization/></author>
<author initials="M." surname="Nottingham" fullname="M. Nottingham">
<organization/></author>
<author initials="J." surname="Mogul" fullname="J. Mogul">
<organization/></author>
<date year="2004" month="September"/>
<abstract>
<t>This specification defines registration procedures for the message header fields used by Internet mail, HTTP, Netnews and other applications. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements. </t></abstract></front>

<seriesInfo name="BCP" value="90"/>
<seriesInfo name="RFC" value="3864"/>
<format type="TXT" octets="36231" target="ftp://ftp.isi.edu/in-notes/rfc3864.txt"/>
</reference>

       

<reference anchor="W3C.REC-html401-19991224" target="http://www.w3.org/TR/1999/REC-html401-19991224">
<front>
<title>HTML 4.01 Specification</title>

<author initials="I." surname="Jacobs" fullname="Ian Jacobs">
    <organization/>
</author>

<author initials="D." surname="Raggett" fullname="David Raggett">
    <organization/>
</author>

<author initials="A." surname="Hors" fullname="Arnaud Le Hors">
    <organization/>
</author>

<date month="December" day="24" year="1999"/>
</front>

<seriesInfo name="World Wide Web Consortium Recommendation" value="REC-html401-19991224"/>
<format type="HTML" target="http://www.w3.org/TR/1999/REC-html401-19991224"/>
</reference>

	  </references>
	  <references title="Informative References">
	   

<reference anchor="RFC2068">

<front>
<title abbrev="HTTP/1.1">Hypertext Transfer Protocol -- HTTP/1.1</title>
<author initials="R." surname="Fielding" fullname="Roy T. Fielding">
<organization>University of California, Irvine, Department of Information and Computer Science</organization>
<address>
<postal>
<street/>
<city>Irvine</city>
<region>CA</region>
<code>92717-3425</code>
<country>US</country></postal>
<facsimile>+1 714 824 4056</facsimile>
<email>fielding@ics.uci.edu</email></address></author>
<author initials="J." surname="Gettys" fullname="Jim Gettys">
<organization>MIT Laboratory for Computer Science</organization>
<address>
<postal>
<street>545 Technology Square</street>
<city>Cambridge</city>
<region>MA</region>
<code>02139</code>
<country>US</country></postal>
<facsimile>+1 617 258 8682</facsimile>
<email>jg@w3.org</email></address></author>
<author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
<organization>Digital Equipment Corporation, Western Research Laboratory</organization>
<address>
<postal>
<street>250 University Avenue</street>
<city>Palo Alto</city>
<region>CA</region>
<code>94301</code>
<country>US</country></postal>
<email>mogul@wrl.dec.com</email></address></author>
<author initials="H." surname="Nielsen" fullname="Henrik Frystyk Nielsen">
<organization>MIT Laboratory for Computer Science</organization>
<address>
<postal>
<street>545 Technology Square</street>
<city>Cambridge</city>
<region>MA</region>
<code>02139</code>
<country>US</country></postal>
<facsimile>+1 617 258 8682</facsimile>
<email>frystyk@w3.org</email></address></author>
<author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
<organization>MIT Laboratory for Computer Science</organization>
<address>
<postal>
<street>545 Technology Square</street>
<city>Cambridge</city>
<region>MA</region>
<code>02139</code>
<country>US</country></postal>
<facsimile>+1 617 258 8682</facsimile>
<email>timbl@w3.org</email></address></author>
<date year="1997" month="January"/>
<abstract>
<t>The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypermedia information systems. It is a generic, stateless, object-oriented protocol which can be used for many tasks, such as name servers and distributed object management systems, through extension of its request methods. A feature of HTTP is the typing and negotiation of data representation, allowing systems to be built independently of the data being transferred.</t>
<t>HTTP has been in use by the World-Wide Web global information initiative since 1990. This specification defines the protocol referred to as "HTTP/1.1".</t></abstract></front>

<seriesInfo name="RFC" value="2068"/>
<format type="TXT" octets="378114" target="ftp://ftp.isi.edu/in-notes/rfc2068.txt"/>
</reference>

	  </references>
	  
<section title="Acknowledgements">

<t>This specification lifts the definition of the Link header
from RFC2068; credit for it belongs entirely to the authors of and contributors
to that document.</t>

<t>The semantics and much of the syntax of the Profile header was defined by
HTML 4.01; credit for them belongs to the authors of and contributors to that
document.</t>

<t>Joe Gregorio, Marc Hadley and David Orchard contributed to the design of
the Link-Template mechanism.</t>

</section>
	  
     </back>
</rfc>



