FS-7496 Updated mime.types, added switch_core_mime_type2ext function and used it in mod_httapi. Now, file extensions defined in mime.types will be applied if mod_httapi downloads a file without one.

This commit is contained in:
Chris Rienzo
2015-04-30 14:24:41 -04:00
parent 518d74a4bc
commit b28f7acac1
9 changed files with 5724 additions and 2584 deletions
+1 -6
View File
@@ -2780,12 +2780,7 @@ static switch_status_t locate_url_file(http_file_context_t *context, const char
}
if (zstr(ext) && headers && (ct = switch_event_get_header(headers, "content-type"))) {
if (switch_strcasecmp_any(ct, "audio/mpeg", "audio/x-mpeg", "audio/mp3", "audio/x-mp3", "audio/mpeg3",
"audio/x-mpeg3", "audio/mpg", "audio/x-mpg", "audio/x-mpegaudio", NULL)) {
newext = "mp3";
} else if (switch_strcasecmp_any(ct, "audio/x-wav", "audio/x-wave", "audio/wav", "audio/wave", NULL)) {
newext = "wav";
}
newext = switch_core_mime_type2ext(ct);
}
if (newext) {