Changeset 1168


Ignore:
Timestamp:
Mar 11, 2011, 8:04:37 PM (8 years ago)
Author:
fielding@…
Message:

Based on list discussion, suggest both 409 and 415 as status
codes when a PUT representation conflicts with the nature of
the identified resource, and use 415 in the example that is
specific to media types. This is a correction to [1158].

Location:
draft-ietf-httpbis/latest
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • draft-ietf-httpbis/latest/p2-semantics.html

    r1167 r1168  
    14011401         or will not be changed by the PUT. This is particularly important when the origin server uses internal configuration information
    14021402         related to the URI in order to set the values for representation metadata on GET responses. When a PUT representation is inconsistent
    1403          with the target resource, the origin server <em class="bcp14">SHOULD</em> either make them consistent, by transforming the representation or changing the resource configuration, or respond with a
    1404          409 (Conflict) status code and sufficient information to explain why the representation is unsuitable.
     1403         with the target resource, the origin server <em class="bcp14">SHOULD</em> either make them consistent, by transforming the representation or changing the resource configuration, or respond with an
     1404         appropriate error message containing sufficient information to explain why the representation is unsuitable. The 409 (Conflict)
     1405         or 415 (Unsupported Media Type) status codes are suggested, with the latter being specific to constraints on Content-Type
     1406         values.
    14051407      </p>
    14061408      <p id="rfc.section.7.6.p.5">For example, if the target resource is configured to always have a Content-Type of "text/html" and the representation being
    14071409         PUT has a Content-Type of "image/jpeg", then the origin server <em class="bcp14">SHOULD</em> do one of: (a) reconfigure the target resource to reflect the new media type; (b) transform the PUT representation to a format
    1408          consistent with that of the resource before saving it as the new resource state; or, (c) reject the request with a 409 response
     1410         consistent with that of the resource before saving it as the new resource state; or, (c) reject the request with a 415 response
    14091411         indicating that the target resource is limited to "text/html", perhaps including a link to a different resource that would
    14101412         be a suitable target for the new representation.
  • draft-ietf-httpbis/latest/p2-semantics.xml

    r1167 r1168  
    10111011   server &SHOULD; either make them consistent, by transforming the
    10121012   representation or changing the resource configuration, or respond
    1013    with a 409 (Conflict) status code and sufficient information
    1014    to explain why the representation is unsuitable.
     1013   with an appropriate error message containing sufficient information
     1014   to explain why the representation is unsuitable.  The 409 (Conflict)
     1015   or 415 (Unsupported Media Type) status codes are suggested, with the
     1016   latter being specific to constraints on Content-Type values.
    10151017</t>
    10161018<t>
     
    10211023   (b) transform the PUT representation to a format consistent with that
    10221024   of the resource before saving it as the new resource state; or,
    1023    (c) reject the request with a 409 response indicating that the target
     1025   (c) reject the request with a 415 response indicating that the target
    10241026   resource is limited to "text/html", perhaps including a link to a
    10251027   different resource that would be a suitable target for the new
Note: See TracChangeset for help on using the changeset viewer.