Re: Returning custom NSURLResponse from NSURLProtocol
Re: Returning custom NSURLResponse from NSURLProtocol
- Subject: Re: Returning custom NSURLResponse from NSURLProtocol
- From: "Quinn \"The Eskimo!\"" <email@hidden>
- Date: Fri, 2 Dec 2011 18:52:35 +0000
On 2 Dec 2011, at 18:04, Jens Alfke wrote:
> I tried subclassing NSHTTPURLResponse and overriding -statusCode and -allHeaderFields to return my own values.
Yeah, this won't work because NSHTTPURLResponse is actually a wrapper around a CFNetwork object. Apple code accesses these properties via a CFNetwork SPI, and that doesn't see your overrides.
Are you planning to ship on an App Store (Mac or iOS)?
Share and Enjoy
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden