FS-7258, FS-7571: [mod_xml_cdr] properly encode xml cdr for post to web server

This commit is contained in:
Michael Jerris authored and Brian committed 2015-06-02 18:54:15 -05:00
1 parent 0c45bee409
commit 49778c34e5
3 files changed
+9 -3

No files matched your search

+1 -1
View File
@@ -272,7 +272,7 @@ static switch_status_t my_on_reporting(switch_core_session_t *session)
memset(xml_text_escaped, 0, need_bytes);
if (globals.encode == ENCODING_DEFAULT) {
headers = switch_curl_slist_append(headers, "Content-Type: application/x-www-form-urlencoded");
switch_url_encode(xml_text, xml_text_escaped, need_bytes);
switch_url_encode_opt(xml_text, xml_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 *) xml_text, need_bytes / 3, (unsigned char *) xml_text_escaped, need_bytes);