Skip to content

Commit

Permalink
Merge pull request #4335 from dyladan/node-20-test
Browse files Browse the repository at this point in the history
test: make rawRequest HTTP-compliant
  • Loading branch information
dyladan authored Nov 30, 2023
2 parents cc4ff2d + 0a52166 commit 593d220
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export async function sendRequestTwice(
port: number
): Promise<Buffer> {
return new Promise((resolve, reject) => {
const request = 'GET /raw HTTP/1.1\n\n';
const request = `GET /raw HTTP/1.1\r\nHost: ${host}:${port}\r\n\r\n`;
const socket = net.createConnection({ host, port }, () => {
socket.write(`${request}${request}`, err => {
if (err) reject(err);
Expand Down

0 comments on commit 593d220

Please sign in to comment.