From 1c039bab775b64ce7916825c9c73aa4430fc830a Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 14 Sep 2011 06:45:04 +0000 Subject: [PATCH] - client: curl_easy_escape() escapes way too much. Just escape spaces. svn path=/trunk/boinc/; revision=24205 --- checkin_notes | 6 ++++++ client/http_curl.cpp | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/checkin_notes b/checkin_notes index 09a514e881..1c4c973942 100644 --- a/checkin_notes +++ b/checkin_notes @@ -6007,3 +6007,9 @@ David 13 Sept 2011 procinfo.cpp client/ http_curl.cpp + +David 13 Sept 2011 + - client: curl_easy_escape() escapes way too much. Just escape spaces. + + client/ + http_curl.cpp diff --git a/client/http_curl.cpp b/client/http_curl.cpp index a7902574d2..3fab2149b8 100644 --- a/client/http_curl.cpp +++ b/client/http_curl.cpp @@ -422,9 +422,9 @@ int HTTP_OP::libcurl_exec( // the following seems to be a no-op // curl_easy_setopt(curlEasy, CURLOPT_ERRORBUFFER, error_msg); - char* esc_url = curl_easy_escape(curlEasy, m_url, 0); + char esc_url[1024]; + string_substitute(m_url, esc_url, sizeof(esc_url), " ", "%20"); curl_easy_setopt(curlEasy, CURLOPT_URL, esc_url); - curl_free(esc_url); // This option determines whether curl verifies that the server // claims to be who you want it to be.