aboutsummaryrefslogtreecommitdiff
path: root/src/common/linux/http_upload.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/linux/http_upload.cc')
-rw-r--r--src/common/linux/http_upload.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/common/linux/http_upload.cc b/src/common/linux/http_upload.cc
index 4492fe84..d49f2276 100644
--- a/src/common/linux/http_upload.cc
+++ b/src/common/linux/http_upload.cc
@@ -56,7 +56,8 @@ static const char kUserAgent[] = "Breakpad/1.0 (Linux)";
// static
bool HTTPUpload::SendRequest(const string &url,
const map<string, string> &parameters,
- const map<string, string> &files,
+ const string &upload_file,
+ const string &file_part_name,
const string &proxy,
const string &proxy_user_pwd,
const string &ca_certificate_file,
@@ -134,13 +135,11 @@ bool HTTPUpload::SendRequest(const string &url,
CURLFORM_COPYCONTENTS, iter->second.c_str(),
CURLFORM_END);
- // Add form files.
- for (iter = files.begin(); iter != files.end(); ++iter) {
- (*curl_formadd)(&formpost, &lastptr,
- CURLFORM_COPYNAME, iter->first.c_str(),
- CURLFORM_FILE, iter->second.c_str(),
- CURLFORM_END);
- }
+ // Add form file.
+ (*curl_formadd)(&formpost, &lastptr,
+ CURLFORM_COPYNAME, file_part_name.c_str(),
+ CURLFORM_FILE, upload_file.c_str(),
+ CURLFORM_END);
(*curl_easy_setopt)(curl, CURLOPT_HTTPPOST, formpost);