add mime types to webserver

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6418 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale committed 2007-11-28 20:44:18 +00:00
1 parent 60c783c636
commit a05c09a69a
4 files changed
+29 -9

No files matched your search

@@ -665,6 +665,9 @@ SWITCH_MODULE_RUNTIME_FUNCTION(mod_xml_rpc_runtime)
xmlrpc_registry *registryP;
xmlrpc_env env;
char logfile[512];
switch_hash_index_t *hi;
const void *var;
void *val;
globals.running = 1;
@@ -679,6 +682,12 @@ SWITCH_MODULE_RUNTIME_FUNCTION(mod_xml_rpc_runtime)
MIMETypeInit();
MIMETypeAdd("text/html", "html");
for(hi = switch_core_mime_index(); hi; hi = switch_hash_next(hi)) {
switch_hash_this(hi, &var, NULL, &val);
if (var && val) {
MIMETypeAdd((char *) val, (char *) var);
}
}
snprintf(logfile, sizeof(logfile), "%s%s%s", SWITCH_GLOBAL_dirs.log_dir, SWITCH_PATH_SEPARATOR, "freeswitch_http.log");
ServerCreate(&abyssServer, "XmlRpcServer", globals.port, SWITCH_GLOBAL_dirs.htdocs_dir, logfile);