Skip to content

Commit 4517276

Browse files
joshgavaddaleax
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 08a7e7b commit 4517276

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
@@ -64,7 +64,7 @@ std::string MapToString(const std::map<std::string, std::string> object) {
6464
json << name_value.second << "\"";
6565
first = false;
6666
}
67-
json << "\n} ]";
67+
json << "\n} ]\n\n";
6868
return json.str();
6969
}
7070

@@ -250,7 +250,7 @@ class AgentImpl {
250250
void WaitForFrontendMessage();
251251
void NotifyMessageReceived();
252252
State ToState(State state);
253-
void SendTargentsListResponse(InspectorSocket* socket);
253+
void SendListResponse(InspectorSocket* socket);
254254
bool RespondToGet(InspectorSocket* socket, const std::string& path);
255255

256256
uv_sem_t start_sem_;
@@ -677,7 +677,7 @@ void AgentImpl::OnRemoteDataIO(InspectorSocket* socket,
677677
}
678678
}
679679

680-
void AgentImpl::SendTargentsListResponse(InspectorSocket* socket) {
680+
void AgentImpl::SendListResponse(InspectorSocket* socket) {
681681
std::map<std::string, std::string> response;
682682
response["description"] = "node.js instance";
683683
response["faviconUrl"] = "https://nodejs.org/static/favicon.ico";
@@ -710,7 +710,7 @@ bool AgentImpl::RespondToGet(InspectorSocket* socket, const std::string& path) {
710710
return false;
711711

712712
if (match_path_segment(command, "list") || command[0] == '\0') {
713-
SendTargentsListResponse(socket);
713+
SendListResponse(socket);
714714
return true;
715715
} else if (match_path_segment(command, "protocol")) {
716716
SendProtocolJson(socket);

0 commit comments

Comments
 (0)