From c38a2581027e071addafce90ae924f2f25b3c7da Mon Sep 17 00:00:00 2001 From: Edo Date: Tue, 22 Nov 2022 21:02:10 +0000 Subject: [PATCH] [WebIO]: Fix Crash (#580) --- src/Utils/WebIO.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Utils/WebIO.cpp b/src/Utils/WebIO.cpp index b449226c..645b77c9 100644 --- a/src/Utils/WebIO.cpp +++ b/src/Utils/WebIO.cpp @@ -279,9 +279,9 @@ namespace Utils return {}; } - if (const auto itr = headers.find("Content-Type"); itr == headers.end()) + if (!headers.contains("Content-Type")) { - itr->second = "application/x-www-form-urlencoded"; + headers["Content-Type"] = "application/x-www-form-urlencoded"; } std::string finalHeaders;