From a9a1f12b4212c0ea81a04bf2eb56efe6f8a4699b Mon Sep 17 00:00:00 2001 From: Eugene Ostroukhov Date: Mon, 5 Mar 2018 19:18:17 -0800 Subject: inspector: report client-visible host and port Node instance may not know the real host and port user sees when debug frontend connects through the SSH tunnel. This change fixes '/json/list' response by using the value client provided in the host header. PR-URL: https://github.com/nodejs/node/pull/19664 Reviewed-By: Tiancheng "Timothy" Gu --- test/cctest/test_inspector_socket.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/cctest') diff --git a/test/cctest/test_inspector_socket.cc b/test/cctest/test_inspector_socket.cc index ae6e1231c4..b96489db1f 100644 --- a/test/cctest/test_inspector_socket.cc +++ b/test/cctest/test_inspector_socket.cc @@ -112,11 +112,11 @@ class TestInspectorDelegate : public InspectorSocket::Delegate { delegate = nullptr; } - void OnHttpGet(const std::string& path) override { + void OnHttpGet(const std::string& host, const std::string& path) override { process(kInspectorHandshakeHttpGet, path); } - void OnSocketUpgrade(const std::string& path, + void OnSocketUpgrade(const std::string& host, const std::string& path, const std::string& ws_key) override { ws_key_ = ws_key; process(kInspectorHandshakeUpgraded, path); -- cgit v1.2.3