From aef581628f356ae2a8302b1d3b18eb1b72468901 Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Wed, 6 Oct 2021 15:10:58 -0400 Subject: [PATCH] Add discussion. --- docs/proposed/http-storage-node-protocol.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/proposed/http-storage-node-protocol.rst b/docs/proposed/http-storage-node-protocol.rst index e3bd48128..bb5dc28ad 100644 --- a/docs/proposed/http-storage-node-protocol.rst +++ b/docs/proposed/http-storage-node-protocol.rst @@ -515,6 +515,24 @@ Clients should upload chunks in re-assembly order. } +Discussion +`````````` + +``PUT`` verbs are only supposed to be used to replace the whole resource, +thus the use of ``PATCH``. +From RFC 7231:: + + An origin server that allows PUT on a given target resource MUST send + a 400 (Bad Request) response to a PUT request that contains a + Content-Range header field (Section 4.2 of [RFC7233]), since the + payload is likely to be partial content that has been mistakenly PUT + as a full representation. Partial content updates are possible by + targeting a separately identified resource with state that overlaps a + portion of the larger resource, or by using a different method that + has been specifically defined for partial updates (for example, the + PATCH method defined in [RFC5789]). + + ``POST /v1/immutable/:storage_index/:share_number/corrupt`` !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!