aboutsummaryrefslogtreecommitdiff
path: root/src/common/mac/HTTPMultipartUpload.m
Commit message (Collapse)AuthorAgeFilesLines
* Increase timeout of HTTPMultipartUpload from 10s to 60s.John Z Wu2019-05-131-1/+1
| | | | | | | | | | | | | | | This, hopefully, will reduce occurrences of UnfinishedReportUploads. It will not eliminate it completely because uploads are never retried if they fail. 60s is actually the default value. Before iOS6, 240s was the default and minimum applied to requests with a body. Reference: https://developer.apple.com/documentation/foundation/nsmutableurlrequest/1414063-timeoutinterval?language=objc Bug:850379 Change-Id: I2f16fda7d7e8cbb8b8a6fc917111d9f646fbdad0 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1609876 Reviewed-by: Mark Mentovai <mark@chromium.org>
* Use NSURLSession if the min version we support is iOS 7+.George Kola2017-03-091-7/+5
| | | | | | | | | | | | | | | Because many apps still support iOS 8, they were defaulting to deprecated NSURLConnection even if the code ran on iOS 10. NSURLConnection requires a run loop and hence the code did not always upload if the queue ran on a thread without a Run Loop. This should improve break pad uploads BUG= Change-Id: I7bff80ea977fd1ab13c8812ed933ef842dab417f Reviewed-on: https://chromium-review.googlesource.com/451880 Reviewed-by: Sylvain Defresne <sdefresne@chromium.org> Reviewed-by: Mark Mentovai <mark@chromium.org>
* Fix usage of deprecated method sendSynchronousRequest:returningResponse:error:.Sylvain Defresne2016-02-081-3/+43
| | | | | | | | | | | | | The method -[NSURLConnection sendSynchronousRequest:returningResponse:error:] has been deprecated in 10.11 OS X SDK and 9.0 iOS SDK without replacement. So emulate a synchronous request by using an asynchronous request and waiting on a semaphore for the request completion. BUG=https://bugs.chromium.org/p/google-breakpad/issues/detail?id=675 BUG=569158 R=mark@chromium.org Review URL: https://codereview.chromium.org/1675243002 .
* Fix usage of deprecated method stringByAddingPercentEscapesUsingEncoding:.Sylvain Defresne2016-02-081-4/+19
| | | | | | | | | | | | | | | | The method -[NSString stringByAddingPercentEscapesUsingEncoding:] has been deprecated with 10.11 OS X SDK and 9.0 iOS SDK. The recommended method is -[NSString stringByAddingPercentEncodingWithAllowedCharacters:] available since 10.9 OS X SDK and 7.0 iOS SDK. Use the new method when available using URLQueryAllowedCharacterSet to get the same encoded string. BUG=https://bugs.chromium.org/p/google-breakpad/issues/detail?id=675 BUG=569158 R=mark@chromium.org Review URL: https://codereview.chromium.org/1680663002 .
* Revert "Fix deprecatation warning when building for recent SDKs on iOS/OS X."Olivier Robin2016-01-211-59/+7
| | | | | | | | | | | | | | | | | | | | This reverts CL https://codereview.chromium.org/1563223004/ This reverts commit 7cc0d8562bf8b20b88cc941ba72593cb7230ecf6. CL 1563223004 introduces two bugs on iOS. - Encoding the minidump name with extra percent causing crash server to fail processing the file. - Using a released pointer causing random crashes on upload. The data, resp, err pointers returned in the NSURLSession completion handler is released at the end of the block. When used later (to get the crash ID), it causes a crash. BUG=569158 R=blundell@chromium.org, mark@chromium.org Review URL: https://codereview.chromium.org/1619603002 . Patch from Olivier Robin <olivierrobin@chromium.org>.
* Fix deprecatation warning when building for recent SDKs on iOS/OS X.Sylvain Defresne2016-01-071-7/+59
| | | | | | | | | | | | | | | | | | | | | | | | Fixes the following compilation warning when using recent version of the iOS or OS X SDK by using the recommended new API: ../../breakpad/src/common/mac/HTTPMultipartUpload.m:56:10: error: 'stringByAddingPercentEscapesUsingEncoding:' is deprecated: first deprecated in iOS 9.0 - Use -stringByAddingPercentEncodingWithAllowedCharacters: instead, which always uses the recommended UTF-8 encoding, and which encodes for a specific URL component or subcomponent since each URL component or subcomponent has different rules for what characters are valid. [-Werror,-Wdeprecated-declarations] [key stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; ^ CFURLCreateStringByAddingPercentEscapes ../../breakpad/src/common/mac/HTTPMultipartUpload.m:207:29: error: 'sendSynchronousRequest:returningResponse:error:' is deprecated: first deprecated in iOS 9.0 - Use [NSURLSession dataTaskWithRequest:completionHandler:] (see NSURLSession.h [-Werror,-Wdeprecated-declarations] data = [NSURLConnection sendSynchronousRequest:req ^ ../../breakpad/src/client/mac/handler/minidump_generator.cc:158:6: error: 'CFPropertyListCreateFromXMLData' is deprecated: first deprecated in iOS 8.0 - Use CFPropertyListCreateWithData instead. [-Werror,-Wdeprecated-declarations] (CFPropertyListCreateFromXMLData(NULL, data, kCFPropertyListImmutable, ^ BUG=https://bugs.chromium.org/p/google-breakpad/issues/detail?id=675 BUG=569158 R=mark@chromium.org Review URL: https://codereview.chromium.org/1563223004 .
* Use local variable for out parameter rather than direct use of ivarivanpe@chromium.org2015-06-201-2/+3
| | | | | | | | | | | | - Resolves spurious static analyzer warning about response_ being potentially leaked due to the retain in Xcode 6.3 and later. I'm submitting this on behalf of Brian Moore. R=qsr@chromium.org Review URL: https://codereview.chromium.org/1171693007 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1460 4c0a9323-5329-0410-9bdc-e9ce6186880e
* This CL initialize NSData in HTTPMultipartUpload.m to nil.qsr@chromium.org2014-09-121-1/+1
| | | | | | | | | | | | Problem introduced by issue 2764002. R=qsr@chromium.org Review URL: https://breakpad.appspot.com/2794002 Patch from Oliver Robin <olivierrobin@chromium.org>. git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1374 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Adding possibility for client to upload the fileblundell@chromium.org2014-09-011-6/+10
| | | | | | | | | | | | | | | | | | This CL adds three features that will allow the client to upload the report file. Three main modifications are made : - Allow upload url to have a file:// scheme, and write the HTTP request to file in that case - Split the request in two parts in case of a file:// scheme, the request time and the response time. A new API [handleNetworkResponse] is added. - Give the opportunity to the client to get the configuration NSDictionary to be able to recreate the breakpad context at response time. Patch by Olivier Robin <olivierrobin@chromium.org> Review URL: https://breakpad.appspot.com/2764002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1368 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fixing HTTPMultipartUpload.qsr@chromium.org2012-05-151-2/+2
| | | | | | | | 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
* Bits necessary to send the reports along with the minidumps.mark@chromium.org2012-05-111-1/+4
| | | | | | | | | | | | | | | | 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
* Fix some compilation warnings and other errors due to API changesmark@chromium.org2011-09-291-1/+2
| | | | | | Review URL: http://breakpad.appspot.com/305002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@841 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Clean up build for 64 bit.dmaclach2010-07-191-4/+4
| | | | | | | | | | | Fix up some broken mac projects. Consolidate project settings in xcconfig files. http://breakpad.appspot.com/130001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@627 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Issue 197: reviewed by Waylonisladderbreaker2007-08-161-1/+8
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@201 4c0a9323-5329-0410-9bdc-e9ce6186880e
* issue 134: reduce timeout period for minidump upload : reviwer waylonisladderbreaker2007-03-161-1/+5
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@128 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Added method to allow adding a file's contents directly. Fixes issue #105.waylonis2007-01-041-12/+30
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@100 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Changed files_ to be a Dictionary.waylonis2006-12-141-7/+7
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@87 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add the HTTP uploading class for Mac.waylonis2006-12-141-0/+176
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@86 4c0a9323-5329-0410-9bdc-e9ce6186880e