diff options
author | David Major <dmajor@mozilla.com> | 2015-10-06 10:58:50 -0400 |
---|---|---|
committer | Ted Mielczarek <ted@mielczarek.org> | 2015-10-06 11:05:12 -0400 |
commit | 7685dfc567dc45e523864a0e9177d003e1b46276 (patch) | |
tree | e0699555089d2d2be98abc35b6071ac1c7bdc559 /src/common/windows/http_upload.h | |
parent | Fix MSVC build (including on 2015), drop some workarounds for MSVC older than... (diff) | |
download | breakpad-7685dfc567dc45e523864a0e9177d003e1b46276.tar.xz |
Support for multiple upload files in CrashReportSender/HTTPUpload
A=David Major <dmajor@mozilla.com>
BUG=https://bugzilla.mozilla.org/show_bug.cgi?id=1048091
R=ted@mielczarek.org
Review URL: https://bugzilla.mozilla.org/show_bug.cgi?id=1048091 .
Diffstat (limited to 'src/common/windows/http_upload.h')
-rw-r--r-- | src/common/windows/http_upload.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/common/windows/http_upload.h b/src/common/windows/http_upload.h index e485b70e..f8d48cb1 100644 --- a/src/common/windows/http_upload.h +++ b/src/common/windows/http_upload.h @@ -54,9 +54,9 @@ using std::vector; class HTTPUpload { public: - // Sends the given set of parameters, along with the contents of - // upload_file, as a multipart POST request to the given URL. - // file_part_name contains the name of the file part of the request + // Sends the given sets of parameters and files as a multipart POST + // request to the given URL. + // Each key in |files| is the name of the file part of the request // (i.e. it corresponds to the name= attribute on an <input type="file">. // Parameter names must contain only printable ASCII characters, // and may not contain a quote (") character. @@ -67,8 +67,7 @@ class HTTPUpload { // received (or 0 if the request failed before getting an HTTP response). static bool SendRequest(const wstring &url, const map<wstring, wstring> ¶meters, - const wstring &upload_file, - const wstring &file_part_name, + const map<wstring, wstring> &files, int *timeout, wstring *response_body, int *response_code); @@ -88,12 +87,11 @@ class HTTPUpload { // Generates a HTTP request header for a multipart form submit. static wstring GenerateRequestHeader(const wstring &boundary); - // Given a set of parameters, an upload filename, and a file part name, + // Given a set of parameters, a set of upload files, and a file part name, // generates a multipart request body string with these parameters // and minidump contents. Returns true on success. static bool GenerateRequestBody(const map<wstring, wstring> ¶meters, - const wstring &upload_file, - const wstring &file_part_name, + const map<wstring, wstring> &files, const wstring &boundary, string *request_body); |