You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not really an express bug. Opening issue here for the sake of others wondering why their code broke.
If you install datejs it modifies the stock Date.parse() function to handle more date formats. Unfortunately it now returns null instead of NaN and that breaks conditional request handling in express.static causing spurious 412 errors.
Weird for sure. Not sure if anything can be done there, since there is the potential for anything to overwrite the global Date object to anything. It's hard to program it to assume the entire environment can't be trusted to conform to the spec...
So there is yet another issue with datejs: the Date.parse it overrides in the environment not only incorrectly returns null instead of NaN, it also returns an instanceof Date instead of a plain number when it succeeds... see conversation in pillarjs/send#130 (comment)
Not really an express bug. Opening issue here for the sake of others wondering why their code broke.
If you install datejs it modifies the stock
Date.parse()
function to handle more date formats. Unfortunately it now returnsnull
instead ofNaN
and that breaks conditional request handling inexpress.static
causing spurious 412 errors.datejs Issue abritinthebay/datejs#263
The text was updated successfully, but these errors were encountered: