From 470a2bf79b010e075ba53812b68d8309cbc9e186 Mon Sep 17 00:00:00 2001 From: Daniel Dyla Date: Thu, 30 Nov 2023 08:38:58 -0500 Subject: [PATCH] test: make rawRequest HTTP-compliant --- .../opentelemetry-instrumentation-http/test/utils/rawRequest.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/experimental/packages/opentelemetry-instrumentation-http/test/utils/rawRequest.ts b/experimental/packages/opentelemetry-instrumentation-http/test/utils/rawRequest.ts index c2fefa284a..dc00fabfad 100644 --- a/experimental/packages/opentelemetry-instrumentation-http/test/utils/rawRequest.ts +++ b/experimental/packages/opentelemetry-instrumentation-http/test/utils/rawRequest.ts @@ -22,7 +22,7 @@ export async function sendRequestTwice( port: number ): Promise { 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);