Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: replaced writeHead with socket.write
  • Loading branch information
marco-ippolito committed Nov 23, 2022
commit 07216533c68f2f7fe0de743d554bcf152d75a3b6
5 changes: 4 additions & 1 deletion test/parallel/test-domain-multi.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ const server = http.createServer((req, res) => {

b.on('error', common.mustCall((er) => {
if (res) {
res.writeHead(500);
// Introduce an error on the client by writing unexpected data.
// The client is now expecting a chunk header so any letter will
// have the parser throw an error.
res.socket.write('H');
res.end('An error occurred');
}
// res.writeHead(500), res.destroy, etc.
Expand Down