Skip to content

Commit 17a25f1

Browse files
deokjinkimdanielleadams
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 <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Marco Ippolito <[email protected]>
1 parent ad06168 commit 17a25f1

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
@@ -3112,7 +3112,7 @@ const client = http2.connect('http://localhost:8001');
31123112
// for CONNECT requests or an error will be thrown.
31133113
const req = client.request({
31143114
':method': 'CONNECT',
3115-
':authority': `localhost:${port}`,
3115+
':authority': 'localhost:8000',
31163116
});
31173117

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

0 commit comments

Comments
 (0)