From 6f18b947be6f0fac8f64bdd207cee5d19081db7f Mon Sep 17 00:00:00 2001 From: Deokjin Kim Date: Mon, 6 Mar 2023 09:29:27 +0900 Subject: [PATCH] doc: fix port of destination server is not defined in http2 `port` variable is used, but it's not defined in client code. So need to specify destination server(not proxy)'s port(8000) in client code. Refs: https://github.com/nodejs/node/blob/main/doc/api/http2.md#supporting-the-connect-method PR-URL: https://github.com/nodejs/node/pull/46940 Reviewed-By: Luigi Pinca Reviewed-By: Rafael Gonzaga Reviewed-By: Marco Ippolito --- doc/api/http2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/http2.md b/doc/api/http2.md index 61f2bd8ec8f1d9..5efcd5fdcbe421 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -3126,7 +3126,7 @@ const client = http2.connect('http://localhost:8001'); // for CONNECT requests or an error will be thrown. const req = client.request({ ':method': 'CONNECT', - ':authority': `localhost:${port}`, + ':authority': 'localhost:8000', }); req.on('response', (headers) => {