Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Regression: If-Modified-Since value of zero not accepted anymore [SPR-14144] #18716
I discovered an issue recently after migrating a spring-boot application from 1.2.7.RELEASE to 1.3.3.RELEASE. After upgrading, the underlying spring-web module is spring-web:4.2.5.RELEASE. Prior to the upgrade, the version was spring-web:4.1.8.RELEASE.
Client requests had previously been sending the header "If-Modified-Since: 0" wihout errors
After the upgrade, same requests cause 500 server error and the following stack-trace:
It seems that a question about this issue has also been asked on StackOverflow:
I'm currently working around the issue using a filter which removes the problematic header, however it looks (to my eyes at least) like a fairly straightforward fix could be implemented in HttpHeaders.java
I've forked the codebase and will submit a PR once JIRA gives me a ticket ID.
Juergen Hoeller commented
Actually, we should be leniently ignoring invalid header values for all concrete accessors. I'd rather keep the generic
As a consequence, I've taken a slightly broader approach than just ignoring "0" specifically. Thanks for the pull request in any case, that's very helpful input!