File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ export default async (request: Request) => {
100
100
101
101
// Contrary to the docs, this resolves when the headers are available, not when the stream closes.
102
102
// See https://github.com/fastly/http-compute-js/blob/main/src/http-compute-js/http-server.ts#L168-L173
103
- const response = await toComputeResponse ( resProxy )
103
+ let response = await toComputeResponse ( resProxy )
104
104
105
105
if ( requestContext . responseCacheKey ) {
106
106
span . setAttribute ( 'responseCacheKey' , requestContext . responseCacheKey )
@@ -121,7 +121,7 @@ export default async (request: Request) => {
121
121
// TODO: Remove once a fix has been rolled out.
122
122
if ( ( response . status > 300 && response . status < 400 ) || response . status >= 500 ) {
123
123
const body = await response . text ( )
124
- return new Response ( body || null , response )
124
+ response = new Response ( body || null , response )
125
125
}
126
126
127
127
const keepOpenUntilNextFullyRendered = new TransformStream ( {
You can’t perform that action at this time.
0 commit comments