This was really awkward. First of all, the special handling of invalid dates is only for `Expires` header, and not for `Last-Modified` for example. So this is the wrong place. Secondly, the condition is wrong `-1 === $value`, because what if it's `"-1"` or `0`. According to the rfc, all invalid dates should be considered past for the expires header.