rsnext/packages/next/server
Michiel Van Gendt d22ecd97f4
Include message body in redirect responses (#25257)
### Description
The redirect responses from the redirect function do not contain a message body. This is in conflict with the RFCs below and causes Traefik (a reverse proxy) to invalidate the responses. In this pull request, I add a response body to the redirect responses.

### References
- https://datatracker.ietf.org/doc/html/rfc7230#section-3.3
> All 1xx (Informational), 204 (No Content), and 304 (Not Modified) responses must not include a message-body. All other responses do include a message-body, although the body may be of zero length.

- https://datatracker.ietf.org/doc/html/rfc7231#section-6.4.3
> The server's response payload usually contains a short hypertext note with a hyperlink to the different URI(s).

- traefik/traefik#4456
- https://github.com/auth0/nextjs-auth0/pull/399
2021-07-09 16:32:48 +00:00
..
dev Add initial ResponsePayload support (#26938) 2021-07-06 09:41:51 +00:00
lib Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
api-utils.ts Include message body in redirect responses (#25257) 2021-07-09 16:32:48 +00:00
config-shared.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
config-utils-worker.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
config-utils.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
config.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02: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 Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02: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-config.ts Rename next/image dangerously-unoptimized to custom and warn when applicable (#26998) 2021-07-08 19:35:19 +00:00
image-optimizer.ts Add additional tests for image type detection (#26832) 2021-07-01 20:53:26 +00:00
incremental-cache.ts More explicit typing for IncrementalCache API (#26941) 2021-07-06 15:45:49 +00:00
load-components.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
next-server.ts Fix merge issue and use respondWith (#26961) 2021-07-06 13:34:50 -05:00
next.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
node-polyfill-fetch.js Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
normalize-page-path.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
optimize-amp.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
render.tsx Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
require.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
router.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
send-payload.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
serve-static.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
utils.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00