Skip to content

Commit cf5a00e

Browse files
Eugene OstroukhovMyles Borins
Eugene Ostroukhov
authored and
Myles Borins
committed
inspector: do not prompt to use localhost
There are multiple reports of Windows7 not being able to resolve localhost on some setups (web search also confirms that). This change will advertise "127.0.0.1" as inspector host name. Fixes: #9382 Fixes: #9188 PR-URL: #9451 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 0216dbe commit cf5a00e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/inspector_agent.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ static const uint8_t PROTOCOL_JSON[] = {
4040

4141
std::string GetWsUrl(int port, const std::string& id) {
4242
char buf[1024];
43-
snprintf(buf, sizeof(buf), "localhost:%d/%s", port, id.c_str());
43+
snprintf(buf, sizeof(buf), "127.0.0.1:%d/%s", port, id.c_str());
4444
return buf;
4545
}
4646

test/inspector/test-inspector.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function checkListResponse(err, response) {
1111
assert.ok(response[0]['devtoolsFrontendUrl']);
1212
assert.ok(
1313
response[0]['webSocketDebuggerUrl']
14-
.match(/ws:\/\/localhost:\d+\/[0-9A-Fa-f]{8}-/));
14+
.match(/ws:\/\/127.0.0.1:\d+\/[0-9A-Fa-f]{8}-/));
1515
}
1616

1717
function checkVersion(err, response) {

0 commit comments

Comments
 (0)