Skip to content

eps1lon/cache-revalidate-404-issue

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Repro

$ npm install
$ npm run build
$ npm run start
$ curl -s -o /dev/null -w "%{http_code}" http://localhost:3000/
404
$ curl http://localhost:3000/set-item \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"item": "example value"}'
$ curl -s -o /dev/null -w "%{http_code}" http://localhost:3000/get-item
200
$ curl -s -o /dev/null -w "%{http_code}" http://localhost:3000/
# Intended
404
$ curl  -X POST http://localhost:3000/revalidate
$ curl -s -o /dev/null -w "%{http_code}" http://localhost:3000/
# Not expected. Should've been revalidated.
# Returns 200 as intended only after we also called `revalidatePath('/')`
404

Short version

Ideal during bisect

npm i --legacy-peer-deps && rm -rf .next && npm run build && npm run start
curl -s -o /dev/null -w "%{http_code}" http://localhost:3000/\;
curl http://localhost:3000/set-item \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"item": "example value"}';
curl -s -o /dev/null -w "%{http_code}" http://localhost:3000/get-item\;
curl -s -o /dev/null -w "%{http_code}" http://localhost:3000/\;
curl  -X POST http://localhost:3000/revalidate
curl -s -o /dev/null -w "%{http_code}" http://localhost:3000/

Bisect results

Bad versions: ? - 14.3.0-canary.73
Good versions: 14.3.0-canary.74 - 15.0.0-canary.182
Bad versions: 15.0.0-canary.183 - *

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 94.2%
  • JavaScript 5.8%