rsnext/packages/next/server
io 2c7f8b3d7b
Support colons in Middleware NextResponse.rewrite path (#32543)
* Add failing colon rewrite test

* add test fixture

* better colon rewrite tests

* middleware rewrite colon tests with query parameters

* fix #31523

this addresses the symptom but the real systemic issue is that prepareDestination is called on rewrite/redirect URLs, which have no defined special behavior for colons and they should not be compiled at all

* hack around prepareDestination to skip compiling x-middleware-rewrite

this is a bit nicer than just escaping colons, but ideally we find a way to obviate prepareDestination

* obviate prepareDestination for x-middleware-rewrite handling

* don't clobber rewrite query data

* omit redundant type

* catch up to main

* It looks like newUrl should contain only pathname

Co-authored-by: Naoyuki Kanezawa <naoyuki.kanezawa@gmail.com>
2022-03-03 11:36:53 -08:00
..
api-utils Ensure unstable_revalidate does not error from notFound: true (#34826) 2022-02-25 14:17:07 -08:00
base-http Allow reading request bodies in middlewares (#34294) (#34519) 2022-02-18 19:43:43 +00:00
dev fix: #34711 ensure distDir inside project folder (#34795) 2022-02-25 12:40:24 +00:00
lib Refactor base server to remove native dependencies (#33499) 2022-01-20 21:25:44 +00:00
send-payload Reduce the size of web server (#34767) 2022-02-24 19:53:17 +00:00
web Expose WASM bindings in Middleware (#34437) 2022-03-02 15:09:36 +00:00
accept-header.ts Implement Middleware RFC (#30081) 2021-10-20 17:52:11 +00:00
base-server.ts Handle de-duping revalidations in minimal mode (#34935) 2022-03-02 15:06:54 -08:00
body-streams.ts Allow reading request bodies in middlewares (#34294) (#34519) 2022-02-18 19:43:43 +00:00
config-shared.ts produce source maps for middlewares (#34409) 2022-02-24 15:56:40 +00:00
config-utils.ts Remove webpack 4 support (#29660) 2021-10-06 17:40:01 +02:00
config.ts fix: make sure image-config gets transpiled (#34677) 2022-02-22 09:27:18 -05:00
crypto-utils.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
denormalize-page-path.ts Fix dynamic routes with pages under index folder (#32440) 2021-12-13 20:36:31 +00:00
font-utils.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
get-page-files.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
get-route-from-entrypoint.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
htmlescape.ts Upgrade to Prettier 2 (#13061) 2020-05-18 15:24:37 -04:00
image-optimizer.ts Fix image optimization invalid internal upstream image (#34899) 2022-03-01 16:38:51 +00:00
incremental-cache.ts Update to leverage response-cache for image-optimizer (#34075) 2022-02-08 18:46:59 -05:00
load-components.ts Refactor export marks of server components (#34945) 2022-03-02 19:29:54 +01:00
next-server.ts Support colons in Middleware NextResponse.rewrite path (#32543) 2022-03-03 11:36:53 -08:00
next.ts Base Http for BaseServer (#32999) 2022-01-14 21:01:35 +00:00
node-polyfill-fetch.js Pre-compile more dependencies (#32742) 2022-01-17 15:17:22 +00:00
node-polyfill-web-streams.js Deprecate concurrentFeatures with runtime (#34068) 2022-02-08 14:16:46 +01:00
normalize-page-path.ts Fix dynamic routes with pages under index folder (#32440) 2021-12-13 20:36:31 +00:00
optimize-amp.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
render-result.ts Add unstable_useFlushEffects hook (#34117) 2022-02-18 00:18:28 +00:00
render.tsx Adopt react 18 rc1 (#34972) 2022-03-02 21:21:18 +00:00
request-meta.ts Ensure we don't poll page in development when notFound: true is returned (#34352) 2022-02-16 18:53:48 +00:00
require.ts Expose WASM bindings in Middleware (#34437) 2022-03-02 15:09:36 +00:00
response-cache.ts Handle de-duping revalidations in minimal mode (#34935) 2022-03-02 15:06:54 -08:00
router.ts Ensure non-matching API routes can be rewritten (#33966) 2022-03-01 15:53:25 -05:00
serve-static.ts Add support for AVIF to next/image (#29683) 2021-10-11 23:17:47 +00:00
server-route-utils.ts Fix encoding error with location and refresh headers (#33763) 2022-01-28 16:20:34 +00:00
utils.ts Refactor base server to remove native dependencies (#33499) 2022-01-20 21:25:44 +00:00
web-server.ts Add proper headers to responses in web server (#34723) 2022-02-24 12:43:22 +00:00