NSURLSessionUploadTask with a file body that doesn't exist should fail.
| Originator: | contact | ||
| Number: | rdar://15689128 | Date Originated: | 18-Dec-2013 12:02 PM |
| Status: | Open | Resolved: | |
| Product: | Foundation | Product Version: | OS X 10.9/iOS 7.0 |
| Classification: | Reproducible: | Always |
Summary: When a NSURLSessionUploadTask created with a body file is attempted to run and the file doesn't exist it should rail with an error. Steps to Reproduce: 1.- Setup and create a background session 2.- Create a NSURLSessionUploadTask with`uploadTaskWithRequest:fromFile:` 3.- Delete the file on the argument `fromFile` 4.- resume the taso Expected Results: `- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didCompleteWithError:(NSError *)error` gets called with an error specifing that the file doesn't exist. Actual Results: `- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didCompleteWithError:(NSError *)error` gets called with a completed task that did a request without a body. Regression: Describe circumstances where the problem occurs or does not occur, such as software versions and/or hardware configurations. Notes: Failing with an error like that, allows us to recreate the body and task if necessary.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!