rsnext/packages/next/next-server/lib/router/utils
JJ Kasper 1203b9082b
Ensure path encoding is handled consistently for prerendered pages (#19135)
This ensures we handle encoding/decoding for SSG prerendered/fallback pages correctly. Since we only encode path delimiters when outputting to the disk we need to match this encoding when building the `ssgCacheKey` to look-up the prerendered pages. This also fixes non-ascii prerendered paths (e.g. 商業日語) not matching correctly. 

This does not resolve 👉  https://github.com/vercel/next.js/issues/10084 and further investigation will be needed before addressing non-ascii paths for non-SSG pages. 

The encoding output was tested against https://tst-encoding-l7amu5b9c.vercel.app/ to ensure the values will match correctly on Vercel. 

Closes: https://github.com/vercel/next.js/issues/17582
Closes: https://github.com/vercel/next.js/issues/17642
x-ref: https://github.com/vercel/next.js/pull/14717
2020-12-28 20:08:58 +00:00
..
escape-path-delimiters.ts Ensure path encoding is handled consistently for prerendered pages (#19135) 2020-12-28 20:08:58 +00:00
format-url.ts Remove querystring from the client (#15378) 2020-08-06 12:32:58 -04:00
get-asset-path-from-route.ts Fix prerendered nested index handling (#14383) 2020-06-23 05:49:48 +00:00
get-route-from-asset-path.ts Fix prerendered nested index handling (#14383) 2020-06-23 05:49:48 +00:00
index.ts Move next-server back into next package (#8613) 2019-09-04 10:00:54 -04:00
is-dynamic.ts Improve linting rules to catch more errors (#9374) 2019-11-10 19:24:53 -08:00
parse-relative-url.ts Fix router not working on some protocol (#16650) 2020-11-03 16:18:02 -05:00
path-match.ts Improve server performance by skipping decode/re-encode (#17323) 2020-09-24 06:05:40 +00:00
prepare-destination.ts Ensure i18n custom routes resolves correctly (#19766) 2020-12-04 10:14:55 +00:00
querystring.ts Correct query behavior for falsey values to pre 9.5.1 behavior (#16608) 2020-09-10 15:12:37 +00:00
resolve-rewrites.ts Ensure i18n custom routes resolves correctly (#19766) 2020-12-04 10:14:55 +00:00
route-matcher.ts Upgrade to Prettier 2 (#13061) 2020-05-18 15:24:37 -04:00
route-regex.ts Break up the serverless loader into typed handlers (#19511) 2020-11-25 19:56:18 +00:00
sorted-routes.ts Update routeKeys to handle non-word characters (#12801) 2020-06-16 13:49:13 +00:00