rest: enable shell/output as a GET request

shell/output does not modify state, add check to consider GET
shell/output a valid request.

Keep POST shell/output compatibility.
master v1.2.5-13
Alejandro Sirgo Rica 2024-06-21 12:59:19 +02:00
parent c0ca4b8cbc
commit 814daceeee
1 changed files with 1 additions and 1 deletions

View File

@ -8094,7 +8094,7 @@ int og_client_state_process_payload_rest(struct og_client *cli)
}
err = og_cmd_run_post(root, &params);
} else if (!strncmp(cmd, "shell/output", strlen("shell/output"))) {
if (method != OG_METHOD_POST) {
if (method != OG_METHOD_POST && method != OG_METHOD_GET) {
err = og_client_method_not_found(cli);
goto err_process_rest_payload;
}