• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Returning custom NSURLResponse from NSURLProtocol
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Returning custom NSURLResponse from NSURLProtocol (From: Jens Alfke <email@hidden>)

  • Prev by Date: Returning custom NSURLResponse from NSURLProtocol
  • Next by Date: NSURLProtocol - connection never receives response till protocol finishes
  • Previous by thread: Returning custom NSURLResponse from NSURLProtocol
  • Next by thread: NSURLProtocol - connection never receives response till protocol finishes
  • Index(es):
    • Date
    • Thread