Ignore:
Timestamp:
Mar 11, 2011, 8:04:37 PM (9 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].

File:
1 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.
Note: See TracChangeset for help on using the changeset viewer.