From 5dfda0c5280dff6d94d5d15e7d16a13e52ae0645 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tam=C3=A1s=20B=C3=A1lint=20Misius?= Date: Tue, 21 Jan 2020 22:54:52 +0100 Subject: [PATCH] Only make the request a POST if POST parameters are present This is a compatibility thing, eww. This also fixes handling ptsave from the command line. --- src/client/http/Request.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/client/http/Request.cpp b/src/client/http/Request.cpp index 8698958a4..3f38a74c5 100644 --- a/src/client/http/Request.cpp +++ b/src/client/http/Request.cpp @@ -330,7 +330,10 @@ namespace http ByteString Request::SimpleAuth(ByteString uri, int *status, ByteString ID, ByteString session, std::map post_data) { Request *request = new Request(uri); - request->AddPostData(post_data); + if (!post_data.empty()) + { + request->AddPostData(post_data); + } request->AuthHeaders(ID, session); request->Start(); return request->Finish(status);