• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Force authentication with NSURLConnection
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Force authentication with NSURLConnection


  • Subject: Re: Force authentication with NSURLConnection
  • From: Dave Dribin <email@hidden>
  • Date: Fri, 16 Mar 2007 15:32:07 -0500

On Mar 16, 2007, at 12:03 PM, Justin R. Miller wrote:
On Mar 16, 2007, at 12:57 PM, Justin R. Miller wrote:
Are you forming an NSURLRequest? Could you use its method:
-(NSString *)valueForHTTPHeaderField:(NSString *)field

to set your Accept-HTTP header?

Oh wait, I see what you mean. You still need a way to set the auth credentials without ever being prompted for them. Hmm.

Yeah, exactly.

I don't think that it's a legitimate adherence to the HTTP rules.

I think it actually is a valid corner case:

  <http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.8>

"A user agent that wishes to authenticate itself with a server-- usually, but not necessarily, after receiving a 401 response--does so by including an Authorization request-header field with the request."

I believe this would be covered by the "not necessarily" phrase.

Probably why Cocoa doesn't implement it... sorry that doesn't help you, but I can't see a way to work around it strictly in Cocoa.

Maybe an NSTask using curl?

I had been using CURLHandle/libcurl, and it does deal with authentication correctly. However, I started modifying CURLHandle too much for my liking (it had issues with multipart POST requests), and it was also based on the deprecated NSURLHandle. So I started to investigate alternatives. NSURLConnection looked perfect, if I could get it to connect.


-Dave

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Force authentication with NSURLConnection (From: Dave Dribin <email@hidden>)
 >Re: Force authentication with NSURLConnection (From: "Justin R. Miller" <email@hidden>)
 >Re: Force authentication with NSURLConnection (From: "Justin R. Miller" <email@hidden>)

  • Prev by Date: How to make NSTreeController expand some items
  • Next by Date: capturing a double-click on a control
  • Previous by thread: Re: Force authentication with NSURLConnection
  • Next by thread: Re: Force authentication with NSURLConnection
  • Index(es):
    • Date
    • Thread