mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-22 20:04:52 +00:00
[mod_curl] fixes 'Unparsable header' error message on HTTP/2 200 reply
This commit is contained in:
parent
6a13dee6f8
commit
6a25584da2
@ -381,6 +381,10 @@ static char *print_json(switch_memory_pool_t *pool, http_data_t *http_data)
|
||||
if (argc > 2) {
|
||||
cJSON_AddItemToObject(top, "version", cJSON_CreateString(argv[0]));
|
||||
cJSON_AddItemToObject(top, "phrase", cJSON_CreateString(argv[2]));
|
||||
} else if (argc == 2 && strcmp(argv[0], "HTTP/2") == 0) {
|
||||
/* HTTP/2 responses may not include a phrase */
|
||||
cJSON_AddItemToObject(top, "version", cJSON_CreateString(argv[0]));
|
||||
cJSON_AddItemToObject(top, "phrase", cJSON_CreateString(""));
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unparsable header: argc: %d\n", argc);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user