提交 09b1b8bc authored 作者: Anthony Minessale's avatar Anthony Minessale

add nohead param to skip over the cache check with HEAD method

上级 44f78e9e
...@@ -2530,6 +2530,7 @@ static switch_status_t locate_url_file(http_file_context_t *context, const char ...@@ -2530,6 +2530,7 @@ static switch_status_t locate_url_file(http_file_context_t *context, const char
lock_file(context, SWITCH_TRUE); 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 = fetch_cache_data(context, url, &headers, NULL)) != SWITCH_STATUS_SUCCESS) {
if (status == SWITCH_STATUS_NOTFOUND) { if (status == SWITCH_STATUS_NOTFOUND) {
unreachable = 2; unreachable = 2;
...@@ -2561,6 +2562,9 @@ static switch_status_t locate_url_file(http_file_context_t *context, const char ...@@ -2561,6 +2562,9 @@ static switch_status_t locate_url_file(http_file_context_t *context, const char
} }
switch_event_destroy(&headers); switch_event_destroy(&headers);
}
fetch_cache_data(context, url, &headers, context->cache_file); fetch_cache_data(context, url, &headers, context->cache_file);
metadata = switch_core_sprintf(context->pool, "%s:%s:%s:%s", metadata = switch_core_sprintf(context->pool, "%s:%s:%s:%s",
url, url,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论