From b9be530c380985735acf6952816044581e4c5539 Mon Sep 17 00:00:00 2001 From: Nathan Neulinger Date: Tue, 3 Nov 2015 09:11:20 -0600 Subject: [PATCH] FS-8308 need to double encode if urlencoding json that is already encoded --- src/mod/event_handlers/mod_format_cdr/mod_format_cdr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mod/event_handlers/mod_format_cdr/mod_format_cdr.c b/src/mod/event_handlers/mod_format_cdr/mod_format_cdr.c index fc353661e3..e5e0f36907 100644 --- a/src/mod/event_handlers/mod_format_cdr/mod_format_cdr.c +++ b/src/mod/event_handlers/mod_format_cdr/mod_format_cdr.c @@ -322,7 +322,7 @@ static switch_status_t my_on_reporting_cb(switch_core_session_t *session, cdr_pr memset(cdr_text_escaped, 0, need_bytes); if (profile->encode == ENCODING_DEFAULT) { headers = switch_curl_slist_append(headers, "Content-Type: application/x-www-form-urlencoded"); - switch_url_encode(cdr_text, cdr_text_escaped, need_bytes); + switch_url_encode_opt(cdr_text, cdr_text_escaped, need_bytes, SWITCH_TRUE); } else { headers = switch_curl_slist_append(headers, "Content-Type: application/x-www-form-base64-encoded"); switch_b64_encode((unsigned char *) cdr_text, need_bytes / 3, (unsigned char *) cdr_text_escaped, need_bytes);