Fix Mac symupload non-XCode builds.

Change-Id: Ic4924032faba83fc14f62feaac9a97bbfd0971ed
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2324311
Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
Nelson Billing 2020-07-29 16:28:25 -07:00
parent 28d7cbdd42
commit a740aa2625
17 changed files with 426 additions and 404 deletions

View file

@ -1,4 +1,4 @@
// Copyright (c) 2019, Google Inc. // Copyright (c) 2020, Google Inc.
// All rights reserved. // All rights reserved.
// //
// Redistribution and use in source and binary forms, with or without // Redistribution and use in source and binary forms, with or without

View file

@ -1,4 +1,4 @@
// Copyright (c) 2019, Google Inc. // Copyright (c) 2020, Google Inc.
// All rights reserved. // All rights reserved.
// //
// Redistribution and use in source and binary forms, with or without // Redistribution and use in source and binary forms, with or without

View file

@ -27,39 +27,37 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import "HTTPRequest.h" #import "HTTPRequest.h"
/** /**
Represents a multipart/form-data HTTP upload (POST request). Represents a multipart/form-data HTTP upload (POST request).
Each parameter pair is sent as a boundary. Each parameter pair is sent as a boundary.
Each file is sent with a name field in addition to the filename and data. Each file is sent with a name field in addition to the filename and data.
*/ */
@interface HTTPMultipartUpload : HTTPRequest { @interface HTTPMultipartUpload : HTTPRequest {
@protected @protected
NSDictionary *parameters_; // The key/value pairs for sending data (STRONG) NSDictionary* parameters_; // The key/value pairs for sending data (STRONG)
NSMutableDictionary *files_; // Dictionary of name/file-path (STRONG) NSMutableDictionary* files_; // Dictionary of name/file-path (STRONG)
NSString *boundary_; // The boundary string (STRONG) NSString* boundary_; // The boundary string (STRONG)
} }
/** /**
Sets the parameters that will be sent in the multipart POST request. Sets the parameters that will be sent in the multipart POST request.
*/ */
- (void)setParameters:(NSDictionary *)parameters; - (void)setParameters:(NSDictionary*)parameters;
- (NSDictionary *)parameters; - (NSDictionary*)parameters;
/** /**
Adds a file to be uploaded in the multipart POST request, by its file path. Adds a file to be uploaded in the multipart POST request, by its file path.
*/ */
- (void)addFileAtPath:(NSString *)path name:(NSString *)name; - (void)addFileAtPath:(NSString*)path name:(NSString*)name;
/** /**
Adds a file to be uploaded in the multipart POST request, by its name and Adds a file to be uploaded in the multipart POST request, by its name and
contents. contents.
*/ */
- (void)addFileContents:(NSData *)data name:(NSString *)name; - (void)addFileContents:(NSData*)data name:(NSString*)name;
- (NSDictionary *)files; - (NSDictionary*)files;
@end @end

View file

