mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-17 09:12:25 +00:00
add nohead param to skip over the cache check with HEAD method
This commit is contained in:
parent
44f78e9e76
commit
09b1b8bc7f
@ -2530,6 +2530,7 @@ static switch_status_t locate_url_file(http_file_context_t *context, const char
|
||||
|
||||
lock_file(context, SWITCH_TRUE);
|
||||
|
||||
if (!context->url_params || !switch_true(switch_event_get_header(context->url_params, "nohead"))) {
|
||||
if ((status = fetch_cache_data(context, url, &headers, NULL)) != SWITCH_STATUS_SUCCESS) {
|
||||
if (status == SWITCH_STATUS_NOTFOUND) {
|
||||
unreachable = 2;
|
||||
@ -2561,6 +2562,9 @@ static switch_status_t locate_url_file(http_file_context_t *context, const char
|
||||
}
|
||||
|
||||
switch_event_destroy(&headers);
|
||||
}
|
||||
|
||||
|
||||
fetch_cache_data(context, url, &headers, context->cache_file);
|
||||
metadata = switch_core_sprintf(context->pool, "%s:%s:%s:%s",
|
||||
url,
|
||||
|
Loading…
x
Reference in New Issue
Block a user