From 110fdc1157d94f5d787a21c60163681767fdd6c4 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 9 Jan 2024 13:13:23 +0300 Subject: more strict constructor of MHttpRequest to avoid quirks --- protocols/MinecraftDynmap/src/communication.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'protocols/MinecraftDynmap/src') diff --git a/protocols/MinecraftDynmap/src/communication.cpp b/protocols/MinecraftDynmap/src/communication.cpp index f7094c80f6..c09d069a83 100644 --- a/protocols/MinecraftDynmap/src/communication.cpp +++ b/protocols/MinecraftDynmap/src/communication.cpp @@ -24,7 +24,7 @@ along with this program. If not, see . MHttpResponse* MinecraftDynmapProto::sendRequest(const int request_type, std::string *post_data, std::string *get_data) { // Prepare the request - MHttpRequest nlhr; + MHttpRequest nlhr(REQUEST_GET); // FIXME: get server @@ -40,7 +40,6 @@ MHttpResponse* MinecraftDynmapProto::sendRequest(const int request_type, std::st nlhr.requestType = REQUEST_POST; nlhr.SetData(post_data->c_str(), post_data->length()); } - else nlhr.requestType = REQUEST_GET; // Set headers - it depends on requestType so it must be after setting that if (request_type == REQUEST_POST) -- cgit v1.2.3