@ -30,15 +30,15 @@
#import "HTTPMultipartUpload.h" #import "HTTPMultipartUpload.h"
#import "GTMDefines.h" #import "GTMDefines.h"
#import "util.h" #import "encoding_util.h"
@interface HTTPMultipartUpload(PrivateMethods) @interface HTTPMultipartUpload (PrivateMethods)
- (NSString *)multipartBoundary; - (NSString*)multipartBoundary;
// Each of the following methods will append the starting multipart boundary, // Each of the following methods will append the starting multipart boundary,
// but not the ending one. // but not the ending one.
- (NSData *)formDataForKey:(NSString *)key value:(NSString *)value; - (NSData*)formDataForKey:(NSString*)key value:(NSString*)value;
- (NSData *)formDataForFileContents:(NSData *)contents name:(NSString *)name; - (NSData*)formDataForFileContents:(NSData*)contents name:(NSString*)name;
- (NSData *)formDataForFile:(NSString *)file name:(NSString *)name; - (NSData*)formDataForFile:(NSString*)file name:(NSString*)name;
@end @end
@implementation HTTPMultipartUpload @implementation HTTPMultipartUpload
@ -46,30 +46,29 @@
#pragma mark - #pragma mark -
#pragma mark || Private || #pragma mark || Private ||
//============================================================================= //=============================================================================
- (NSString *)multipartBoundary { - (NSString*)multipartBoundary {
// The boundary has 27 '-' characters followed by 16 hex digits // The boundary has 27 '-' characters followed by 16 hex digits
return [NSString stringWithFormat:@"---------------------------%08X%08X", return [NSString
rand(), rand()]; stringWithFormat:@"---------------------------%08X%08X", rand(), rand()];
} }
//============================================================================= //=============================================================================
- (NSData *)formDataForKey:(NSString *)key value:(NSString *)value { - (NSData*)formDataForKey:(NSString*)key value:(NSString*)value {
NSMutableData* data = [NSMutableData data]; NSMutableData* data = [NSMutableData data];
[self appendBoundaryData:data]; [self appendBoundaryData:data];
NSString *escaped = PercentEncodeNSString(key); NSString* escaped = PercentEncodeNSString(key);
NSString *fmt = NSString* fmt = @"Content-Disposition: form-data; name=\"%@\"\r\n\r\n%@\r\n";
@"Content-Disposition: form-data; name=\"%@\"\r\n\r\n%@\r\n"; NSString* form = [NSString stringWithFormat:fmt, boundary_, escaped, value];
NSString *form = [NSString stringWithFormat:fmt, boundary_, escaped, value];
[data appendData:[form dataUsingEncoding:NSUTF8StringEncoding]]; [data appendData:[form dataUsingEncoding:NSUTF8StringEncoding]];
return data; return data;
} }
//============================================================================= //=============================================================================
- (void)appendBoundaryData: (NSMutableData*)data { - (void)appendBoundaryData:(NSMutableData*)data {
NSString *fmt = @"--%@\r\n"; NSString* fmt = @"--%@\r\n";
NSString *pre = [NSString stringWithFormat:fmt, boundary_]; NSString* pre = [NSString stringWithFormat:fmt, boundary_];
[data appendData:[pre dataUsingEncoding:NSUTF8StringEncoding]]; [data appendData:[pre dataUsingEncoding:NSUTF8StringEncoding]];
} }
@ -78,7 +77,7 @@
#pragma mark - #pragma mark -
#pragma mark || Public || #pragma mark || Public ||
//============================================================================= //=============================================================================
- (id)initWithURL:(NSURL *)url { - (id)initWithURL:(NSURL*)url {
if ((self = [super initWithURL:url])) { if ((self = [super initWithURL:url])) {
boundary_ = [[self multipartBoundary] retain]; boundary_ = [[self multipartBoundary] retain];
files_ = [[NSMutableDictionary alloc] init]; files_ = [[NSMutableDictionary alloc] init];
@ -97,7 +96,7 @@
} }
//============================================================================= //=============================================================================
- (void)setParameters:(NSDictionary *)parameters { - (void)setParameters:(NSDictionary*)parameters {
if (parameters != parameters_) { if (parameters != parameters_) {
[parameters_ release]; [parameters_ release];
parameters_ = [parameters copy]; parameters_ = [parameters copy];
@ -105,22 +104,22 @@
} }
//============================================================================= //=============================================================================
- (NSDictionary *)parameters { - (NSDictionary*)parameters {
return parameters_; return parameters_;
} }
//============================================================================= //=============================================================================
- (void)addFileAtPath:(NSString *)path name:(NSString *)name { - (void)addFileAtPath:(NSString*)path name:(NSString*)name {
[files_ setObject:path forKey:name]; [files_ setObject:path forKey:name];
} }
//============================================================================= //=============================================================================
- (void)addFileContents:(NSData *)data name:(NSString *)name { - (void)addFileContents:(NSData*)data name:(NSString*)name {
[files_ setObject:data forKey:name]; [files_ setObject:data forKey:name];
} }
//============================================================================= //=============================================================================
- (NSDictionary *)files { - (NSDictionary*)files {
return files_; return files_;
} }
@ -131,17 +130,17 @@
//============================================================================= //=============================================================================
- (NSString*)contentType { - (NSString*)contentType {
return [NSString stringWithFormat:@"multipart/form-data; boundary=%@", return [NSString
boundary_]; stringWithFormat:@"multipart/form-data; boundary=%@", boundary_];
} }
//============================================================================= //=============================================================================
- (NSData*)bodyData { - (NSData*)bodyData {
NSMutableData *postBody = [NSMutableData data]; NSMutableData* postBody = [NSMutableData data];
// Add any parameters to the message // Add any parameters to the message
NSArray *parameterKeys = [parameters_ allKeys]; NSArray* parameterKeys = [parameters_ allKeys];
NSString *key; NSString* key;
NSInteger count = [parameterKeys count]; NSInteger count = [parameterKeys count];
for (NSInteger i = 0; i < count; ++i) { for (NSInteger i = 0; i < count; ++i) {
@ -151,8 +150,8 @@
} }
// Add any files to the message // Add any files to the message
NSArray *fileNames = [files_ allKeys]; NSArray* fileNames = [files_ allKeys];
for (NSString *name in fileNames) { for (NSString* name in fileNames) {
// First append boundary // First append boundary
[self appendBoundaryData:postBody]; [self appendBoundaryData:postBody];
// Then the formdata // Then the formdata
@ -162,7 +161,7 @@
withFileOrData:fileOrData]; withFileOrData:fileOrData];
} }
NSString *epilogue = [NSString stringWithFormat:@"\r\n--%@--\r\n", boundary_]; NSString* epilogue = [NSString stringWithFormat:@"\r\n--%@--\r\n", boundary_];
[postBody appendData:[epilogue dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[epilogue dataUsingEncoding:NSUTF8StringEncoding]];
return postBody; return postBody;

View file

@ -1,4 +1,4 @@
// Copyright (c) 2019, Google Inc. // Copyright (c) 2020, Google Inc.
// All rights reserved. // All rights reserved.
// //
// Redistribution and use in source and binary forms, with or without // Redistribution and use in source and binary forms, with or without
@ -37,7 +37,7 @@ NS_ASSUME_NONNULL_BEGIN
Represents an HTTP PUT request. Represents an HTTP PUT request.
*/ */
@interface HTTPPutRequest : HTTPRequest { @interface HTTPPutRequest : HTTPRequest {
@protected @protected
NSString* file_; NSString* file_;
} }

View file

@ -1,4 +1,4 @@
// Copyright (c) 2019, Google Inc. // Copyright (c) 2020, Google Inc.
// All rights reserved. // All rights reserved.
// //
// Redistribution and use in source and binary forms, with or without // Redistribution and use in source and binary forms, with or without
@ -39,7 +39,7 @@
} }
//============================================================================= //=============================================================================
- (void)setFile:(NSString *)file { - (void)setFile:(NSString*)file {
file_ = [file copy]; file_ = [file copy];
} }
@ -50,7 +50,7 @@
//============================================================================= //=============================================================================
- (NSData*)bodyData { - (NSData*)bodyData {
NSMutableData *postBody = [NSMutableData data]; NSMutableData* postBody = [NSMutableData data];
[HTTPRequest appendFileToBodyData:postBody [HTTPRequest appendFileToBodyData:postBody
withName:@"symbol_file" withName:@"symbol_file"

View file

@ -1,4 +1,4 @@
// Copyright (c) 2019, Google Inc. // Copyright (c) 2020, Google Inc.
// All rights reserved. // All rights reserved.
// //
// Redistribution and use in source and binary forms, with or without // Redistribution and use in source and binary forms, with or without
@ -39,18 +39,18 @@ NS_ASSUME_NONNULL_BEGIN
*/ */
@interface HTTPRequest : NSObject { @interface HTTPRequest : NSObject {
@protected @protected
NSURL *URL_; // The destination URL (STRONG) NSURL* URL_; // The destination URL (STRONG)
NSHTTPURLResponse *response_; // The response from the send (STRONG) NSHTTPURLResponse* response_; // The response from the send (STRONG)
} }
/** /**
Initializes the HTTPRequest and sets its URL. Initializes the HTTPRequest and sets its URL.
*/ */
- (id)initWithURL:(NSURL *)URL; - (id)initWithURL:(NSURL*)URL;
- (NSURL *)URL; - (NSURL*)URL;
- (NSHTTPURLResponse*) response; - (NSHTTPURLResponse*)response;
- (NSString*)HTTPMethod; // Internal, don't call outside class hierarchy. - (NSString*)HTTPMethod; // Internal, don't call outside class hierarchy.
@ -58,13 +58,13 @@ NS_ASSUME_NONNULL_BEGIN
- (NSData*)bodyData; // Internal, don't call outside class hierarchy. - (NSData*)bodyData; // Internal, don't call outside class hierarchy.
- (NSData *)send:(NSError **)error; - (NSData*)send:(NSError**)error;
/** /**
Appends a file to the HTTP request, either by filename or by file content Appends a file to the HTTP request, either by filename or by file content
(in the form of NSData). (in the form of NSData).
*/ */
+ (void)appendFileToBodyData:(NSMutableData *)data + (void)appendFileToBodyData:(NSMutableData*)data
withName:(NSString*)name withName:(NSString*)name
withFileOrData:(id)fileOrData; withFileOrData:(id)fileOrData;

View file

@ -1,4 +1,4 @@
// Copyright (c) 2019, Google Inc. // Copyright (c) 2020, Google Inc.
// All rights reserved. // All rights reserved.
// //
// Redistribution and use in source and binary forms, with or without // Redistribution and use in source and binary forms, with or without
@ -29,33 +29,34 @@
#import "HTTPRequest.h" #import "HTTPRequest.h"
#import "util.h" #include <Availability.h>
#include <AvailabilityMacros.h>
#import "encoding_util.h"
// As -[NSURLConnection sendSynchronousRequest:returningResponse:error:] has // As -[NSURLConnection sendSynchronousRequest:returningResponse:error:] has
// been deprecated with iOS 9.0 / OS X 10.11 SDKs, this function re-implements // been deprecated with iOS 9.0 / OS X 10.11 SDKs, this function re-implements
// it using -[NSURLSession dataTaskWithRequest:completionHandler:] which is // it using -[NSURLSession dataTaskWithRequest:completionHandler:] which is
// available on iOS 7+. // available on iOS 7+.
static NSData *SendSynchronousNSURLRequest(NSURLRequest *req, static NSData* SendSynchronousNSURLRequest(NSURLRequest* req,
NSURLResponse **outResponse, NSURLResponse** outResponse,
NSError **outError) { NSError** outError) {
#if (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && defined(__IPHONE_7_0) && \ #if (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && defined(__IPHONE_7_0) && \
__IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_7_0) || \ __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_7_0) || \
(defined(MAC_OS_X_VERSION_MIN_REQUIRED) && \ (defined(MAC_OS_X_VERSION_MIN_REQUIRED) && \
defined(MAC_OS_X_VERSION_10_11) && \ defined(MAC_OS_X_VERSION_10_11) && \
MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11) MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11)
__block NSData* result = nil; __block NSData* result = nil;
__block NSError* error = nil; __block NSError* error = nil;
__block NSURLResponse* response = nil; __block NSURLResponse* response = nil;
dispatch_semaphore_t waitSemaphone = dispatch_semaphore_create(0); dispatch_semaphore_t waitSemaphone = dispatch_semaphore_create(0);
NSURLSessionConfiguration* config = [NSURLSessionConfiguration NSURLSessionConfiguration* config =
defaultSessionConfiguration]; [NSURLSessionConfiguration defaultSessionConfiguration];
[config setTimeoutIntervalForRequest:240.0]; [config setTimeoutIntervalForRequest:240.0];
NSURLSession* session = [NSURLSession sessionWithConfiguration:config]; NSURLSession* session = [NSURLSession sessionWithConfiguration:config];
[[session [[session
dataTaskWithRequest:req dataTaskWithRequest:req
completionHandler:^(NSData *data, completionHandler:^(NSData* data, NSURLResponse* resp, NSError* err) {
NSURLResponse *resp,
NSError *err) {
if (outError) if (outError)
error = [err retain]; error = [err retain];
if (outResponse) if (outResponse)
@ -81,7 +82,7 @@ MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11)
@implementation HTTPRequest @implementation HTTPRequest
//============================================================================= //=============================================================================
- (id)initWithURL:(NSURL *)URL { - (id)initWithURL:(NSURL*)URL {
if ((self = [super init])) { if ((self = [super init])) {
URL_ = [URL copy]; URL_ = [URL copy];
} }
@ -98,18 +99,19 @@ MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11)
} }
//============================================================================= //=============================================================================
- (NSURL *)URL { - (NSURL*)URL {
return URL_; return URL_;
} }
//============================================================================= //=============================================================================
- (NSHTTPURLResponse *)response { - (NSHTTPURLResponse*)response {
return response_; return response_;
} }
//============================================================================= //=============================================================================
- (NSString*)HTTPMethod { - (NSString*)HTTPMethod {
@throw [NSException exceptionWithName:NSInternalInconsistencyException @throw [NSException
exceptionWithName:NSInternalInconsistencyException
reason:[NSString stringWithFormat:@"You must" reason:[NSString stringWithFormat:@"You must"
"override %@ in a subclass", "override %@ in a subclass",
NSStringFromSelector(_cmd)] NSStringFromSelector(_cmd)]
@ -127,9 +129,8 @@ MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11)
} }
//============================================================================= //=============================================================================
- (NSData *)send:(NSError **)withError { - (NSData*)send:(NSError**)withError {
NSMutableURLRequest *req = NSMutableURLRequest* req = [[NSMutableURLRequest alloc]
[[NSMutableURLRequest alloc]
initWithURL:URL_ initWithURL:URL_
cachePolicy:NSURLRequestUseProtocolCachePolicy cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:60.0]; timeoutInterval:60.0];
@ -149,13 +150,13 @@ MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11)
[response_ release]; [response_ release];
response_ = nil; response_ = nil;
NSData *data = nil; NSData* data = nil;
if ([[req URL] isFileURL]) { if ([[req URL] isFileURL]) {
[[req HTTPBody] writeToURL:[req URL] options:0 error:withError]; [[req HTTPBody] writeToURL:[req URL] options:0 error:withError];
} else { } else {
NSURLResponse *response = nil; NSURLResponse* response = nil;
data = SendSynchronousNSURLRequest(req, &response, withError); data = SendSynchronousNSURLRequest(req, &response, withError);
response_ = (NSHTTPURLResponse *)[response retain]; response_ = (NSHTTPURLResponse*)[response retain];
} }
[req release]; [req release];
@ -163,14 +164,13 @@ MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11)
} }
//============================================================================= //=============================================================================
+ (NSData *)formDataForFileContents:(NSData *)contents + (NSData*)formDataForFileContents:(NSData*)contents withName:(NSString*)name {
withName:(NSString *)name { NSMutableData* data = [NSMutableData data];
NSMutableData *data = [NSMutableData data]; NSString* escaped = PercentEncodeNSString(name);
NSString *escaped = PercentEncodeNSString(name); NSString* fmt = @"Content-Disposition: form-data; name=\"%@\"; "
NSString *fmt = @"Content-Disposition: form-data; name=\"%@\"; "
"filename=\"minidump.dmp\"\r\nContent-Type: " "filename=\"minidump.dmp\"\r\nContent-Type: "
"application/octet-stream\r\n\r\n"; "application/octet-stream\r\n\r\n";
NSString *pre = [NSString stringWithFormat:fmt, escaped]; NSString* pre = [NSString stringWithFormat:fmt, escaped];
[data appendData:[pre dataUsingEncoding:NSUTF8StringEncoding]]; [data appendData:[pre dataUsingEncoding:NSUTF8StringEncoding]];
[data appendData:contents]; [data appendData:contents];
@ -179,27 +179,26 @@ MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11)
} }
//============================================================================= //=============================================================================
+ (NSData *)formDataForFile:(NSString *)file withName:(NSString *)name { + (NSData*)formDataForFile:(NSString*)file withName:(NSString*)name {
NSData *contents = [NSData dataWithContentsOfFile:file]; NSData* contents = [NSData dataWithContentsOfFile:file];
return [HTTPRequest formDataForFileContents:contents withName:name]; return [HTTPRequest formDataForFileContents:contents withName:name];
} }
//============================================================================= //=============================================================================
+ (NSData *)formDataForKey:(NSString *)key value:(NSString *)value { + (NSData*)formDataForKey:(NSString*)key value:(NSString*)value {
NSString *escaped = PercentEncodeNSString(key); NSString* escaped = PercentEncodeNSString(key);
NSString *fmt = NSString* fmt = @"Content-Disposition: form-data; name=\"%@\"\r\n\r\n%@\r\n";
@"Content-Disposition: form-data; name=\"%@\"\r\n\r\n%@\r\n"; NSString* form = [NSString stringWithFormat:fmt, escaped, value];
NSString *form = [NSString stringWithFormat:fmt, escaped, value];
return [form dataUsingEncoding:NSUTF8StringEncoding]; return [form dataUsingEncoding:NSUTF8StringEncoding];
} }
//============================================================================= //=============================================================================
+ (void)appendFileToBodyData:(NSMutableData *)data + (void)appendFileToBodyData:(NSMutableData*)data
withName:(NSString*)name withName:(NSString*)name
withFileOrData:(id)fileOrData { withFileOrData:(id)fileOrData {
NSData *fileData; NSData* fileData;
// The object can be either the path to a file (NSString) or the contents // The object can be either the path to a file (NSString) or the contents
// of the file (NSData). // of the file (NSData).

View file

@ -1,4 +1,4 @@
// Copyright (c) 2019, Google Inc. // Copyright (c) 2020, Google Inc.
// All rights reserved. // All rights reserved.
// //
// Redistribution and use in source and binary forms, with or without // Redistribution and use in source and binary forms, with or without
@ -37,7 +37,7 @@ NS_ASSUME_NONNULL_BEGIN
Represents a simple (non-multipart) HTTP POST request. Represents a simple (non-multipart) HTTP POST request.
*/ */
@interface HTTPSimplePostRequest : HTTPRequest { @interface HTTPSimplePostRequest : HTTPRequest {
@protected @protected
NSString* contentType_; NSString* contentType_;
NSString* body_; NSString* body_;
} }

View file

@ -1,4 +1,4 @@
// Copyright (c) 2019, Google Inc. // Copyright (c) 2020, Google Inc.
// All rights reserved. // All rights reserved.
// //
// Redistribution and use in source and binary forms, with or without // Redistribution and use in source and binary forms, with or without
@ -40,12 +40,12 @@
} }
//============================================================================= //=============================================================================
- (void)setContentType:(NSString *)contentType { - (void)setContentType:(NSString*)contentType {
contentType_ = [contentType copy]; contentType_ = [contentType copy];
} }
//============================================================================= //=============================================================================
- (void)setBody:(NSString *)body { - (void)setBody:(NSString*)body {
body_ = [body copy]; body_ = [body copy];
} }

View file

@ -1,4 +1,4 @@
// Copyright (c) 2019, Google Inc. // Copyright (c) 2020, Google Inc.
// All rights reserved. // All rights reserved.
// //
// Redistribution and use in source and binary forms, with or without // Redistribution and use in source and binary forms, with or without
@ -32,23 +32,24 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
/** /**
Represents a response from a sym-upload-v2 server to a CreateUploadURL call. Represents a response from a sym-upload-v2 server to a createUploadURLOnServer
call.
*/ */
@interface UploadURLResponse : NSObject { @interface UploadURLResponse : NSObject {
@protected @protected
NSString* uploadURL_; NSString* uploadURL_;
NSString* uploadKey_; NSString* uploadKey_;
} }
- (id)initWithUploadURL:(NSString*)uploadURL - (id)initWithUploadURL:(NSString*)uploadURL withUploadKey:(NSString*)uploadKey;
withUploadKey:(NSString*)uploadKey;
- (NSString*)uploadURL; - (NSString*)uploadURL;
- (NSString*)uploadKey; - (NSString*)uploadKey;
@end @end
/** /**
Possible return statuses from a sym-upload-v2 server to a CompleteUpload call. Possible return statuses from a sym-upload-v2 server to a
completeUploadOnServer call.
*/ */
typedef NS_ENUM(NSInteger, CompleteUploadResult) { typedef NS_ENUM(NSInteger, CompleteUploadResult) {
CompleteUploadResultOk, CompleteUploadResultOk,
@ -57,8 +58,8 @@ typedef NS_ENUM(NSInteger, CompleteUploadResult) {
}; };
/** /**
Possible return statuses from a sym-upload-v2 server to a CheckSymbolStatus Possible return statuses from a sym-upload-v2 server to a
call. checkSymbolStatusOnServer call.
*/ */
typedef NS_ENUM(NSInteger, SymbolStatus) { typedef NS_ENUM(NSInteger, SymbolStatus) {
SymbolStatusFound, SymbolStatusFound,
@ -70,26 +71,27 @@ typedef NS_ENUM(NSInteger, SymbolStatus) {
Interface to help a client interact with a sym-upload-v2 server, over HTTP. Interface to help a client interact with a sym-upload-v2 server, over HTTP.
For details of the API and protocol, see :/docs/sym_upload_v2_protocol.md. For details of the API and protocol, see :/docs/sym_upload_v2_protocol.md.
*/ */
@interface SymbolCollectorClient : NSObject; @interface SymbolCollectorClient : NSObject
;
/** /**
Call the CheckSymbolstatus API on the server. Calls the /v1/symbols/{debug_file}/{debug_id}:checkStatus API on the server.
*/ */
+ (SymbolStatus)CheckSymbolStatus:(NSString*)APIURL + (SymbolStatus)checkSymbolStatusOnServer:(NSString*)APIURL
withAPIKey:(NSString*)APIKey withAPIKey:(NSString*)APIKey
withDebugFile:(NSString*)debugFile withDebugFile:(NSString*)debugFile
withDebugID:(NSString*)debugID; withDebugID:(NSString*)debugID;
/** /**
Call the CreateUploadURL API on the server. Calls the /v1/uploads:create API on the server.
*/ */
+ (UploadURLResponse*)CreateUploadURL:(NSString*)APIURL + (UploadURLResponse*)createUploadURLOnServer:(NSString*)APIURL
withAPIKey:(NSString*)APIKey; withAPIKey:(NSString*)APIKey;
/** /**
Call the CompleteUpload API on the server. Calls the /v1/uploads/{key}:complete API on the server.
*/ */
+ (CompleteUploadResult)CompleteUpload:(NSString*)APIURL + (CompleteUploadResult)completeUploadOnServer:(NSString*)APIURL
withAPIKey:(NSString*)APIKey withAPIKey:(NSString*)APIKey
withUploadKey:(NSString*)uploadKey withUploadKey:(NSString*)uploadKey
withDebugFile:(NSString*)debugFile withDebugFile:(NSString*)debugFile

View file

@ -1,4 +1,4 @@
// Copyright (c) 2019, Google Inc. // Copyright (c) 2020, Google Inc.
// All rights reserved. // All rights reserved.
// //
// Redistribution and use in source and binary forms, with or without // Redistribution and use in source and binary forms, with or without
@ -35,8 +35,8 @@
@implementation UploadURLResponse @implementation UploadURLResponse
//============================================================================= //=============================================================================
- (id)initWithUploadURL:(NSString *)uploadURL - (id)initWithUploadURL:(NSString*)uploadURL
withUploadKey:(NSString *)uploadKey { withUploadKey:(NSString*)uploadKey {
if (self = [super init]) { if (self = [super init]) {
uploadURL_ = [uploadURL copy]; uploadURL_ = [uploadURL copy];
uploadKey_ = [uploadKey copy]; uploadKey_ = [uploadKey copy];
@ -66,22 +66,20 @@
@implementation SymbolCollectorClient @implementation SymbolCollectorClient
//============================================================================= //=============================================================================
+ (SymbolStatus)CheckSymbolStatus:(NSString *)APIURL + (SymbolStatus)checkSymbolStatusOnServer:(NSString*)APIURL
withAPIKey:(NSString *)APIKey withAPIKey:(NSString*)APIKey
withDebugFile:(NSString *)debugFile withDebugFile:(NSString*)debugFile
withDebugID:(NSString *)debugID { withDebugID:(NSString*)debugID {
NSURL* URL = [NSURL URLWithString:[NSString stringWithFormat: NSURL* URL = [NSURL
@"%@/v1/symbols/%@/%@:checkStatus" URLWithString:[NSString
stringWithFormat:@"%@/v1/symbols/%@/%@:checkStatus"
@"?key=%@", @"?key=%@",
APIURL, APIURL, debugFile, debugID, APIKey]];
debugFile,
debugID,
APIKey]];
HTTPGetRequest* getRequest = [[HTTPGetRequest alloc] initWithURL:URL]; HTTPGetRequest* getRequest = [[HTTPGetRequest alloc] initWithURL:URL];
NSError *error = nil; NSError* error = nil;
NSData *data = [getRequest send:&error]; NSData* data = [getRequest send:&error];
NSString *result = [[NSString alloc] initWithData:data NSString* result = [[NSString alloc] initWithData:data
encoding:NSUTF8StringEncoding]; encoding:NSUTF8StringEncoding];
int responseCode = [[getRequest response] statusCode]; int responseCode = [[getRequest response] statusCode];
[getRequest release]; [getRequest release];
@ -96,14 +94,13 @@
error = nil; error = nil;
NSRegularExpression* statusRegex = [NSRegularExpression NSRegularExpression* statusRegex = [NSRegularExpression
regularExpressionWithPattern: regularExpressionWithPattern:@"\"status\": \"([^\"]+)\""
@"\"status\": \"([^\"]+)\""
options:0 options:0
error:&error]; error:&error];
NSArray* matches = [statusRegex NSArray* matches =
matchesInString:result [statusRegex matchesInString:result
options:0 options:0
range: NSMakeRange(0, [result length])]; range:NSMakeRange(0, [result length])];
if ([matches count] != 1) { if ([matches count] != 1) {
fprintf(stdout, "Failed to parse check symbol status response."); fprintf(stdout, "Failed to parse check symbol status response.");
fprintf(stdout, "Response:\n"); fprintf(stdout, "Response:\n");
@ -114,24 +111,22 @@
NSString* status = [result substringWithRange:[matches[0] rangeAtIndex:1]]; NSString* status = [result substringWithRange:[matches[0] rangeAtIndex:1]];
[result release]; [result release];
return [status isEqualToString:@"FOUND"] ? return [status isEqualToString:@"FOUND"] ? SymbolStatusFound
SymbolStatusFound : : SymbolStatusMissing;
SymbolStatusMissing;
} }
//============================================================================= //=============================================================================
+ (UploadURLResponse *)CreateUploadURL:(NSString *)APIURL + (UploadURLResponse*)createUploadURLOnServer:(NSString*)APIURL
withAPIKey:(NSString *)APIKey { withAPIKey:(NSString*)APIKey {
NSURL* URL = [NSURL URLWithString:[NSString stringWithFormat: NSURL* URL = [NSURL
@"%@/v1/uploads:create?key=%@", URLWithString:[NSString stringWithFormat:@"%@/v1/uploads:create?key=%@",
APIURL, APIURL, APIKey]];
APIKey]];
HTTPSimplePostRequest* postRequest = [[HTTPSimplePostRequest alloc] HTTPSimplePostRequest* postRequest =
initWithURL:URL]; [[HTTPSimplePostRequest alloc] initWithURL:URL];
NSError *error = nil; NSError* error = nil;
NSData* data = [postRequest send:&error]; NSData* data = [postRequest send:&error];
NSString *result = [[NSString alloc] initWithData:data NSString* result = [[NSString alloc] initWithData:data
encoding:NSUTF8StringEncoding]; encoding:NSUTF8StringEncoding];
int responseCode = [[postRequest response] statusCode]; int responseCode = [[postRequest response] statusCode];
[postRequest release]; [postRequest release];
@ -146,65 +141,60 @@
// Note camel-case rather than underscores. // Note camel-case rather than underscores.
NSRegularExpression* uploadURLRegex = [NSRegularExpression NSRegularExpression* uploadURLRegex = [NSRegularExpression
regularExpressionWithPattern: regularExpressionWithPattern:@"\"uploadUrl\": \"([^\"]+)\""
@"\"uploadUrl\": \"([^\"]+)\""
options:0 options:0
error:&error]; error:&error];
NSRegularExpression* uploadKeyRegex = [NSRegularExpression NSRegularExpression* uploadKeyRegex = [NSRegularExpression
regularExpressionWithPattern: regularExpressionWithPattern:@"\"uploadKey\": \"([^\"]+)\""
@"\"uploadKey\": \"([^\"]+)\""
options:0 options:0
error:&error]; error:&error];
NSArray* uploadURLMatches = [uploadURLRegex NSArray* uploadURLMatches =
matchesInString:result [uploadURLRegex matchesInString:result
options:0 options:0
range: NSMakeRange(0, [result length])]; range:NSMakeRange(0, [result length])];
NSArray* uploadKeyMatches = [uploadKeyRegex NSArray* uploadKeyMatches =
matchesInString:result [uploadKeyRegex matchesInString:result
options:0 options:0
range: NSMakeRange(0, [result length])]; range:NSMakeRange(0, [result length])];
if ([uploadURLMatches count] != 1 || [uploadKeyMatches count] != 1) { if ([uploadURLMatches count] != 1 || [uploadKeyMatches count] != 1) {
fprintf(stdout, "Failed to parse create url response."); fprintf(stdout, "Failed to parse create url response.");
fprintf(stdout, "Response:\n"); fprintf(stdout, "Response:\n");
fprintf(stdout, "%s\n", [result UTF8String]); fprintf(stdout, "%s\n", [result UTF8String]);
return nil; return nil;
} }
NSString* uploadURL = [result NSString* uploadURL =
substringWithRange:[uploadURLMatches[0] [result substringWithRange:[uploadURLMatches[0] rangeAtIndex:1]];
rangeAtIndex:1]]; NSString* uploadKey =
NSString* uploadKey = [result [result substringWithRange:[uploadKeyMatches[0] rangeAtIndex:1]];
substringWithRange:[uploadKeyMatches[0]
rangeAtIndex:1]];
return [[UploadURLResponse alloc] initWithUploadURL:uploadURL return [[UploadURLResponse alloc] initWithUploadURL:uploadURL
withUploadKey:uploadKey]; withUploadKey:uploadKey];
} }
//============================================================================= //=============================================================================
+ (CompleteUploadResult)CompleteUpload:(NSString *)APIURL + (CompleteUploadResult)completeUploadOnServer:(NSString*)APIURL
withAPIKey:(NSString *)APIKey withAPIKey:(NSString*)APIKey
withUploadKey:(NSString *)uploadKey withUploadKey:(NSString*)uploadKey
withDebugFile:(NSString *)debugFile withDebugFile:(NSString*)debugFile
withDebugID:(NSString *)debugID { withDebugID:(NSString*)debugID {
NSURL* URL = [NSURL URLWithString:[NSString stringWithFormat: NSURL* URL = [NSURL
@"%@/v1/uploads/%@:complete?key=%@", URLWithString:[NSString
APIURL, stringWithFormat:@"%@/v1/uploads/%@:complete?key=%@",
uploadKey, APIURL, uploadKey, APIKey]];
APIKey]]; NSString* body =
NSString* body = [NSString stringWithFormat: [NSString stringWithFormat:
@"{ symbol_id: { debug_file: \"%@\", debug_id: \"%@\" } }", @"{ symbol_id: { debug_file: \"%@\", debug_id: \"%@\" } }",
debugFile, debugFile, debugID];
debugID];
HTTPSimplePostRequest* postRequest = [[HTTPSimplePostRequest alloc] HTTPSimplePostRequest* postRequest =
initWithURL:URL]; [[HTTPSimplePostRequest alloc] initWithURL:URL];
[postRequest setBody:body]; [postRequest setBody:body];
[postRequest setContentType:@"application/json"]; [postRequest setContentType:@"application/json"];
NSError *error = nil; NSError* error = nil;
NSData* data = [postRequest send:&error]; NSData* data = [postRequest send:&error];
NSString *result = [[NSString alloc] initWithData:data NSString* result = [[NSString alloc] initWithData:data
encoding:NSUTF8StringEncoding]; encoding:NSUTF8StringEncoding];
int responseCode = [[postRequest response] statusCode]; int responseCode = [[postRequest response] statusCode];
[postRequest release]; [postRequest release];
@ -219,29 +209,27 @@
// Note camel-case rather than underscores. // Note camel-case rather than underscores.
NSRegularExpression* completeResultRegex = [NSRegularExpression NSRegularExpression* completeResultRegex = [NSRegularExpression
regularExpressionWithPattern: regularExpressionWithPattern:@"\"result\": \"([^\"]+)\""
@"\"result\": \"([^\"]+)\""
options:0 options:0
error:&error]; error:&error];
NSArray* completeResultMatches = [completeResultRegex NSArray* completeResultMatches =
matchesInString:result [completeResultRegex matchesInString:result
options:0 options:0
range: NSMakeRange(0, [result length])]; range:NSMakeRange(0, [result length])];
if ([completeResultMatches count] != 1) { if ([completeResultMatches count] != 1) {
fprintf(stdout, "Failed to parse complete upload response."); fprintf(stdout, "Failed to parse complete upload response.");
fprintf(stdout, "Response:\n"); fprintf(stdout, "Response:\n");
fprintf(stdout, "%s\n", [result UTF8String]); fprintf(stdout, "%s\n", [result UTF8String]);
return nil; return CompleteUploadResultError;
} }
NSString* completeResult = [result NSString* completeResult =
substringWithRange:[completeResultMatches[0] [result substringWithRange:[completeResultMatches[0] rangeAtIndex:1]];
rangeAtIndex:1]];
[result release]; [result release];
return ([completeResult isEqualToString:@"DUPLICATE_DATA"]) ? return ([completeResult isEqualToString:@"DUPLICATE_DATA"])
CompleteUploadResultDuplicateData : ? CompleteUploadResultDuplicateData
CompleteUploadResultOk; : CompleteUploadResultOk;
} }
@end @end

View file

@ -1,4 +1,4 @@
// Copyright (c) 2019, Google Inc. // Copyright (c) 2020, Google Inc.
// All rights reserved. // All rights reserved.
// //
// Redistribution and use in source and binary forms, with or without // Redistribution and use in source and binary forms, with or without
@ -27,8 +27,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef util_h #ifndef GOOGLE_BREAKPAD_COMMON_MAC_ENCODING_UTIL_H
#define util_h #define GOOGLE_BREAKPAD_COMMON_MAC_ENCODING_UTIL_H
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
@ -36,17 +36,6 @@
// deprecated with iOS 9.0 / OS X 10.11 SDKs, this function re-implements it // deprecated with iOS 9.0 / OS X 10.11 SDKs, this function re-implements it
// using -[NSString stringByAddingPercentEncodingWithAllowedCharacters:] when // using -[NSString stringByAddingPercentEncodingWithAllowedCharacters:] when
// using those SDKs. // using those SDKs.
static NSString *PercentEncodeNSString(NSString *key) { NSString* PercentEncodeNSString(NSString* key);
#if (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && defined(__IPHONE_9_0) && \
__IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_9_0) || \
(defined(MAC_OS_X_VERSION_MIN_REQUIRED) && \
defined(MAC_OS_X_VERSION_10_11) && \
MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11)
return [key stringByAddingPercentEncodingWithAllowedCharacters:
[NSCharacterSet URLQueryAllowedCharacterSet]];
#else
return [key stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
#endif
}
#endif /* util_h */ #endif // GOOGLE_BREAKPAD_COMMON_MAC_ENCODING_UTIL_H

View file

@ -0,0 +1,47 @@
// Copyright (c) 2020, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "encoding_util.h"
#include <Availability.h>
#include <AvailabilityMacros.h>
#import <Foundation/Foundation.h>
NSString* PercentEncodeNSString(NSString* key) {
#if (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && defined(__IPHONE_9_0) && \
__IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_9_0) || \
(defined(MAC_OS_X_VERSION_MIN_REQUIRED) && \
defined(MAC_OS_X_VERSION_10_11) && \
MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11)
return [key stringByAddingPercentEncodingWithAllowedCharacters:
[NSCharacterSet URLQueryAllowedCharacterSet]];
#else
return [key stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
#endif
}

View file

@ -40,18 +40,18 @@
#import "common/mac/HTTPMultipartUpload.h" #import "common/mac/HTTPMultipartUpload.h"
typedef struct { typedef struct {
NSString *minidumpPath; NSString* minidumpPath;
NSString *uploadURLStr; NSString* uploadURLStr;
NSString *product; NSString* product;
NSString *version; NSString* version;
BOOL success; BOOL success;
} Options; } Options;
//============================================================================= //=============================================================================
static void Start(Options *options) { static void Start(Options* options) {
NSURL *url = [NSURL URLWithString:options->uploadURLStr]; NSURL* url = [NSURL URLWithString:options->uploadURLStr];
HTTPMultipartUpload *ul = [[HTTPMultipartUpload alloc] initWithURL:url]; HTTPMultipartUpload* ul = [[HTTPMultipartUpload alloc] initWithURL:url];
NSMutableDictionary *parameters = [NSMutableDictionary dictionary]; NSMutableDictionary* parameters = [NSMutableDictionary dictionary];
// Add parameters // Add parameters
[parameters setObject:options->product forKey:@"prod"]; [parameters setObject:options->product forKey:@"prod"];
@ -62,9 +62,9 @@ static void Start(Options *options) {
[ul addFileAtPath:options->minidumpPath name:@"upload_file_minidump"]; [ul addFileAtPath:options->minidumpPath name:@"upload_file_minidump"];
// Send it // Send it
NSError *error = nil; NSError* error = nil;
NSData *data = [ul send:&error]; NSData* data = [ul send:&error];
NSString *result = [[NSString alloc] initWithData:data NSString* result = [[NSString alloc] initWithData:data
encoding:NSUTF8StringEncoding]; encoding:NSUTF8StringEncoding];
NSLog(@"Send: %@", error ? [error description] : @"No Error"); NSLog(@"Send: %@", error ? [error description] : @"No Error");
@ -77,11 +77,12 @@ static void Start(Options *options) {
} }
//============================================================================= //=============================================================================
static void static void Usage(int argc, const char* argv[]) {
Usage(int argc, const char *argv[]) {
fprintf(stderr, "Submit minidump information.\n"); fprintf(stderr, "Submit minidump information.\n");
fprintf(stderr, "Usage: %s -p <product> -v <version> <minidump> " fprintf(stderr,
"<upload-URL>\n", argv[0]); "Usage: %s -p <product> -v <version> <minidump> "
"<upload-URL>\n",
argv[0]);
fprintf(stderr, "<minidump> should be a minidump.\n"); fprintf(stderr, "<minidump> should be a minidump.\n");
fprintf(stderr, "<upload-URL> is the destination for the upload\n"); fprintf(stderr, "<upload-URL> is the destination for the upload\n");
@ -90,12 +91,11 @@ Usage(int argc, const char *argv[]) {
} }
//============================================================================= //=============================================================================
static void static void SetupOptions(int argc, const char* argv[], Options* options) {
SetupOptions(int argc, const char *argv[], Options *options) {
extern int optind; extern int optind;
char ch; char ch;
while ((ch = getopt(argc, (char * const *)argv, "p:v:h?")) != -1) { while ((ch = getopt(argc, (char* const*)argv, "p:v:h?")) != -1) {
switch (ch) { switch (ch) {
case 'p': case 'p':
options->product = [NSString stringWithUTF8String:optarg]; options->product = [NSString stringWithUTF8String:optarg];
@ -122,8 +122,8 @@ SetupOptions(int argc, const char *argv[], Options *options) {
} }
//============================================================================= //=============================================================================
int main (int argc, const char * argv[]) { int main(int argc, const char* argv[]) {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
Options options; Options options;
bzero(&options, sizeof(Options)); bzero(&options, sizeof(Options));

View file

@ -48,14 +48,11 @@
#include "HTTPPutRequest.h" #include "HTTPPutRequest.h"
#include "SymbolCollectorClient.h" #include "SymbolCollectorClient.h"
typedef enum { typedef enum { SymUploadProtocolV1, SymUploadProtocolV2 } SymUploadProtocol;
SymUploadProtocolV1,
SymUploadProtocolV2
} SymUploadProtocol;
typedef struct { typedef struct {
NSString *symbolsPath; NSString* symbolsPath;
NSString *uploadURLStr; NSString* uploadURLStr;
SymUploadProtocol symUploadProtocol; SymUploadProtocol symUploadProtocol;
NSString* apiKey; NSString* apiKey;
BOOL force; BOOL force;
@ -63,19 +60,20 @@ typedef struct {
} Options; } Options;
//============================================================================= //=============================================================================
static NSArray *ModuleDataForSymbolFile(NSString *file) { static NSArray* ModuleDataForSymbolFile(NSString* file) {
NSFileHandle *fh = [NSFileHandle fileHandleForReadingAtPath:file]; NSFileHandle* fh = [NSFileHandle fileHandleForReadingAtPath:file];
NSData *data = [fh readDataOfLength:1024]; NSData* data = [fh readDataOfLength:1024];
NSString *str = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; NSString* str = [[NSString alloc] initWithData:data
NSScanner *scanner = [NSScanner scannerWithString:str]; encoding:NSUTF8StringEncoding];
NSString *line; NSScanner* scanner = [NSScanner scannerWithString:str];
NSMutableArray *parts = nil; NSString* line;
NSMutableArray* parts = nil;
const int MODULE_ID_INDEX = 3; const int MODULE_ID_INDEX = 3;
if ([scanner scanUpToString:@"\n" intoString:&line]) { if ([scanner scanUpToString:@"\n" intoString:&line]) {
parts = [[NSMutableArray alloc] init]; parts = [[NSMutableArray alloc] init];
NSScanner *moduleInfoScanner = [NSScanner scannerWithString:line]; NSScanner* moduleInfoScanner = [NSScanner scannerWithString:line];
NSString *moduleInfo; NSString* moduleInfo;
// Get everything BEFORE the module name. None of these properties // Get everything BEFORE the module name. None of these properties
// can have spaces. // can have spaces.
for (int i = 0; i <= MODULE_ID_INDEX; i++) { for (int i = 0; i <= MODULE_ID_INDEX; i++) {
@ -98,9 +96,9 @@ static NSArray *ModuleDataForSymbolFile(NSString *file) {
static void StartSymUploadProtocolV1(Options* options, static void StartSymUploadProtocolV1(Options* options,
NSArray* moduleParts, NSArray* moduleParts,
NSString* compactedID) { NSString* compactedID) {
NSURL *url = [NSURL URLWithString:options->uploadURLStr]; NSURL* url = [NSURL URLWithString:options->uploadURLStr];
HTTPMultipartUpload *ul = [[HTTPMultipartUpload alloc] initWithURL:url]; HTTPMultipartUpload* ul = [[HTTPMultipartUpload alloc] initWithURL:url];
NSMutableDictionary *parameters = [NSMutableDictionary dictionary]; NSMutableDictionary* parameters = [NSMutableDictionary dictionary];
// Add parameters // Add parameters
[parameters setObject:compactedID forKey:@"debug_identifier"]; [parameters setObject:compactedID forKey:@"debug_identifier"];
@ -113,50 +111,51 @@ static void StartSymUploadProtocolV1(Options* options,
[parameters setObject:[moduleParts objectAtIndex:4] forKey:@"code_file"]; [parameters setObject:[moduleParts objectAtIndex:4] forKey:@"code_file"];
[ul setParameters:parameters]; [ul setParameters:parameters];
NSArray *keys = [parameters allKeys]; NSArray* keys = [parameters allKeys];
int count = [keys count]; int count = [keys count];
for (int i = 0; i < count; ++i) { for (int i = 0; i < count; ++i) {
NSString *key = [keys objectAtIndex:i]; NSString* key = [keys objectAtIndex:i];
NSString *value = [parameters objectForKey:key]; NSString* value = [parameters objectForKey:key];
fprintf(stdout, "'%s' = '%s'\n", [key UTF8String], fprintf(stdout, "'%s' = '%s'\n", [key UTF8String], [value UTF8String]);
[value UTF8String]);
} }
// Add file // Add file
[ul addFileAtPath:options->symbolsPath name:@"symbol_file"]; [ul addFileAtPath:options->symbolsPath name:@"symbol_file"];
// Send it // Send it
NSError *error = nil; NSError* error = nil;
NSData *data = [ul send:&error]; NSData* data = [ul send:&error];
NSString *result = [[NSString alloc] initWithData:data NSString* result = [[NSString alloc] initWithData:data
encoding:NSUTF8StringEncoding]; encoding:NSUTF8StringEncoding];
int status = [[ul response] statusCode]; int status = [[ul response] statusCode];
fprintf(stdout, "Send: %s\n", error ? [[error description] UTF8String] : fprintf(stdout, "Send: %s\n",
"No Error"); error ? [[error description] UTF8String] : "No Error");
fprintf(stdout, "Response: %d\n", status); fprintf(stdout, "Response: %d\n", status);
fprintf(stdout, "Result: %lu bytes\n%s\n", fprintf(stdout, "Result: %lu bytes\n%s\n", (unsigned long)[data length],
(unsigned long)[data length], [result UTF8String]); [result UTF8String]);
[result release]; [result release];
[ul release]; [ul release];
options->success = !error && status==200; options->success = !error && status == 200;
} }
//============================================================================= //=============================================================================
static void StartSymUploadProtocolV2(Options* options, static void StartSymUploadProtocolV2(Options* options,
NSString* debugFile, NSArray* moduleParts,
NSString* debugID) { NSString* debugID) {
options->success = NO;
NSString* debugFile = [moduleParts objectAtIndex:4];
if (!options->force) { if (!options->force) {
SymbolStatus symbolStatus = [SymbolCollectorClient SymbolStatus symbolStatus =
CheckSymbolStatus:options->uploadURLStr [SymbolCollectorClient checkSymbolStatusOnServer:options->uploadURLStr
withAPIKey:options->apiKey withAPIKey:options->apiKey
withDebugFile:debugFile withDebugFile:debugFile
withDebugID:debugID]; withDebugID:debugID];
if (symbolStatus == SymbolStatusFound) { if (symbolStatus == SymbolStatusFound) {
fprintf(stdout, "Symbol file already exists, upload aborted." fprintf(stdout, "Symbol file already exists, upload aborted."
" Use \"-f\" to overwrite.\n"); " Use \"-f\" to overwrite.\n");
options->success = YES;
return; return;
} else if (symbolStatus == SymbolStatusUnknown) { } else if (symbolStatus == SymbolStatusUnknown) {
fprintf(stdout, "Failed to get check for existing symbol.\n"); fprintf(stdout, "Failed to get check for existing symbol.\n");
@ -164,21 +163,20 @@ static void StartSymUploadProtocolV2(Options* options,
} }
} }
UploadURLResponse* URLResponse = [SymbolCollectorClient UploadURLResponse* URLResponse =
CreateUploadURL:options->uploadURLStr [SymbolCollectorClient createUploadURLOnServer:options->uploadURLStr
withAPIKey:options->apiKey]; withAPIKey:options->apiKey];
if (URLResponse == nil) { if (URLResponse == nil) {
return; return;
} }
NSURL* uploadURL = [NSURL URLWithString:[URLResponse uploadURL]]; NSURL* uploadURL = [NSURL URLWithString:[URLResponse uploadURL]];
HTTPPutRequest* putRequest = [[HTTPPutRequest alloc] HTTPPutRequest* putRequest = [[HTTPPutRequest alloc] initWithURL:uploadURL];
initWithURL:uploadURL];
[putRequest setFile:options->symbolsPath]; [putRequest setFile:options->symbolsPath];
NSError *error = nil; NSError* error = nil;
NSData* data = [putRequest send:&error]; NSData* data = [putRequest send:&error];
NSString *result = [[NSString alloc] initWithData:data NSString* result = [[NSString alloc] initWithData:data
encoding:NSUTF8StringEncoding]; encoding:NSUTF8StringEncoding];
int responseCode = [[putRequest response] statusCode]; int responseCode = [[putRequest response] statusCode];
[putRequest release]; [putRequest release];
@ -191,8 +189,8 @@ static void StartSymUploadProtocolV2(Options* options,
return; return;
} }
CompleteUploadResult completeUploadResult = [SymbolCollectorClient CompleteUploadResult completeUploadResult =
CompleteUpload:options->uploadURLStr [SymbolCollectorClient completeUploadOnServer:options->uploadURLStr
withAPIKey:options->apiKey withAPIKey:options->apiKey
withUploadKey:[URLResponse uploadKey] withUploadKey:[URLResponse uploadKey]
withDebugFile:debugFile withDebugFile:debugFile
@ -211,25 +209,24 @@ static void StartSymUploadProtocolV2(Options* options,
} }
//============================================================================= //=============================================================================
static void Start(Options *options) { static void Start(Options* options) {
NSArray *moduleParts = ModuleDataForSymbolFile(options->symbolsPath); NSArray* moduleParts = ModuleDataForSymbolFile(options->symbolsPath);
NSMutableString *compactedID = NSMutableString* compactedID =
[NSMutableString stringWithString:[moduleParts objectAtIndex:3]]; [NSMutableString stringWithString:[moduleParts objectAtIndex:3]];
[compactedID replaceOccurrencesOfString:@"-" withString:@"" options:0 [compactedID replaceOccurrencesOfString:@"-"
withString:@""
options:0
range:NSMakeRange(0, [compactedID length])]; range:NSMakeRange(0, [compactedID length])];
if (options->symUploadProtocol == SymUploadProtocolV1) { if (options->symUploadProtocol == SymUploadProtocolV1) {
StartSymUploadProtocolV1(options, moduleParts, compactedID); StartSymUploadProtocolV1(options, moduleParts, compactedID);
} else if (options->symUploadProtocol == SymUploadProtocolV2) { } else if (options->symUploadProtocol == SymUploadProtocolV2) {
StartSymUploadProtocolV2(options, StartSymUploadProtocolV2(options, moduleParts, compactedID);
[moduleParts objectAtIndex:4],
compactedID);
} }
} }
//============================================================================= //=============================================================================
static void static void Usage(int argc, const char* argv[]) {
Usage(int argc, const char *argv[]) {
fprintf(stderr, "Submit symbol information.\n"); fprintf(stderr, "Submit symbol information.\n");
fprintf(stderr, "Usage: %s [options] <symbol-file> <upload-URL>\n", argv[0]); fprintf(stderr, "Usage: %s [options] <symbol-file> <upload-URL>\n", argv[0]);
fprintf(stderr, "<symbol-file> should be created by using the dump_syms " fprintf(stderr, "<symbol-file> should be created by using the dump_syms "
@ -248,15 +245,14 @@ Usage(int argc, const char *argv[]) {
} }
//============================================================================= //=============================================================================
static void static void SetupOptions(int argc, const char* argv[], Options* options) {
SetupOptions(int argc, const char *argv[], Options *options) {
// Set default value of symUploadProtocol. // Set default value of symUploadProtocol.
options->symUploadProtocol = SymUploadProtocolV1; options->symUploadProtocol = SymUploadProtocolV1;
extern int optind; extern int optind;
char ch; char ch;
while ((ch = getopt(argc, (char * const *)argv, "p:k:hf?")) != -1) { while ((ch = getopt(argc, (char* const*)argv, "p:k:hf?")) != -1) {
switch (ch) { switch (ch) {
case 'p': case 'p':
if (strcmp(optarg, "sym-upload-v2") == 0) { if (strcmp(optarg, "sym-upload-v2") == 0) {
@ -314,8 +310,8 @@ SetupOptions(int argc, const char *argv[], Options *options) {
} }
//============================================================================= //=============================================================================
int main (int argc, const char * argv[]) { int main(int argc, const char* argv[]) {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
Options options; Options options;
bzero(&options, sizeof(Options)); bzero(&options, sizeof(Options));

View file

@ -12,6 +12,7 @@
5B6060C7222735E50015F0A0 /* HTTPGetRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5B6060C6222735E50015F0A0 /* HTTPGetRequest.m */; }; 5B6060C7222735E50015F0A0 /* HTTPGetRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5B6060C6222735E50015F0A0 /* HTTPGetRequest.m */; };
5B6060CA2227374E0015F0A0 /* HTTPSimplePostRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5B6060C92227374E0015F0A0 /* HTTPSimplePostRequest.m */; }; 5B6060CA2227374E0015F0A0 /* HTTPSimplePostRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5B6060C92227374E0015F0A0 /* HTTPSimplePostRequest.m */; };
5B6060D022273BDA0015F0A0 /* SymbolCollectorClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 5B6060CF22273BDA0015F0A0 /* SymbolCollectorClient.m */; }; 5B6060D022273BDA0015F0A0 /* SymbolCollectorClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 5B6060CF22273BDA0015F0A0 /* SymbolCollectorClient.m */; };
5B97447524D0AA5F000C71F5 /* encoding_util.m in Sources */ = {isa = PBXBuildFile; fileRef = 5B97447424D0AA5F000C71F5 /* encoding_util.m */; };
8B31022C11F0CEBD00FCF3E4 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08FB779EFE84155DC02AAC07 /* Foundation.framework */; }; 8B31022C11F0CEBD00FCF3E4 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08FB779EFE84155DC02AAC07 /* Foundation.framework */; };
8DD76F9A0486AA7600D96B5E /* symupload.m in Sources */ = {isa = PBXBuildFile; fileRef = 08FB7796FE84155DC02AAC07 /* symupload.m */; settings = {ATTRIBUTES = (); }; }; 8DD76F9A0486AA7600D96B5E /* symupload.m in Sources */ = {isa = PBXBuildFile; fileRef = 08FB7796FE84155DC02AAC07 /* symupload.m */; settings = {ATTRIBUTES = (); }; };
8DD76F9C0486AA7600D96B5E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08FB779EFE84155DC02AAC07 /* Foundation.framework */; }; 8DD76F9C0486AA7600D96B5E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08FB779EFE84155DC02AAC07 /* Foundation.framework */; };
@ -37,17 +38,18 @@
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
08FB7796FE84155DC02AAC07 /* symupload.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; path = symupload.m; sourceTree = "<group>"; tabWidth = 2; }; 08FB7796FE84155DC02AAC07 /* symupload.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; path = symupload.m; sourceTree = "<group>"; tabWidth = 2; };
08FB779EFE84155DC02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 08FB779EFE84155DC02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
5B6060BB222716FC0015F0A0 /* HTTPRequest.h */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = HTTPRequest.h; sourceTree = "<group>"; tabWidth = 2; }; 5B6060BB222716FC0015F0A0 /* HTTPRequest.h */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = HTTPRequest.h; path = ../../../common/mac/HTTPRequest.h; sourceTree = "<group>"; tabWidth = 2; };
5B6060BC222716FC0015F0A0 /* HTTPRequest.m */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; path = HTTPRequest.m; sourceTree = "<group>"; tabWidth = 2; }; 5B6060BC222716FC0015F0A0 /* HTTPRequest.m */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; name = HTTPRequest.m; path = ../../../common/mac/HTTPRequest.m; sourceTree = "<group>"; tabWidth = 2; };
5B6060BE2227201B0015F0A0 /* HTTPPutRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HTTPPutRequest.h; sourceTree = "<group>"; }; 5B6060BE2227201B0015F0A0 /* HTTPPutRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = HTTPPutRequest.h; path = ../../../common/mac/HTTPPutRequest.h; sourceTree = "<group>"; };
5B6060BF2227201B0015F0A0 /* HTTPPutRequest.m */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; path = HTTPPutRequest.m; sourceTree = "<group>"; tabWidth = 2; }; 5B6060BF2227201B0015F0A0 /* HTTPPutRequest.m */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; name = HTTPPutRequest.m; path = ../../../common/mac/HTTPPutRequest.m; sourceTree = "<group>"; tabWidth = 2; };
5B6060C22227303A0015F0A0 /* util.h */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = util.h; sourceTree = "<group>"; tabWidth = 2; }; 5B6060C22227303A0015F0A0 /* encoding_util.h */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = encoding_util.h; path = ../../../common/mac/encoding_util.h; sourceTree = "<group>"; tabWidth = 2; };
5B6060C5222735E50015F0A0 /* HTTPGetRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HTTPGetRequest.h; sourceTree = "<group>"; }; 5B6060C5222735E50015F0A0 /* HTTPGetRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = HTTPGetRequest.h; path = ../../../common/mac/HTTPGetRequest.h; sourceTree = "<group>"; };
5B6060C6222735E50015F0A0 /* HTTPGetRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HTTPGetRequest.m; sourceTree = "<group>"; }; 5B6060C6222735E50015F0A0 /* HTTPGetRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = HTTPGetRequest.m; path = ../../../common/mac/HTTPGetRequest.m; sourceTree = "<group>"; };
5B6060C82227374E0015F0A0 /* HTTPSimplePostRequest.h */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = HTTPSimplePostRequest.h; sourceTree = "<group>"; tabWidth = 2; }; 5B6060C82227374E0015F0A0 /* HTTPSimplePostRequest.h */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = HTTPSimplePostRequest.h; path = ../../../common/mac/HTTPSimplePostRequest.h; sourceTree = "<group>"; tabWidth = 2; };
5B6060C92227374E0015F0A0 /* HTTPSimplePostRequest.m */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; path = HTTPSimplePostRequest.m; sourceTree = "<group>"; tabWidth = 2; }; 5B6060C92227374E0015F0A0 /* HTTPSimplePostRequest.m */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; name = HTTPSimplePostRequest.m; path = ../../../common/mac/HTTPSimplePostRequest.m; sourceTree = "<group>"; tabWidth = 2; };
5B6060CE22273BDA0015F0A0 /* SymbolCollectorClient.h */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = SymbolCollectorClient.h; sourceTree = "<group>"; tabWidth = 2; }; 5B6060CE22273BDA0015F0A0 /* SymbolCollectorClient.h */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = SymbolCollectorClient.h; path = ../../../common/mac/SymbolCollectorClient.h; sourceTree = "<group>"; tabWidth = 2; };
5B6060CF22273BDA0015F0A0 /* SymbolCollectorClient.m */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; path = SymbolCollectorClient.m; sourceTree = "<group>"; tabWidth = 2; }; 5B6060CF22273BDA0015F0A0 /* SymbolCollectorClient.m */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; name = SymbolCollectorClient.m; path = ../../../common/mac/SymbolCollectorClient.m; sourceTree = "<group>"; tabWidth = 2; };
5B97447424D0AA5F000C71F5 /* encoding_util.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = encoding_util.m; path = ../../../common/mac/encoding_util.m; sourceTree = "<group>"; };
8B31022B11F0CE6900FCF3E4 /* Breakpad.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Breakpad.xcconfig; path = ../../../common/mac/Breakpad.xcconfig; sourceTree = SOURCE_ROOT; }; 8B31022B11F0CE6900FCF3E4 /* Breakpad.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Breakpad.xcconfig; path = ../../../common/mac/Breakpad.xcconfig; sourceTree = SOURCE_ROOT; };
8B3102B611F0D5CE00FCF3E4 /* BreakpadDebug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = BreakpadDebug.xcconfig; path = ../../../common/mac/BreakpadDebug.xcconfig; sourceTree = SOURCE_ROOT; }; 8B3102B611F0D5CE00FCF3E4 /* BreakpadDebug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = BreakpadDebug.xcconfig; path = ../../../common/mac/BreakpadDebug.xcconfig; sourceTree = SOURCE_ROOT; };
8B3102B711F0D5CE00FCF3E4 /* BreakpadRelease.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = BreakpadRelease.xcconfig; path = ../../../common/mac/BreakpadRelease.xcconfig; sourceTree = SOURCE_ROOT; }; 8B3102B711F0D5CE00FCF3E4 /* BreakpadRelease.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = BreakpadRelease.xcconfig; path = ../../../common/mac/BreakpadRelease.xcconfig; sourceTree = SOURCE_ROOT; };
@ -55,7 +57,7 @@
9BD833680B03E4080055103E /* HTTPMultipartUpload.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = HTTPMultipartUpload.h; path = ../../../common/mac/HTTPMultipartUpload.h; sourceTree = "<group>"; tabWidth = 2; }; 9BD833680B03E4080055103E /* HTTPMultipartUpload.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = HTTPMultipartUpload.h; path = ../../../common/mac/HTTPMultipartUpload.h; sourceTree = "<group>"; tabWidth = 2; };
9BD833690B03E4080055103E /* HTTPMultipartUpload.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; name = HTTPMultipartUpload.m; path = ../../../common/mac/HTTPMultipartUpload.m; sourceTree = "<group>"; tabWidth = 2; }; 9BD833690B03E4080055103E /* HTTPMultipartUpload.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; name = HTTPMultipartUpload.m; path = ../../../common/mac/HTTPMultipartUpload.m; sourceTree = "<group>"; tabWidth = 2; };
9BD835FB0B0544950055103E /* minidump_upload */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = minidump_upload; sourceTree = BUILT_PRODUCTS_DIR; }; 9BD835FB0B0544950055103E /* minidump_upload */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = minidump_upload; sourceTree = BUILT_PRODUCTS_DIR; };
9BD836000B0544BA0055103E /* minidump_upload.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = minidump_upload.m; sourceTree = "<group>"; }; 9BD836000B0544BA0055103E /* minidump_upload.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = minidump_upload.m; path = ../../../common/mac/minidump_upload.m; sourceTree = "<group>"; };
/* End PBXFileReference section */ /* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */ /* Begin PBXFrameworksBuildPhase section */
@ -87,7 +89,8 @@
5B6060C92227374E0015F0A0 /* HTTPSimplePostRequest.m */, 5B6060C92227374E0015F0A0 /* HTTPSimplePostRequest.m */,
5B6060C5222735E50015F0A0 /* HTTPGetRequest.h */, 5B6060C5222735E50015F0A0 /* HTTPGetRequest.h */,
5B6060C6222735E50015F0A0 /* HTTPGetRequest.m */, 5B6060C6222735E50015F0A0 /* HTTPGetRequest.m */,
5B6060C22227303A0015F0A0 /* util.h */, 5B6060C22227303A0015F0A0 /* encoding_util.h */,
5B97447424D0AA5F000C71F5 /* encoding_util.m */,
5B6060BE2227201B0015F0A0 /* HTTPPutRequest.h */, 5B6060BE2227201B0015F0A0 /* HTTPPutRequest.h */,
5B6060BF2227201B0015F0A0 /* HTTPPutRequest.m */, 5B6060BF2227201B0015F0A0 /* HTTPPutRequest.m */,
5B6060BB222716FC0015F0A0 /* HTTPRequest.h */, 5B6060BB222716FC0015F0A0 /* HTTPRequest.h */,
@ -194,6 +197,7 @@
5B6060C7222735E50015F0A0 /* HTTPGetRequest.m in Sources */, 5B6060C7222735E50015F0A0 /* HTTPGetRequest.m in Sources */,
5B6060C02227201B0015F0A0 /* HTTPPutRequest.m in Sources */, 5B6060C02227201B0015F0A0 /* HTTPPutRequest.m in Sources */,
5B6060BD222716FC0015F0A0 /* HTTPRequest.m in Sources */, 5B6060BD222716FC0015F0A0 /* HTTPRequest.m in Sources */,
5B97447524D0AA5F000C71F5 /* encoding_util.m in Sources */,
9BD8336B0B03E4080055103E /* HTTPMultipartUpload.m in Sources */, 9BD8336B0B03E4080055103E /* HTTPMultipartUpload.m in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;