diff options
author | qsr@chromium.org <qsr@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2012-05-15 15:41:08 +0000 |
---|---|---|
committer | qsr@chromium.org <qsr@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2012-05-15 15:41:08 +0000 |
commit | d3ad7c4c99dd9a7f5fa902dc7a17e4787490dacc (patch) | |
tree | 7da321bb946799b60c79a22bdb44c4620ddcbd87 /src | |
parent | Unprotect the allocator before trying to create a minidump from a signal. (diff) | |
download | breakpad-d3ad7c4c99dd9a7f5fa902dc7a17e4787490dacc.tar.xz |
Fixing HTTPMultipartUpload.
The ending boundary for multipart must replace the last boundary, not added
after it.
Review URL: https://breakpad.appspot.com/390002
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@965 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src')
-rw-r--r-- | src/common/mac/HTTPMultipartUpload.m | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/mac/HTTPMultipartUpload.m b/src/common/mac/HTTPMultipartUpload.m index 4b008f5c..76f38f8a 100644 --- a/src/common/mac/HTTPMultipartUpload.m +++ b/src/common/mac/HTTPMultipartUpload.m @@ -32,6 +32,8 @@ @interface HTTPMultipartUpload(PrivateMethods) - (NSString *)multipartBoundary; +// Each of the following methods will append the starting multipart boundary, +// but not the ending one. - (NSData *)formDataForKey:(NSString *)key value:(NSString *)value; - (NSData *)formDataForFileContents:(NSData *)contents name:(NSString *)name; - (NSData *)formDataForFile:(NSString *)file name:(NSString *)name; @@ -67,11 +69,9 @@ 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_]; [data appendData:[pre dataUsingEncoding:NSUTF8StringEncoding]]; [data appendData:contents]; - [data appendData:[post dataUsingEncoding:NSUTF8StringEncoding]]; return data; } |