summaryrefslogtreecommitdiff
path: root/protocols/MinecraftDynmap/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-01-09 13:13:23 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-01-09 13:13:23 +0300
commit110fdc1157d94f5d787a21c60163681767fdd6c4 (patch)
tree3a401fa5b6d10e397784f4a7aa1cda38beee9fb9 /protocols/MinecraftDynmap/src
parent74c01c7fb7862ec01ad27c4b225b08b7aa0f3b0a (diff)
more strict constructor of MHttpRequest to avoid quirks
Diffstat (limited to 'protocols/MinecraftDynmap/src')
-rw-r--r--protocols/MinecraftDynmap/src/communication.cpp3
1 files changed, 1 insertions, 2 deletions
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 <http://www.gnu.org/licenses/>.
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)