rsnext/test
Zack Tanner 8395059d33
verify action id before parsing body (#58977)
### What?
When handling a server action, in the non-progressive enhanced case,
React will attempt to parse the request body before verifying if a valid
server action is received. This results in an "Error: Connection Closed"
error being thrown, rather than ignoring the action and failing more
gracefully

### Why?
To support progressive enhancement with form actions, the `actionId`
value is added as a hidden input in the form, so the action ID from the
header shouldn't be verified until determining that we've reached the
non-PE case. ([React
ref](https://github.com/facebook/react/pull/26774)). However, in
https://github.com/vercel/next.js/pull/49187, support was added for a
URL encoded form (which is not currently used, as indicated on the PR).

Despite it not being used for server actions, it's currently possible to
trigger this codepath, ie by calling redirect in an action handler with
a 307/308 status code with some data in the URL. This would result in a
500 error.

### How?
React should not attempt to parse the URL encoded form data until after
we've verified the server action header for the non-PE case.

x-ref NEXT-1733
[Slack
context](https://vercel.slack.com/archives/C03S8ED1DKM/p1700674895218399?thread_ts=1700060786.749079&cid=C03S8ED1DKM)
2023-11-29 19:55:00 +00:00
..
.stats-app tweak stats action to pull in runtime sizes (#58005) 2023-11-03 23:39:37 +00:00
development make tests more stable (#58765) 2023-11-23 13:48:08 +01:00
e2e verify action id before parsing body (#58977) 2023-11-29 19:55:00 +00: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 Ensure stale build fetch data is not unexpectedly used (#59076) 2023-11-29 10:03:25 -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 from GitHub Actions artifact (#58394) 2023-11-24 16:48:12 +01: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 build(cargo): bump up turbopack (#59032) 2023-11-28 20:42:26 +00:00

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