mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
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 <luigipinca@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
This commit is contained in:
1 parent
1b555ae72d
commit
6f18b947be
1 file changed
+1
-1
+1
-1
@@ -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) => {
|
||||
|
||||
Reference in new issue
Block a user