Skip to content

Commit

Permalink
refactor(response-stream): avoid creating object on log while parsing…
Browse files Browse the repository at this point in the history
… headers
  • Loading branch information
H4ad committed Feb 29, 2024
1 parent c853149 commit 1effcae
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/network/response-stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,12 @@ export class ServerlessStreamResponse extends ServerResponse {
endHeaderIndex,
);
const headers = parseHeaders(headerData);
log.debug('SERVERLESS_ADAPTER:RESPONSE_STREAM:FRAMEWORK_HEADERS', {
headers,
});
log.debug(
'SERVERLESS_ADAPTER:RESPONSE_STREAM:FRAMEWORK_HEADERS',
() => ({
headers,
}),
);

writesToIgnore = 1;
internalWritable = onReceiveHeaders(status, headers);
Expand Down

0 comments on commit 1effcae

Please sign in to comment.