-[NSXMLDocument copy] doesn't copy MIMEType
| Originator: | brent | ||
| Number: | rdar://13230248 | Date Originated: | 16-Feb-2013 |
| Status: | Open | Resolved: | |
| Product: | Mac OS X | Product Version: | 12C60 |
| Classification: | Other Bug | Reproducible: | Always |
16-Feb-2013 12:25 AM Brent Royal-Gordon:
Summary:
NSXMLDocument supports the -copy message. However, the resulting object has a nil MIMEType field, even when the original had a MIME type set.
Steps to Reproduce:
1. Create an NSXMLDocument:
NSXMLDocument * doc = [[NSXMLDocument alloc] initWithXMLString:@"<html><head><title>foo</title><body></body></html>" options:0 error:NULL];
2. Set its MIME type:
[doc setMIMEType:@"text/html"];
3. Copy the document:
NSXMLDocument * copiedDoc = [doc copy];
4. Check that the document has a MIME type set:
NSAssert([copiedDoc MIMEType], @"Copy has MIME type");
Expected Results:
The assertion passes; the copy has MIME type text/html.
Actual Results:
The assertion fails; the copy has a nil MIME type.
Regression:
Unknown.
Notes:
Though MIME types are optional, I end up using them to create WebResource objects.
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!