rsnext/packages/next/next-server/lib
Joe Haddad c351f6154b
Improve server performance by skipping decode/re-encode (#17323)
Prior to this pull request, Next.js would immediately decode all URLs sent to its server (via `path-match`).

This was rarely needed, and Next.js would typically re-encode the incoming request right away (see all the `encodeURIComponent`s removed in PR diff). This adds unnecessary performance overhead.

Long term, this will also help prevent weird encoding edge-cases like #10004, #10022, #11371, et al.

---

No new tests are necessary for this change because we've extensively tested these edge cases with existing tests.
One test was updated to reflect that we skip decoding in a 404 scenario.

Let's see if all the existing tests pass!
2020-09-24 06:05:40 +00:00
..
router Improve server performance by skipping decode/re-encode (#17323) 2020-09-24 06:05:40 +00:00
amp-context.ts Add sourcemaps to Next.js core compilation (#13049) 2020-05-19 09:09:59 +02:00
amp.ts chore(next): export/lib/next-server missing types (#13320) 2020-05-24 22:44:05 +00:00
constants.ts Add initial handling for dynamic route href resolving and rewrites on the client (#15231) 2020-08-13 14:39:36 +02:00
document-context.ts Support persisting the dev cache buster (#15827) 2020-08-03 14:22:55 +00:00
dynamic.tsx [Fix] common misspelling errors (#15288) 2020-07-19 04:38:20 +00:00
head-manager-context.ts Remove Head.rewind as it's no longer needed (#14091) 2020-06-11 22:09:06 +00:00
head.tsx AMP compatibility for Font optimization (#16208) 2020-08-20 15:10:59 -04:00
loadable-context.ts Add sourcemaps to Next.js core compilation (#13049) 2020-05-19 09:09:59 +02:00
loadable.d.ts Improve linting rules to catch more errors (#9374) 2019-11-10 19:24:53 -08:00
loadable.js Remove unused variable (#13716) 2020-06-03 11:58:58 -04:00
mitt.ts Remove tslint disables (#16116) 2020-08-12 14:39:07 +00:00
post-process.ts Make the image post-processor ignore SVG images (#16732) 2020-09-02 02:42:20 +00:00
router-context.ts Add sourcemaps to Next.js core compilation (#13049) 2020-05-19 09:09:59 +02:00
runtime-config.ts chore(next): export/lib/next-server missing types (#13320) 2020-05-24 22:44:05 +00:00
side-effect.tsx Handle rendering next/head outside of Next.js (#14511) 2020-06-23 20:46:40 +00:00
utils.ts Remove next-head-count (#16758) 2020-09-09 01:41:04 +00:00