Fix interpretation of Last-Modified and If-Modified-Since headers

If the dates in `Last-Modified` and `If-Modified-Since` are an exact
match, the server should 304.
This commit is contained in:
James Reggio 2017-08-30 16:10:28 -04:00 committed by Will Norris
parent 50c30f1f85
commit ebcfb52f3a
2 changed files with 7 additions and 2 deletions

View file

@ -275,7 +275,7 @@ func should304(req *http.Request, resp *http.Response) bool {
if err != nil {
return false
}
if lastModified.Before(ifModSince) {
if lastModified.Before(ifModSince) || lastModified.Equal(ifModSince) {
return true
}