pquerna / cachecontrol

Golang HTTP Cache-Control Parser and Interpretation
Apache License 2.0
133 stars 17 forks source link

Should not cache when only `Date` response header is passed in. #21

Open bofia opened 3 years ago

bofia commented 3 years ago

When passing in a response with just the Date header set, the return value is: reasons: nil expires: time.Time{} (a zero value) err: nil

I would expect the reasons to be something like ReasonResponseUncachableByDefault since passing just a Date header doesn't meet any caching spec