datatracker.ietf.org
Sign in
Version 5.3.0, 2014-04-12
Report a bug

PATCH Method for HTTP
RFC 5789

Document type: RFC - Proposed Standard (March 2010; Errata)
Was draft-dusseault-http-patch (individual in app area)
Document stream: IETF
Last updated: 2013-03-02
Other versions: plain text, pdf, html

IETF State: (None)
Consensus: Unknown
Document shepherd: No shepherd assigned

IESG State: RFC 5789 (Proposed Standard)
Responsible AD: Alexey Melnikov
Send notices to: lisa.dusseault@gmail.com, jasnell@gmail.com, mnot@mnot.net

Internet Engineering Task Force (IETF)                      L. Dusseault
Request for Comments: 5789                                    Linden Lab
Category: Standards Track                                       J. Snell
ISSN: 2070-1721                                               March 2010

                         PATCH Method for HTTP

Abstract

   Several applications extending the Hypertext Transfer Protocol (HTTP)
   require a feature to do partial resource modification.  The existing
   HTTP PUT method only allows a complete replacement of a document.
   This proposal adds a new HTTP method, PATCH, to modify an existing
   HTTP resource.

Status of This Memo

   This is an Internet Standards Track document.

   This document is a product of the Internet Engineering Task Force
   (IETF).  It represents the consensus of the IETF community.  It has
   received public review and has been approved for publication by the
   Internet Engineering Steering Group (IESG).  Further information on
   Internet Standards is available in Section 2 of RFC 5741.

   Information about the current status of this document, any errata,
   and how to provide feedback on it may be obtained at
   http://www.rfc-editor.org/info/rfc5789.

Copyright Notice

   Copyright (c) 2010 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.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Dusseault & Snell            Standards Track                    [Page 1]
RFC 5789                       HTTP PATCH                     March 2010

Table of Contents

   1. Introduction ....................................................2
   2. The PATCH Method ................................................2
      2.1. A Simple PATCH Example .....................................4
      2.2. Error Handling .............................................5
   3. Advertising Support in OPTIONS ..................................7
      3.1. The Accept-Patch Header ....................................7
      3.2. Example OPTIONS Request and Response .......................7
   4. IANA Considerations .............................................8
      4.1. The Accept-Patch Response Header ...........................8
   5. Security Considerations .........................................8
   6. References ......................................................9
      6.1. Normative References .......................................9
      6.2. Informative References .....................................9
   Appendix A.  Acknowledgements .....................................10

1.  Introduction

   This specification defines the new HTTP/1.1 [RFC2616] method, PATCH,
   which is used to apply partial modifications to a resource.

   A new method is necessary to improve interoperability and prevent
   errors.  The PUT method is already defined to overwrite a resource
   with a complete new body, and cannot be reused to do partial changes.
   Otherwise, proxies and caches, and even clients and servers, may get
   confused as to the result of the operation.  POST is already used but
   without broad interoperability (for one, there is no standard way to
   discover patch format support).  PATCH was mentioned in earlier HTTP
   specifications, but not completely defined.

   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].

   Furthermore, this document uses the ABNF syntax defined in Section
   2.1 of [RFC2616].

2.  The PATCH Method

   The PATCH method requests that a set of changes described in the
   request entity be applied to the resource identified by the Request-
   URI.  The set of changes is represented in a format called a "patch
   document" identified by a media type.  If the Request-URI does not
   point to an existing resource, the server MAY create a new resource,
   depending on the patch document type (whether it can logically modify
   a null resource) and permissions, etc.

Dusseault & Snell            Standards Track                    [Page 2]

[include full document text]