GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — debugger: use `internal/url.URL` instead of `url.parse` · nodejs/node@6fcb51d

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib/internal/debugger
    • inspect_client.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/internal/debugger/inspect_client.js‎

Copy file name to clipboardExpand all lines: lib/internal/debugger/inspect_client.js
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const crypto = require('crypto');
1515
const { ERR_DEBUGGER_ERROR } = require('internal/errors').codes;
1616
const { EventEmitter } = require('events');
1717
const http = require('http');
18-
const URL = require('url');
18+
const { URL } = require('internal/url');
1919

2020
const debuglog = require('internal/util/debuglog').debuglog('inspect');
2121

@@ -297,7 +297,8 @@ class Client extends EventEmitter {
297297

298298
async _discoverWebsocketPath() {
299299
const { 0: { webSocketDebuggerUrl } } = await this._fetchJSON('/json');
300-
return URL.parse(webSocketDebuggerUrl).path;
300+
const { pathname, search } = new URL(webSocketDebuggerUrl);
301+
return `${pathname}${search}`;
301302
}
302303

303304
_connectWebsocket(urlPath) {

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.