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 <luigipinca@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
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

Lines changed: 1 addition & 1 deletion
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)
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