[Docs] [txt|pdf|xml|html] [Tracker] [Email] [Diff1] [Diff2] [Nits]

Versions: 00 01 02 03 04 05 06 07 08 09 10 11 12

Individual Submission                                           J. Snell
Internet-Draft
Intended status: Standards Track                       November 04, 2013
Expires: May 08, 2014


                      HTTP Link and Unlink Methods
                       draft-snell-link-method-06

Abstract

   This specification defines the semantics of the LINK and UNLINK HTTP
   methods.

Status of This Memo

   This Internet-Draft is submitted to IETF in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at http://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on May 08, 2014.

Copyright Notice

   Copyright (c) 2013 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (http://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.









Snell                     Expires May 08, 2014                  [Page 1]


Internet-Draft        HTTP Link and Unlink Methods         November 2013


Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  LINK  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   2
   3.  UNLINK  . . . . . . . . . . . . . . . . . . . . . . . . . . .   3
   4.  Relationship to other HTTP Methods and Discoverability of
       Links . . . . . . . . . . . . . . . . . . . . . . . . . . . .   3
   5.  Example . . . . . . . . . . . . . . . . . . . . . . . . . . .   4
   6.  Security Considerations . . . . . . . . . . . . . . . . . . .   5
   7.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   5
   8.  References  . . . . . . . . . . . . . . . . . . . . . . . . .   6
     8.1.  Normative References  . . . . . . . . . . . . . . . . . .   6
     8.2.  Informational References  . . . . . . . . . . . . . . . .   6
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .   6

1.  Introduction

   This specification updates the HTTP LINK and UNLINK methods
   originally defined in [RFC2068].

   In this document, the key words "MUST", "MUST NOT", "REQUIRED",
   "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY",
   and "OPTIONAL" are to be interpreted as described in [RFC2119].

2.  LINK

   The LINK method is used to establish one or more relationships
   between the resource identified by the effective request URI and one
   or more other resources.  Metadata contained within Link header
   fields [RFC5988] provide information about which other resources are
   being connected to the target and the type of relationship being
   established.  A payload within a LINK request has no defined
   semantics.

   LINK requests are idempotent.  For any pair of resources, exactly one
   relationship of any given link relation type can exist.  However,
   multiple relationships of different types can be established between
   the same pair of resources.

   LINK requests are not safe, however.  Establishing a relationship
   causes an inherent change to the state of the target resource.

   Responses to LINK requests are not cacheable.  If a LINK request
   passes through a cache that has one or more stored responses for the
   effective request URI, those stored responses will be invalidated
   (see Section 6 of [I-D.ietf-httpbis-p6-cache]).





Snell                     Expires May 08, 2014                  [Page 2]


Internet-Draft        HTTP Link and Unlink Methods         November 2013


   A single LINK request can contain multiple Link header fields, each
   of which establishes a separate, independent relationship with the
   target resource.  In such cases, the server MUST either create all of
   the relationships or not create any of them.

   The semantics of the LINK method change to a "conditional LINK" if
   the request message includes an If-Modified-Since, If-Unmodified-
   Since, If-Match, If-None-Match, or If-Range header field
   ([I-D.ietf-httpbis-p4-conditional]).  A conditional LINK requests
   that the relationship be established only under the circumstances
   described by the conditional header field(s).

3.  UNLINK

   The UNLINK method is used to remove one or more relationships between
   the resource identified by the effective request URI and other
   resources.  Metadata contained within Link header fields [RFC5988]
   provide the information about the relationships that are to be
   removed.  A payload within an UNLINK request has no defined
   semantics.

   UNLINK request messages are idempotent but are not safe.  Removing a
   relationship causes an inherent change to the state of the target
   resource.

   Responses to UNLINK requests are not cacheable.  If an UNLINK request
   passes through a cache that has one or more stored responses for the
   effective request URI, those stored responses will be invalidated
   (see Section 6 of [I-D.ietf-httpbis-p6-cache]).

   A single UNLINK request message can contain multiple Link header
   fields, each of which identifies a separate relationship to remove.
   In such cases, the server MUST either remove the entire set of
   relationships atomically or not remove any of them.

   The semantics of the UNLINK method change to a "conditional UNLINK"
   if the request message includes an If-Modified-Since, If-Unmodified-
   Since, If-Match, If-None-Match, or If-Range header field
   ([I-D.ietf-httpbis-p4-conditional]).  A conditional UNLINK requests
   that the relationship be established only under the circumstances
   described by the conditional header field(s).

4.  Relationship to other HTTP Methods and Discoverability of Links

   The use of the LINK and UNLINK request methods to manage
   relationships between resources has no direct bearing on the use or
   appearance of Link header fields within any other HTTP request or
   response message involving the same effective request URI.  Nor do



Snell                     Expires May 08, 2014                  [Page 3]


Internet-Draft        HTTP Link and Unlink Methods         November 2013


   the methods have any direct normative impact on the use of link-like
   structures within the resource representations returned by a server
   for any particular resource.

   Whether and how to represent relationships managed using LINK and
   UNLINK is left solely at the discretion of the server implementation.

   This specification does not define a means of discovering or
   enumerating the relationships that have been established using the
   LINK request method.

5.  Example

   There exists a broad range of possible use cases for the LINK and
   UNLINK methods.  The examples that follow illustrate a subset of
   those cases.

   Example 1: Creating two separate links between an image and the
   profiles of two people associated with the image:

   LINK /images/my_dog.jpg HTTP/1.1
   Host: example.org
   Link: <http://example.com/profiles/joe>; rel="tag"
   Link: <http://example.com/profiles/sally>; rel="tag"


   Example 2: Removing an existing Link relationship between two
   resources:

   UNLINK /images/my_dog.jpg HTTP/1.1
   Host: example.org
   Link: <http://example.com/profiles/sally>; rel="tag"


   Example 3: Establish a "pingback" or "trackback" style link to a blog
   entry about an article

   LINK /articles/an_interesting_article HTTP/1.1
   Host: example.org
   Link: <http://example.com/my_blog_post>; rel="mention"











Snell                     Expires May 08, 2014                  [Page 4]


Internet-Draft        HTTP Link and Unlink Methods         November 2013


   Example 4: Establish a link between two semantically related
   resources:

   LINK /some-resource HTTP/1.1
   Host: example.org
   Link: <http://example.com/schemas/my_schema>; rel="describedBy"


   Example 5: Add an existing resource to a collection:

   LINK /some-collection-resource HTTP/1.1
   Host: example.org
   Link: <http://example.com/my-member-resource>; rel="item"


   Example 6: Link one resource to another that monitors its current
   state (e.g. pub/sub)

   LINK /my-resource HTTP/1.1
   Host: example.org
   Link: <http://example.com/my-monitor>; rel="monitor"


6.  Security Considerations

   The LINK and UNLINK methods are subject to the same general security
   considerations as all HTTP methods as described in
   [I-D.ietf-httpbis-p2-semantics].

   Because the LINK and UNLINK methods cause changes to a resource's
   state, the server is responsible for determining the client's
   authorization to make such changes.

7.  IANA Considerations

   IANA is requested to add the LINK and UNLINK methods to the permanent
   registry at <http://www.iana.org/assignments/http-methods> (see
   Section 8.1 of [I-D.ietf-httpbis-p2-semantics]).

            +-------------+------+------------+---------------+
            | Method Name | Safe | Idempotent | Specification |
            +-------------+------+------------+---------------+
            | LINK        | No   | Yes        | Section 2     |
            | UNLINK      | No   | Yes        | Section 3     |
            +-------------+------+------------+---------------+






