Skip to content
Snippets Groups Projects
Commit 25704f49 authored by Nate Rini's avatar Nate Rini Committed by Danny Auble
Browse files

slurmrestd - Handle SLURM_NO_CHANGE_IN_DATA in _call_handler()

Convert SLURM_NO_CHANGE_IN_DATA into "304 Not Modified" instead of
considering it to be an error.

Bug 10562
parent 3e719976
No related branches found
No related tags found
No related merge requests found
......@@ -13,6 +13,7 @@ documents those changes that are of interest to users and administrators.
[Grp|Max]TRES limits. For example, if the LimitFactor is 2, then an
association with a GrpTRES of 30 CPUs, would be allowed to allocate 60
CPUs when running under this QOS.
-- slurmrestd - Pass SLURM_NO_CHANGE_IN_DATA to client as 403 (Not Modified).
 
* Changes in Slurm 20.11.3
==========================
......
......@@ -380,7 +380,22 @@ static int _call_handler(on_http_request_args_t *args, data_t *params,
else
fatal_abort("%s: unexpected mime type", __func__);
if (rc) {
if (rc == SLURM_NO_CHANGE_IN_DATA) {
/*
* RFC#7232 Section:4.1
*
* Send minimal response that nothing has changed
*
*/
send_http_response_args_t send_args = {
.con = args->context->con,
.http_major = args->http_major,
.http_minor = args->http_minor,
.status_code = HTTP_STATUS_CODE_REDIRECT_NOT_MODIFIED,
};
rc = send_http_response(&send_args);
} else if (rc) {
http_status_code_t e = HTTP_STATUS_CODE_SRVERR_INTERNAL;
if (rc == ESLURM_REST_INVALID_QUERY)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment