From: Arran Cudbard-Bell Date: Sat, 11 Feb 2023 02:13:33 +0000 (-0600) Subject: rest: Always emit data X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ecdb8180b2abb5720cc6306f33934649cd0096f6;p=thirdparty%2Ffreeradius-server.git rest: Always emit data --- diff --git a/src/modules/rlm_rest/rlm_rest.c b/src/modules/rlm_rest/rlm_rest.c index 6723be598f9..e01eb5f8393 100644 --- a/src/modules/rlm_rest/rlm_rest.c +++ b/src/modules/rlm_rest/rlm_rest.c @@ -310,6 +310,15 @@ error: } } +finish: + /* + * Always output the xlat data. + * + * The user can check REST-HTTP-Status-Code to figure out what happened. + * + * Eventually we should just emit two boxes, one with the response code + * and one with the body. + */ len = rest_get_handle_data(&body, handle); if (len > 0) { fr_value_box_t *vb; @@ -319,7 +328,6 @@ error: fr_dcursor_insert(out, vb); } -finish: rest_request_cleanup(inst, handle); fr_pool_connection_release(t->pool, request, handle);