Snell                     Expires May 08, 2014                  [Page 5]


Internet-Draft        HTTP Link and Unlink Methods         November 2013


8.  References

8.1.  Normative References

   [I-D.ietf-httpbis-p2-semantics]
              Fielding, R. and J. Reschke, "Hypertext Transfer Protocol
              (HTTP/1.1): Semantics and Content", draft-ietf-
              httpbis-p2-semantics-24 (work in progress), September
              2013.

   [I-D.ietf-httpbis-p4-conditional]
              Fielding, R. and J. Reschke, "Hypertext Transfer Protocol
              (HTTP/1.1): Conditional Requests", draft-ietf-
              httpbis-p4-conditional-24 (work in progress), September
              2013.

   [I-D.ietf-httpbis-p6-cache]
              Fielding, R., Nottingham, M., and J. Reschke, "Hypertext
              Transfer Protocol (HTTP/1.1): Caching", draft-ietf-
              httpbis-p6-cache-24 (work in progress), September 2013.

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119, March 1997.

   [RFC5988]  Nottingham, M., "Web Linking", RFC 5988, October 2010.

8.2.  Informational References

   [RFC2068]  Fielding, R., Gettys, J., Mogul, J., Nielsen, H., and T.
              Berners-Lee, "Hypertext Transfer Protocol -- HTTP/1.1",
              RFC 2068, January 1997.

Author's Address

   James M Snell

   Email: jasnell@gmail.com














Snell                     Expires May 08, 2014                  [Page 6]

Html markup produced by rfcmarkup 1.128b, available from https://tools.ietf.org/tools/rfcmarkup/