From 68fbc2d81abfd25325d9ef4ae847fc15af7f02a0 Mon Sep 17 00:00:00 2001 From: rjindael Date: Fri, 8 Sep 2023 17:06:06 -0700 Subject: [PATCH] feat: we don't care about /Error/Dmp anymore (it breaks all other URL parsing for something we never use anyway. just JMP this) --- Kiseki.Patcher/Source/Helpers.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Kiseki.Patcher/Source/Helpers.cpp b/Kiseki.Patcher/Source/Helpers.cpp index 31a35cd..dbf43bd 100644 --- a/Kiseki.Patcher/Source/Helpers.cpp +++ b/Kiseki.Patcher/Source/Helpers.cpp @@ -140,14 +140,8 @@ std::string Helpers::getISOTimestamp() std::pair> Helpers::parseURL(const std::string url) { - // This is an ugly hack to url-encode the query before CURL actually parses the URL. - // We do this because CURL throws a fit if the query is not properly URL encoded; so URLs such as "/Error/Dmp.ashx?filename=C:/Users/..." won't parse correctly. - char* encodedQuery = curl_escape(url.substr(url.find("?") + 1).c_str(), url.substr(url.find("?") + 1).length()); - std::string encodedUrl = url.substr(0, url.find("?")) + encodedQuery; - curl_free(encodedQuery); - CURLU* curl = curl_url(); - CURLUcode result = curl_url_set(curl, CURLUPART_URL, encodedUrl.c_str(), 0); + CURLUcode result = curl_url_set(curl, CURLUPART_URL, url.c_str(), 0); std::map map; bool success = false;