Roundup Tracker - Issues

Issue 2551289

classification
Invalid REST Accept header with post/put performs change before returning 406.
Type: behavior Severity: normal
Components: API Versions:
process
Status: new
:
: : rouilj
Priority: :

Created on 2023-08-02 21:58 by rouilj, last changed 2023-08-02 21:58 by rouilj.

Messages
msg7822 Author: [hidden] (rouilj) Date: 2023-08-02 21:58
Sending a POST, PUT (maybe PATCH) with an accept header that is not
application/json or xml (if enabled) will complete the request before throwing
a 406 error.

This is incorrect. The Accept header should be validated first and a 406 returned
before any change/work is done.

Note that the property binary_content should allow a value other than json and xml.
In this case, the Accept value must match the mime type of the file content (as reported in 
the file metadata at data/file/N data.attributes.type). The response will be the raw binary
file with the Content-Type set to the mime type and the content-length the length of the
binary content.

This also applies to a GET, but a GET is read only so less of an issue.

This is a prereq for issue 2551068.
History
Date User Action Args
2023-08-02 21:58:25rouiljcreate