From 6bdb1e0d8a862723c7716c76c2dd16be4ee4e9cd Mon Sep 17 00:00:00 2001 From: Clarence Date: Wed, 23 Feb 2022 11:25:18 +0800 Subject: [PATCH] [mod_curl] remove phrase check in http response --- src/mod/applications/mod_curl/mod_curl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/mod/applications/mod_curl/mod_curl.c b/src/mod/applications/mod_curl/mod_curl.c index 02079d6767..c205f0a895 100644 --- a/src/mod/applications/mod_curl/mod_curl.c +++ b/src/mod/applications/mod_curl/mod_curl.c @@ -369,11 +369,9 @@ static char *print_json(switch_memory_pool_t *pool, http_data_t *http_data) char *argv[3] = { 0 }; int argc; if ((argc = switch_separate_string(header->data, ' ', argv, (sizeof(argv) / sizeof(argv[0]))))) { + cJSON_AddItemToObject(top, "version", cJSON_CreateString(argv[0])); if (argc > 2) { - cJSON_AddItemToObject(top, "version", cJSON_CreateString(argv[0])); cJSON_AddItemToObject(top, "phrase", cJSON_CreateString(argv[2])); - } else { - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unparsable header: argc: %d\n", argc); } } else { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Starts with HTTP but not parsable: %s\n", header->data);