Skip to content

Commit edd8f6e

Browse files
committed
http: fixed invalid path with connect method
Fixes: nodejs#34347
1 parent 861a54c commit edd8f6e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎lib/_http_client.js‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,9 @@ function ClientRequest(input, options, cb) {
197197
}
198198
this.insecureHTTPParser = insecureHTTPParser;
199199

200+
options.path = method === 'CONNECT' && options.path.charAt(0) === '/' ?
201+
options.path.slice(1) : options.path;
202+
200203
this.path = options.path || '/';
201204
if (cb) {
202205
this.once('response', cb);

0 commit comments

Comments
 (0)