}
context->cache_file = switch_core_sprintf(context->pool, "%s%s%s%s%s", globals.cache_path, SWITCH_PATH_SEPARATOR, digest, ext ? "." : "", ext ? ext : "");
-
switch_safe_free(dext);
return context->cache_file;
if (context->url_params) {
ext = switch_event_get_header(context->url_params, "ext");
}
+
+ if (zstr(ext)) {
+ ext = find_ext(context->cache_file);
+ }
if (!context->url_params || !switch_true(switch_event_get_header(context->url_params, "nohead"))) {
const char *ct = NULL;
if (newext) {
ext = newext;
- } else if (zstr(ext)) {
- ext = find_ext(context->cache_file);
- }
-
-
- if (newext) {
context->cache_file = switch_core_sprintf(context->pool, "%s.%s", context->cache_file, newext);
}