diff options
author | Eugene Ostroukhov <eostroukhov@google.com> | 2018-03-05 19:18:17 -0800 |
---|---|---|
committer | Eugene Ostroukhov <eostroukhov@google.com> | 2018-04-02 10:20:30 -0700 |
commit | a9a1f12b4212c0ea81a04bf2eb56efe6f8a4699b (patch) | |
tree | b2a5827e9285f40d1e056d603ad2bd2b1e3e3769 /test/cctest | |
parent | 6de1a12e496b58b1ab1c150b3cee8a8d45040edb (diff) | |
download | android-node-v8-a9a1f12b4212c0ea81a04bf2eb56efe6f8a4699b.tar.gz android-node-v8-a9a1f12b4212c0ea81a04bf2eb56efe6f8a4699b.tar.bz2 android-node-v8-a9a1f12b4212c0ea81a04bf2eb56efe6f8a4699b.zip |
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 <timothygu99@gmail.com>
Diffstat (limited to 'test/cctest')
-rw-r--r-- | test/cctest/test_inspector_socket.cc | 4 |
1 files changed, 2 insertions, 2 deletions
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); |