How should a NSURLProtocol handle a wrong URL?
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