From 58f1e86fc11d16865fd073153f56a8f33e19552d Mon Sep 17 00:00:00 2001 From: David Robertson Date: Mon, 13 Nov 2023 16:19:56 +0000 Subject: [PATCH] Require `PUT` to supply an `If-Match` --- proposals/3886-simple-rendezvous-capability.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/proposals/3886-simple-rendezvous-capability.md b/proposals/3886-simple-rendezvous-capability.md index 940281e6ba0..44e9c68ae5d 100644 --- a/proposals/3886-simple-rendezvous-capability.md +++ b/proposals/3886-simple-rendezvous-capability.md @@ -109,7 +109,8 @@ HTTP request headers: - `Content-Length` - required - `Content-Type` - optional, server should assume `application/octet-stream` if not specified -- `If-Match` - optional, as per [RFC7232](https://httpwg.org/specs/rfc7232.html#header.if-match) server will assume `*` +- `If-Match` - required. The ETag of the last payload seen by the requesting device. + if not specified HTTP request body: @@ -119,9 +120,9 @@ HTTP request body: HTTP response codes, and Matrix error codes: - `202 Accepted` - payload updated -- `400 Bad Request` (`M_MISSING_PARAM`) - no `Content-Length` was provided. +- `400 Bad Request` (`M_MISSING_PARAM`) - a required header was not provided. - `404 Not Found` (`M_NOT_FOUND`) - rendezvous URI is not valid (it could have expired) -- `412 Precondition Failed` (`M_DIRTY_WRITE`, **a new error code**) - when `If-Match` is supplied and the ETag does not match +- `412 Precondition Failed` (`M_DIRTY_WRITE`, **a new error code**) - when the ETag does not match - `413 Payload Too Large` (`M_TOO_LARGE`) - the supplied payload is too large - `429 Too Many Requests` (`M_UNKNOWN`) - the request has been rate limited