• 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: CFHTTPMessageAddAuthentication query
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CFHTTPMessageAddAuthentication query


  • Subject: Re: CFHTTPMessageAddAuthentication query
  • From: Frederick Cheung <email@hidden>
  • Date: Thu, 11 May 2006 23:02:11 +0100


On 10 May 2006, at 13:00, Trygve Inda wrote:

I need to authenticate to use a proxy.

My code is based on the CFHTTP Download sample and goes something like (some
stuff removed):
So then in my callback, I need to look for a 407 error, true?


How do I get the data to be passed back to CFHTTPMessageAddAuthentication ?

request: is this just the original messageRef? It has already been attached
to the stream? It has also been released?


No, it's the 407 response itself (which should contain a WWW- Authenticate challenge containing authentication parameters (ie not much for basic authentication, but for stuff like digest auth contains all sorts of parameters needed in order to create a response.

Fred
authenticationFailureResponse: how do I get this out of my callback (what
property is it looking for?) which looks a bit like:


case kCFStreamEventHasBytesAvailable:

cfHeader = (CFHTTPMessageRef) CFReadStreamCopyProperty (stream,
kCFStreamPropertyHTTPResponseHeader);

dInfo->mStatus = CFHTTPMessageGetResponseStatusCode (cfHeader);


Is there some sample code to do this?

Thanks,

Trygve


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden


This email sent to email@hidden

_______________________________________________ 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
References: 
 >CFHTTPMessageAddAuthentication query (From: Trygve Inda <email@hidden>)

  • Prev by Date: Re: kernel events
  • Next by Date: vendor code in kernel extension and application
  • Previous by thread: CFHTTPMessageAddAuthentication query
  • Next by thread: CFReadStreamOpen crash ! ! !
  • Index(es):
    • Date
    • Thread