#17630: Fixing warmup requested file limit

Work Items: 17630

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2011-04-01 15:33:04 -07:00
parent e255362cb5
commit 49eb1f66a2

View File

@@ -84,10 +84,10 @@ namespace Orchard.WarmupStarter {
// use the url as it was requested by the client
// the real url might be different if it has been translated (proxy, load balancing, ...)
var url = ToUrlString(_context.Request);
var virtualFileCopy = WarmupFilesPath + EncodeUrl(url.Trim('/'));
var localCopy = HostingEnvironment.MapPath(virtualFileCopy);
var virtualFileCopy = EncodeUrl(url.Trim('/'));
var localCopy = Path.Combine(HostingEnvironment.MapPath(WarmupFilesPath), virtualFileCopy);
if (localCopy != null && File.Exists(localCopy)) {
if (File.Exists(localCopy)) {
// result should not be cached, even on proxies
_context.Response.Cache.SetExpires(DateTime.UtcNow.AddDays(-1));
_context.Response.Cache.SetValidUntilExpires(false);