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: Mon, 22 Feb 2016 12:35:04 -0800
On Feb 22, 2016, at 11:57 AM, Wim Lewis < email@hidden> wrote:
The other thing that a well-written client can do in that case is make use of the "Expect: continue" header to allow the server to accept or reject the request (or request authorization) before the large POST/PUT body is sent.
Oh, I wasn’t aware of that — it’s a good solution to the problem of authorizing uploads.
I’ve changed our code to manually add the Authorization: header before sending the request. I now think we can’t work with CFNetwork’s authentication-challenge API, because we need to be able to send different credentials in different requests to the same server (potentially at the same time) and I’ve experimentally determined that CFNetwork doesn’t support that.
FYI, I don’t think I posted this to the list before, but the behavior I reported, about CFNetwork always sending an unauthenticated request first, is a CFNetwork bug. It was very easy to reproduce in a simple test case (for iOS or Mac OS.) I filed it as rdar://24753862.
—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