File tree 1 file changed +0
-11
lines changed
1 file changed +0
-11
lines changed Original file line number Diff line number Diff line change @@ -113,17 +113,6 @@ export default async (request: Request) => {
113
113
setVaryHeaders ( response . headers , request , nextConfig )
114
114
setCacheStatusHeader ( response . headers )
115
115
116
- // Temporary workaround for an issue where sending a response with an empty
117
- // body causes an unhandled error. This doesn't catch everything, but redirects are the
118
- // most common case of sending empty bodies. We can't check it directly because these are streams.
119
- // The side effect is that responses which do contain data will not be streamed to the client,
120
- // but that's fine for redirects.
121
- // TODO: Remove once a fix has been rolled out.
122
- if ( ( response . status > 300 && response . status < 400 ) || response . status >= 500 ) {
123
- const body = await response . text ( )
124
- return new Response ( body || null , response )
125
- }
126
-
127
116
const keepOpenUntilNextFullyRendered = new TransformStream ( {
128
117
async flush ( ) {
129
118
// it's important to keep the stream open until the next handler has finished
You can’t perform that action at this time.
0 commit comments