diff options
Diffstat (limited to 'res/res_ari_events.c')
-rw-r--r-- | res/res_ari_events.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/res/res_ari_events.c b/res/res_ari_events.c index 36c9b06d8..8ccb8870c 100644 --- a/res/res_ari_events.c +++ b/res/res_ari_events.c @@ -287,11 +287,10 @@ int ast_ari_events_user_event_parse_body( static void ast_ari_events_user_event_cb( struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, - struct ast_variable *headers, struct ast_ari_response *response) + struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response) { struct ast_ari_events_user_event_args args = {}; struct ast_variable *i; - RAII_VAR(struct ast_json *, body, NULL, ast_json_unref); #if defined(AST_DEVMODE) int is_valid; int code; @@ -352,21 +351,6 @@ static void ast_ari_events_user_event_cb( } else {} } - /* Look for a JSON request entity */ - body = ast_http_get_json(ser, headers); - if (!body) { - switch (errno) { - case EFBIG: - ast_ari_response_error(response, 413, "Request Entity Too Large", "Request body too large"); - goto fin; - case ENOMEM: - ast_ari_response_error(response, 500, "Internal Server Error", "Error processing request"); - goto fin; - case EIO: - ast_ari_response_error(response, 400, "Bad Request", "Error parsing request body"); - goto fin; - } - } args.variables = body; ast_ari_events_user_event(headers, &args, response); #if defined(AST_DEVMODE) |