From 11a53729614e3a0fafb5e580d4146d0208a9c990 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 14 Sep 2011 05:44:09 +0000 Subject: [PATCH] - client: escape URLs for curl, otherwise filenames with spaces don't work svn path=/trunk/boinc/; revision=24204 --- checkin_notes | 8 ++++++++ client/http_curl.cpp | 4 +++- lib/procinfo.cpp | 2 -- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/checkin_notes b/checkin_notes index c368be6a40..09a514e881 100644 --- a/checkin_notes +++ b/checkin_notes @@ -5999,3 +5999,11 @@ Rom 14 Sept 2011 samples/vboxwrapper/ vbox.cpp, .h vboxwrapper.cpp + +David 13 Sept 2011 + - client: escape URLs for curl, otherwise filenames with spaces don't work + + lib/ + procinfo.cpp + client/ + http_curl.cpp diff --git a/client/http_curl.cpp b/client/http_curl.cpp index 0c4b7a903c..a7902574d2 100644 --- a/client/http_curl.cpp +++ b/client/http_curl.cpp @@ -422,7 +422,9 @@ int HTTP_OP::libcurl_exec( // the following seems to be a no-op // curl_easy_setopt(curlEasy, CURLOPT_ERRORBUFFER, error_msg); - curl_easy_setopt(curlEasy, CURLOPT_URL, m_url); + char* esc_url = curl_easy_escape(curlEasy, m_url, 0); + 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. diff --git a/lib/procinfo.cpp b/lib/procinfo.cpp index d5e7e65134..6a6ceeb58e 100644 --- a/lib/procinfo.cpp +++ b/lib/procinfo.cpp @@ -36,8 +36,6 @@ using std::vector; // Scan the process table adding in CPU time and mem usage. -// Loop thru entire table as the entries aren't in order. -// Recurse at most 4 times to get additional child processes // void add_child_totals(PROCINFO& pi, PROC_MAP& pm, PROC_MAP::iterator i) { PROCINFO parent = i->second;