From 05d61dfd83feadda4e649111a85728ff8111d924 Mon Sep 17 00:00:00 2001 From: "mark@chromium.org" Date: Fri, 11 May 2012 14:12:43 +0000 Subject: 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 Review URL: https://breakpad.appspot.com/387003/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@963 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/common/mac/HTTPMultipartUpload.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/common') 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"]; -- cgit v1.2.1