NSURLRequest creation removes NSURL's relativity
| Originator: | DeFrenZ | ||
| Number: | rdar://23293328 | Date Originated: | 28-Oct-2015 12:34 PM |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | iOS 9.1 |
| Classification: | Other Bug | Reproducible: | Always |
Summary: Creating an NSURLRequest object with an NSURL doesn't keep the relative URL info on its URL property. A copy does remove that info as well. Steps to Reproduce: let foo = NSURL(string: "https://www.foo.com/")! let bar = NSURL(string: "bar", relativeToURL: foo)! let foobar = NSURLRequest(URL: bar) foobar.URL!.baseURL == nil Expected Results: The URL property of the NSURLRequest to have the same baseURL as the one used to create it. Actual Results: The request had a nil URL!.baseURL Regression: I'm not sure if it was the same on earlier SDKs
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!