From f9fd53d82ddecef556916fafe3dc7bf0a64baef4 Mon Sep 17 00:00:00 2001 From: Josh Gavant Date: Mon, 14 Nov 2016 15:22:48 -0800 Subject: [PATCH] src: fix method name, output format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add additional newline to HTTP GET JSON responses * SendTargentsListResponse -> SendListResponse PR-URL: https://github.com/nodejs/node/pull/9627 Reviewed-By: James M Snell Reviewed-By: Michaƫl Zasso Reviewed-By: Anna Henningsen --- src/inspector_agent.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/inspector_agent.cc b/src/inspector_agent.cc index 11ee568b5e2dd2..21fa2cf7c1bc20 100644 --- a/src/inspector_agent.cc +++ b/src/inspector_agent.cc @@ -66,7 +66,7 @@ std::string MapToString(const std::map object) { json << name_value.second << "\""; first = false; } - json << "\n} ]"; + json << "\n} ]\n\n"; return json.str(); } @@ -219,7 +219,7 @@ class AgentImpl { void WaitForFrontendMessage(); void NotifyMessageReceived(); State ToState(State state); - void SendTargentsListResponse(InspectorSocket* socket); + void SendListResponse(InspectorSocket* socket); bool RespondToGet(InspectorSocket* socket, const std::string& path); uv_sem_t start_sem_; @@ -639,7 +639,7 @@ void AgentImpl::OnRemoteDataIO(InspectorSocket* socket, } } -void AgentImpl::SendTargentsListResponse(InspectorSocket* socket) { +void AgentImpl::SendListResponse(InspectorSocket* socket) { std::map response; response["description"] = "node.js instance"; response["faviconUrl"] = "https://nodejs.org/static/favicon.ico"; @@ -673,7 +673,7 @@ bool AgentImpl::RespondToGet(InspectorSocket* socket, const std::string& path) { return false; if (match_path_segment(command, "list") || command[0] == '\0') { - SendTargentsListResponse(socket); + SendListResponse(socket); return true; } else if (match_path_segment(command, "protocol")) { SendProtocolJson(socket);