Skip to content

Commit 6f18b94

Browse files
deokjinkimtargos
authored andcommitted
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: #46940 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
1 parent 1b555ae commit 6f18b94

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/api/http2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3126,7 +3126,7 @@ const client = http2.connect('http://localhost:8001');
31263126
// for CONNECT requests or an error will be thrown.
31273127
const req = client.request({
31283128
':method': 'CONNECT',
3129-
':authority': `localhost:${port}`,
3129+
':authority': 'localhost:8000',
31303130
});
31313131

31323132
req.on('response', (headers) => {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy