<!-- <param name="ssl-version" value="TLSv1"/> -->
<!-- optional: enables cookies and stores them in the specified file. -->
- <!-- <param name="cookie-file" value="/$${temp_dir}/cookie-mod_xml_curl.txt"/> -->
+ <!-- <param name="cookie-file" value="$${run_dir}/mod_xml_cdr-cookie.txt"/> -->
</settings>
</configuration>
int timeout;
switch_memory_pool_t *pool;
switch_event_node_t *node;
+ char *cookie_file;
} globals;
SWITCH_MODULE_LOAD_FUNCTION(mod_xml_cdr_load);
switch_curl_easy_setopt(curl_handle, CURLOPT_CAINFO, globals.ssl_cacert_file);
}
+ if (globals.cookie_file) {
+ switch_curl_easy_setopt(curl_handle, CURLOPT_COOKIEJAR, globals.cookie_file);
+ switch_curl_easy_setopt(curl_handle, CURLOPT_COOKIEFILE, globals.cookie_file);
+ }
+
switch_curl_easy_setopt(curl_handle, CURLOPT_TIMEOUT, globals.timeout);
/* these were used for testing, optionally they may be enabled if someone desires
} else if (!strcasecmp(val, "any")) {
globals.auth_scheme = (long)CURLAUTH_ANY;
}
+ } else if (!strcasecmp(var, "cookie-file")) {
+ globals.cookie_file = switch_core_strdup(globals.pool, val);
}
}