• 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
How should a NSURLProtocol handle a wrong URL?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How should a NSURLProtocol handle a wrong URL?


  • Subject: How should a NSURLProtocol handle a wrong URL?
  • From: Daryle Walker <email@hidden>
  • Date: Fri, 01 Aug 2014 06:58:13 -0400

I’m talking about the protocol being passed a wrong scheme, getting a URL with/without an authority (“//“ and a host) but you handle only the other way, misspelled string, etc.

canInitWithRequest: can just return NO.
Should canonicalRequestForRequest: return nil?
I don’t know what to do for requestIsCacheEquivalent:toRequest: (and remember that there’s 2 points of failure here).
Should initWithRequest:cachedResponse:client: return nil too?

Maybe for misspelled strings, you can return a resource-not-found error in the response object.

— 
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT mac DOT com 

 _______________________________________________
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

  • Follow-Ups:
    • Re: How should a NSURLProtocol handle a wrong URL?
      • From: "Quinn \"The Eskimo!\"" <email@hidden>
  • Next by Date: Re: How should a NSURLProtocol handle a wrong URL?
  • Next by thread: Re: How should a NSURLProtocol handle a wrong URL?
  • Index(es):
    • Date
    • Thread