Skip to content

Commit f9fd53d

Browse files
joshgavMylesBorins
authored andcommitted
src: fix method name, output format
* add additional newline to HTTP GET JSON responses * SendTargentsListResponse -> SendListResponse PR-URL: #9627 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
1 parent cbea672 commit f9fd53d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/inspector_agent.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ std::string MapToString(const std::map<std::string, std::string> object) {
6666
json << name_value.second << "\"";
6767
first = false;
6868
}
69-
json << "\n} ]";
69+
json << "\n} ]\n\n";
7070
return json.str();
7171
}
7272

@@ -219,7 +219,7 @@ class AgentImpl {
219219
void WaitForFrontendMessage();
220220
void NotifyMessageReceived();
221221
State ToState(State state);
222-
void SendTargentsListResponse(InspectorSocket* socket);
222+
void SendListResponse(InspectorSocket* socket);
223223
bool RespondToGet(InspectorSocket* socket, const std::string& path);
224224

225225
uv_sem_t start_sem_;
@@ -639,7 +639,7 @@ void AgentImpl::OnRemoteDataIO(InspectorSocket* socket,
639639
}
640640
}
641641

642-
void AgentImpl::SendTargentsListResponse(InspectorSocket* socket) {
642+
void AgentImpl::SendListResponse(InspectorSocket* socket) {
643643
std::map<std::string, std::string> response;
644644
response["description"] = "node.js instance";
645645
response["faviconUrl"] = "https://nodejs.org/static/favicon.ico";
@@ -673,7 +673,7 @@ bool AgentImpl::RespondToGet(InspectorSocket* socket, const std::string& path) {
673673
return false;
674674

675675
if (match_path_segment(command, "list") || command[0] == '\0') {
676-
SendTargentsListResponse(socket);
676+
SendListResponse(socket);
677677
return true;
678678
} else if (match_path_segment(command, "protocol")) {
679679
SendProtocolJson(socket);

0 commit comments

Comments
 (0)