]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
rest: Always emit data
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sat, 11 Feb 2023 02:13:33 +0000 (20:13 -0600)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sat, 11 Feb 2023 02:13:33 +0000 (20:13 -0600)
src/modules/rlm_rest/rlm_rest.c

index 6723be598f957e34934a2c6b3fc2309ec9421d62..e01eb5f8393ef09c0a175eb86e6a7a5415d41300 100644 (file)
@@ -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);