feat: we don't care about /Error/Dmp anymore

(it breaks all other URL parsing for something we never use anyway. just JMP this)
This commit is contained in:
rjindael 2023-09-08 17:06:06 -07:00
parent afd5d2aad1
commit 68fbc2d81a
No known key found for this signature in database
GPG Key ID: D069369C906CCF31
1 changed files with 1 additions and 7 deletions

View File

@ -140,14 +140,8 @@ std::string Helpers::getISOTimestamp()
std::pair<bool, std::map<std::string, std::string>> 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<std::string, std::string> map;
bool success = false;