Getting NSURLConnection to not ignore "Cookie:" request headers?
Getting NSURLConnection to not ignore "Cookie:" request headers?
- Subject: Getting NSURLConnection to not ignore "Cookie:" request headers?
- From: Jens Alfke <email@hidden>
- Date: Wed, 19 Nov 2014 09:58:33 -0800
It looks as though "Cookie:" headers in an NSURLRequest are ignored by the NSURLConnection when sending an HTTP request.
This is causing a problem for me, because my library (Couchbase Lite) allows the client to add custom headers to the requests the library sends via its REST API. And some clients need to add custom cookies. And some of these clients are written in JavaScript (via PhoneGap) and don't have direct access to Cocoa APIs like NSHTTPCookieStorage.
Is there a workaround to allow the "Cookie:" header to be passed through? I've considered looking for such headers in the custom headers from the client and adding them to the NSHTTPCookieStorage, but then they'd be passed to _every_ future request to that host, which may not be what the client intended.
—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