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

+1-1
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)