mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-30 15:14:17 +00:00
FS-7258, FS-7571: [mod_xml_cdr] properly encode xml cdr for post to web server
This commit is contained in:
1 parent
0c45bee409
commit
49778c34e5
3 files changed
+9
-3
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user