1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-12 16:58:39 +00:00

Print announce error response (#11878)

Fix HTTPFetch caller and request ID to 64 bits
Check that allocated caller ID is not DISCARD
Print body if serverlist request returns error
Don't print control characters from HTTP responses
Document special HTTPFetch caller IDs
Allow unicode to be printed
This commit is contained in:
ShadowNinja 2022-01-01 16:44:56 -05:00 committed by GitHub
parent 544b9d5c72
commit 29d2b2ccd0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 73 additions and 36 deletions

View file

@ -97,6 +97,7 @@ void sendAnnounce(AnnounceAction action,
}
HTTPFetchRequest fetch_request;
fetch_request.caller = HTTPFETCH_PRINT_ERR;
fetch_request.url = g_settings->get("serverlist_url") + std::string("/announce");
fetch_request.method = HTTP_POST;
fetch_request.fields["json"] = fastWriteJson(server);