Closed ivanovalex02 closed 6 years ago
Because strtotime can be used to determine if the time is a valid time (and not say February 30, 2018).
What's the actual problem you're having?
Assuming this issue is due to incorrect server configurations. Please feel free to leave more information, but without knowing what the problem is (beyond the debugger telling you that your age headers are broken) there's nothing to fix here.
Age is delta-seconds https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Age
strtotime converts wide variety of trash to a "time":
<?php var_dump(strtotime("1020"));
>>int(1538673600)
Maybe you do not want to compare this against time()
https://github.com/Ipstenu/varnish-http-purge/blob/3b00c5aadb6f4a20877311a7f3c256b2cfbebcfd/debug.php#L594
Any ideas why do we need strtotime here?