Re: CFNetwork is not adding Authorization: headers proactively
Re: CFNetwork is not adding Authorization: headers proactively
- Subject: Re: CFNetwork is not adding Authorization: headers proactively
- From: Jens Alfke <email@hidden>
- Date: Fri, 19 Feb 2016 13:21:10 -0800
On Feb 18, 2016, at 11:27 PM, Quinn The Eskimo! < email@hidden> wrote:
It'd be great if you could include a test project that reproduces it, along with a CFNetwork diagnostics log [1].
I’ve created a very simple test. I can reproduce the problem in it, if I set the persistence of the NSURLCredential to “None”. I have a feeling you’ll say this is by design, because I’ve told the system not to reuse the credential. The problem is that if I upgrade the persistence to “ForSession”, I no longer get any say in what credential is sent — CFNetwork automatically sends the same credential on subsequent requests without first invoking my auth callback. I need that control, because I may have multiple NSURLSessions that need to send different credentials to the same server. (See the question I just posted about what “ForSession” means.)
But strangely, the problem persists in my app even if I set the credential persistence to “ForSession”, whereas the test app doesn’t show the problem. I’m reading through the CFNETWORK_DIAGNOSTICS logs to figure out what the difference is.
—Jens |
_______________________________________________
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