Re: Questions on when credentials are used in NSURLSessionDownloadTask
Re: Questions on when credentials are used in NSURLSessionDownloadTask
- Subject: Re: Questions on when credentials are used in NSURLSessionDownloadTask
- From: Jens Alfke <email@hidden>
- Date: Sun, 19 Apr 2015 23:11:51 -0700
On Apr 19, 2015, at 6:52 PM, Daryle Walker < email@hidden> wrote:
It does work for HTTP, but only for Basic Authentication. Use for a Digest Authentication HTTP send fails. What am I missing in the latter case?
Not sure why it would work for Basic but not Digest. One difference is that Digest always requires a challenge-and-response cycle — even if it already knows the credential, NSURLConnection can’t send it the first time, but has to send the request without it, then get the challenge string in the HTTP 401 response, then use that to construct the actual auth header that it sends on the next attempt.
But that should be transparent to you, since you just implement the callback to provide the credential on demand.
—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