File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 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) => {
100100
101101 // Contrary to the docs, this resolves when the headers are available, not when the stream closes.
102102 // 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 )
104104
105105 if ( requestContext . responseCacheKey ) {
106106 span . setAttribute ( 'responseCacheKey' , requestContext . responseCacheKey )
@@ -121,7 +121,7 @@ export default async (request: Request) => {
121121 // TODO: Remove once a fix has been rolled out.
122122 if ( ( response . status > 300 && response . status < 400 ) || response . status >= 500 ) {
123123 const body = await response . text ( )
124- return new Response ( body || null , response )
124+ response = new Response ( body || null , response )
125125 }
126126
127127 const keepOpenUntilNextFullyRendered = new TransformStream ( {
You can’t perform that action at this time.
0 commit comments