rsnext/test/integration/not-found-revalidate
JJ Kasper 16caf41995
Fix inconsistency with 404 getStaticProps cache-control (#66674)
While investigating unexpected stale responses when leveraging
`getStaticProps` on the 404 page noticed we have an inconsistency
between local and deployed due to `Cache-Control` being set to
`no-store, must-revalidate` even though a revalidate period is provided.
The inconsistency also differs between the HTML response and the data
response `_next/data` which causes even more unexpected behavior. To
avoid this behavior, this replaces the handling to ensure we honor the
originally provided revalidate period during `notFound: true` for the
`Cache-Control` header.

Validated against provided reproduction here
https://github.com/fusdev0/next-notfound-revalidate
Deployment:
https://vercel.live/link/next-notfound-revalidate-govzskknf-vtest314-ijjk-testing.vercel.app/fallback-blocking/fasdf

Prior PR for prior context that introduced this
https://github.com/vercel/next.js/pull/19165

x-ref: [slack
thread](https://vercel.slack.com/archives/C0676QZBWKS/p1717492459342109)
2024-06-10 12:13:05 -07:00
..
pages Fix inconsistency with 404 getStaticProps cache-control (#66674) 2024-06-10 12:13:05 -07:00
test Fix inconsistency with 404 getStaticProps cache-control (#66674) 2024-06-10 12:13:05 -07:00
data.txt Fix revalidate for initial notFound: true paths (#28097) 2021-08-14 13:11:40 +00:00