Add double quotes to ETag and If-Match headers
Description
relates to
Activity
Sebastian Iancu March 26, 2021 at 7:22 PMEdited
This other issue requires further discussions. In any case not blocking this change-request of ETag.
Let's continue on https://discourse.openehr.org/t/return-minimal-204-no-content-is-confusing/1056/17 and on SPECITS-50
Ian McNicoll March 26, 2021 at 1:19 PM
Prefer: return=uid
- that would work for me, thoughI feel uneasy that ‘minimal’ is left completely undefined.
Sebastian Iancu March 26, 2021 at 12:38 PM
, what we can do is to introduce a new Prefer: return=uid
request header or something similar, which will instruct the server in returning only the unique identifier in the body (content type text/plain
), beside the standard headers. Or we could specify an extra response header openEHR-uid
to be sent always upon POST/PUT/DELETE.
Ian McNicoll March 26, 2021 at 9:57 AM
Much as I hate the double-quotes, I have to accept that the Gods of IETF say no. I do think it is important that we come up with agreed minimal representations for calls where at least the ehrID, compositionID or templateID are returned. Honestly the 204s are really confusing for loads of their-party devs, not just hackers like me, and digging into the Headers to find the ehrID of the new EHR you just created is a pain, and hard to explain.
The
ETag
andIf-Match
headers should always use value quoted with double-quote. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag and https://tools.ietf.org/html/rfc7232#section-2.3See discussion on https://discourse.openehr.org/t/does-etag-in-composition-response-header-really-need-quotes/404