aboutsummaryrefslogtreecommitdiff
path: root/src/common/mac
diff options
context:
space:
mode:
authormark@chromium.org <mark@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2012-05-11 14:12:43 +0000
committermark@chromium.org <mark@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2012-05-11 14:12:43 +0000
commit05d61dfd83feadda4e649111a85728ff8111d924 (patch)
tree217db6975bc8fb6334bddeb76ef8ed0012145f2b /src/common/mac
parentFix warning in r961 - C4800 (diff)
downloadbreakpad-05d61dfd83feadda4e649111a85728ff8111d924.tar.xz
Bits necessary to send the reports along with the minidumps.
Currently the log file and the minidump are uploaded in two consequent requests, thus they get different report ids and it's hard to associate them to each other. This CL makes the crash uploader send the minidump and the log file together in a single multipart request, so that they have the same report id and are accessible from the same landing page. Patch by Alexander Potapenko <glider@chromium.org> Review URL: https://breakpad.appspot.com/387003/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@963 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/common/mac')
-rw-r--r--src/common/mac/HTTPMultipartUpload.m5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/common/mac/HTTPMultipartUpload.m b/src/common/mac/HTTPMultipartUpload.m
index 1316b8e0..4b008f5c 100644
--- a/src/common/mac/HTTPMultipartUpload.m
+++ b/src/common/mac/HTTPMultipartUpload.m
@@ -67,7 +67,7 @@
NSString *fmt = @"--%@\r\nContent-Disposition: form-data; name=\"%@\"; "
"filename=\"minidump.dmp\"\r\nContent-Type: application/octet-stream\r\n\r\n";
NSString *pre = [NSString stringWithFormat:fmt, boundary_, escaped];
- NSString *post = [NSString stringWithFormat:@"\r\n--%@--\r\n", boundary_];
+ NSString *post = [NSString stringWithFormat:@"\r\n--%@\r\n", boundary_];
[data appendData:[pre dataUsingEncoding:NSUTF8StringEncoding]];
[data appendData:contents];
@@ -182,6 +182,9 @@
[postBody appendData:fileData];
}
+ NSString *epilogue = [NSString stringWithFormat:@"\r\n--%@--\r\n", boundary_];
+ [postBody appendData:[epilogue dataUsingEncoding:NSUTF8StringEncoding]];
+
[req setHTTPBody:postBody];
[req setHTTPMethod:@"POST"];