Properly handle invalid eta/expires values.  Closes #1232
new flakes in flake8 2