Skip to content

Commit

Permalink
test: make rawRequest HTTP-compliant
Browse files Browse the repository at this point in the history
  • Loading branch information
dyladan committed Nov 30, 2023
1 parent 38db748 commit 470a2bf
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 470a2bf

Please sign in to comment.