rsnext/test
Chris Frank 44aeb083cc
Fix internal route redirection with absolute urls outside basePath (#64604)
When performing a redirect() with an absolute path, action-handler
attempts to detect whether the resource is hosted by NextJS. If we
believe it is, we then attempt to stream it.

Previously we were not accounting for basePath which caused absolute
redirects to resources on the same host, but not underneath the
basePath, to be resolved by NextJS. Since the resource is outside the
basePath we resolve a 404 page which returns back as `text/x-component`
and is thus streamed back to the client within the original POST
request.

This PR adds a check for the presence of the basePath within absolute
redirect URLs. This fixes the above problem.

fixes #64413
fixes #64557

---------

Signed-off-by: Chris Frank <chris@cfrank.org>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2024-06-18 06:58:38 -07:00
..
.stats-app Fix: remove enegine requried pnpm version (#66914) 2024-06-15 13:50:18 -07:00
development feat(turbopack-ecmascript): cache external modules with wrapper (#63337) 2024-06-10 15:39:40 +00:00
e2e Fix internal route redirection with absolute urls outside basePath (#64604) 2024-06-18 06:58:38 -07:00
examples Replace createNextDescribe with nextTestSetup (#64817) 2024-04-25 12:06:12 -06:00
integration de-flake next-image test (#66882) 2024-06-14 13:26:30 -07:00
lib Fix internal route redirection with absolute urls outside basePath (#64604) 2024-06-18 06:58:38 -07:00
production Use addDependency to track metadata route file changes (#66714) 2024-06-11 17:19:23 +02:00
unit Ensure urlPathname is always a pathname (#63846) 2024-06-11 12:49:07 -07:00
.gitignore ci(workflow): enable test trace upload (#51107) 2023-06-12 17:14:13 +00:00
build-turbopack-build-tests-manifest.js Ensure production integration test results are uploaded (#63706) 2024-03-26 10:41:16 +01:00
build-turbopack-dev-tests-manifest.js Rename turbopack-tests-manifest to turbopack-dev-tests-manifest (#63409) 2024-03-19 10:26:14 +01:00
build-turbopack-tests-manifest.d.ts Update Turbopack test manifest from GitHub Actions artifact (#58394) 2023-11-24 16:48:12 +01:00
deploy-tests-manifest.json fix actions-navigation deploy test (#66850) 2024-06-13 16:57:26 -07:00
get-test-filter.js fix e2e deployment test action (#66721) 2024-06-11 20:59:43 +00:00
jest-setup-after-env.ts Decrease default test timeouts (#56116) 2023-09-27 23:55:20 +00:00
ppr-tests-manifest.json Add timeout/retry handling for fetch cache (#66652) 2024-06-10 11:34:36 -07:00
readme.md
related-tests-manifest.json Reapply "chore(test): run related E2E deploy tests on PRs" (#64682) (#64712) 2024-04-19 11:02:43 +02:00
test-file.txt
turbopack-build-tests-manifest.json build: Update swc_core to v0.95.2 (#66902) 2024-06-18 03:27:52 +00:00
turbopack-dev-examples-manifest.json Fix last examples for Turbopack (#64020) 2024-04-03 16:02:52 +02:00
turbopack-dev-tests-manifest.json improve and skip test case (#66952) 2024-06-17 11:26:41 +02:00

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