rsnext/test
Zack Tanner 363c2e8eb7
fix server actions behavior on intercepted routes (#59175)
### What?
When using a server action on an intercepted route, when submitting that
action, you'd expect it to correspond with the page you're currently on.
However if you have route interception set up, and you load the page
rather than the intercepted page, submitting the action would `POST` to
the intercepted page. This would result in a 404 error because the
action ID you're attempting to submit wouldn't be found on the requested
page.

### Why?
Interception routes rely on the `Next-Url` request header to determine
if an interception should occur via a rewrite. However, server actions
are submitted with this header as well, so the rewrite will be applied
to the `POST` request corresponding with a non-existent action, or an
action on the intercepted page.

### How?
When loading a page that has an intercepted route, `nextUrl` should be
consistent with URL derived from the flight router state tree. But when
an interception occurs via navigation, `nextUrl` will now deviate. I'm
using this to determine whether or not `Next-Url` should be forwarded
along in the `POST` request.

Closes NEXT-1436
Fixes #52591
Fixes #49934
2023-12-01 14:45:00 -08:00
..
.stats-app tweak stats action to pull in runtime sizes (#58005) 2023-11-03 23:39:37 +00:00
development Turbopack: Align some "Module not found" errors with webpack (#58518) 2023-11-30 08:34:56 -08:00
e2e fix server actions behavior on intercepted routes (#59175) 2023-12-01 14:45:00 -08:00
examples feat(cli): introduce --tailwind flag (#46927) 2023-03-16 16:06:27 +01:00
integration fix(test): don't use latest sharp (#59074) 2023-11-29 18:13:58 +01:00
lib Ensure stale build fetch data is not unexpectedly used (#59076) 2023-11-29 10:03:25 -08:00
production Support adding CSP nonce with content-security-policy-report-only header (#59071) 2023-11-30 19:40:57 -08:00
unit Add nodejs version check (#58958) 2023-11-27 16:53:26 +00:00
.gitignore ci(workflow): enable test trace upload (#51107) 2023-06-12 17:14:13 +00:00
build-turbopack-tests-manifest.d.ts Update Turbopack test manifest from GitHub Actions artifact (#58394) 2023-11-24 16:48:12 +01:00
build-turbopack-tests-manifest.js Update Turbopack test manifest (#59109) 2023-12-01 10:16:28 +00:00
get-test-filter.js Enable PPR tests for test suites (#59030) 2023-11-29 03:22:45 +00:00
jest-setup-after-env.ts Decrease default test timeouts (#56116) 2023-09-27 23:55:20 +00:00
ppr-tests-manifest.json Enable PPR tests for test suites (#59030) 2023-11-29 03:22:45 +00:00
readme.md refactor: split up CONTRIBUTING.md (#40515) 2022-09-16 14:54:58 -07:00
test-file.txt
turbopack-tests-manifest.json fix(next-core): do not panic when parsing segment config (#59170) 2023-12-01 12:54:01 -08:00

See Testing for more information on how you can run/write/debug tests for Next.js.