Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
*.out
.DS_Store
pagezero.txt
sortedlinks.txt
ysortedlinks.txt
.vscode/
restful_server.dSYM/
Binary file removed mongoose/restful_server
Binary file not shown.
131 changes: 0 additions & 131 deletions mongoose/restful_server.c

This file was deleted.

4 changes: 3 additions & 1 deletion mongoose/restful_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ static void handle_sum_call(struct mg_connection *nc, struct http_message *hm) {
string str = "{ \"result\": [";
for(int i = 0;i < result.size() && i < 8;i++){
if(i != 0)str += ",";
str += "\"" + v[result[i].second] + "\"";
string se = v[result[i].second];
se = se.substr(1,se.size()-2);
str += "\"" + se + "\"";
}
str += "] }";
mg_printf_http_chunk(nc, "%s", str.c_str());
Expand Down
Binary file not shown.