1
0
mirror of https://git.teknik.io/Teknikode/Teknik.git synced 2023-08-02 14:16:22 +02:00

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

This commit is contained in:
Uncled1023 2018-01-26 22:27:10 -08:00
parent 6708fc2de6
commit d7994ef6ff

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)
{