Browse Source

Re-enabled dl cache since the RST seems to be fixed.

tags/3.0.0
Teknikode 1 year ago
parent
commit
d7994ef6ff
1 changed files with 12 additions and 12 deletions
  1. 12
    12
      Teknik/Areas/Upload/Controllers/UploadController.cs

+ 12
- 12
Teknik/Areas/Upload/Controllers/UploadController.cs View File

@@ -182,18 +182,18 @@ namespace Teknik.Areas.Upload.Controllers
// Check for the cache
bool isCached = false;
string modifiedSince = Request.Headers["If-Modified-Since"];
//if (!string.IsNullOrEmpty(modifiedSince))
//{
// DateTime modTime = new DateTime();
// bool parsed = DateTime.TryParse(modifiedSince, out modTime);
// if (parsed)
// {
// if ((modTime - dateUploaded).TotalSeconds <= 1)
// {
// isCached = true;
// }
// }
//}
if (!string.IsNullOrEmpty(modifiedSince))
{
DateTime modTime = new DateTime();
bool parsed = DateTime.TryParse(modifiedSince, out modTime);
if (parsed)
{
if ((modTime - dateUploaded).TotalSeconds <= 1)
{
isCached = true;
}
}
}

if (isCached)
{

Loading…
Cancel
Save