mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2026-01-05 05:58:24 +01:00
Improvements for Windows client/tool-side code. r=bryner
- Allow Windows sender to use https (#41). - HTTPUpload not proxy-friendly (#46). - Check http status codes (sort of #44). - Allow symupload to work with versionless files (prints a warning, server may still reject). http://groups.google.com/group/airbag-dev/browse_thread/thread/5a12a72dffc5999c git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@41 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
181f307ffe
commit
5afd60b067
2 changed files with 32 additions and 14 deletions
|
|
@ -148,12 +148,6 @@ int wmain(int argc, wchar_t *argv[]) {
|
|||
const wchar_t *module = argv[1], *url = argv[2];
|
||||
wstring module_basename = GetBaseName(module);
|
||||
|
||||
wstring file_version;
|
||||
if (!GetFileVersionString(module, &file_version)) {
|
||||
fwprintf(stderr, L"Could not get file version for %s\n", module);
|
||||
return 1;
|
||||
}
|
||||
|
||||
wstring symbol_file, module_guid;
|
||||
if (!DumpSymbolsToTempFile(module, &symbol_file, &module_guid)) {
|
||||
fwprintf(stderr, L"Could not get symbol data from %s\n", module);
|
||||
|
|
@ -162,9 +156,17 @@ int wmain(int argc, wchar_t *argv[]) {
|
|||
|
||||
map<wstring, wstring> parameters;
|
||||
parameters[L"module"] = module_basename;
|
||||
parameters[L"version"] = file_version;
|
||||
parameters[L"guid"] = module_guid;
|
||||
|
||||
// Don't make a missing version a hard error. Issue a warning, and let the
|
||||
// server decide whether to reject files without versions.
|
||||
wstring file_version;
|
||||
if (GetFileVersionString(module, &file_version)) {
|
||||
parameters[L"version"] = file_version;
|
||||
} else {
|
||||
fwprintf(stderr, L"Warning: Could not get file version for %s\n", module);
|
||||
}
|
||||
|
||||
bool success = HTTPUpload::SendRequest(url, parameters,
|
||||
symbol_file, L"symbol_file");
|
||||
_wunlink(symbol_file.c_str());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue