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

Re: CFNetwork?


  • Subject: Re: CFNetwork?
  • From: "Jeff Galyan" <email@hidden>
  • Date: Thu, 27 Dec 2001 11:45:51 -0700

Looking through the CFNetwork.pdf, it looks like you want to use
CFHTTPMessageCopyHeaderFieldValue() or CFHTTPMessageCopyAllHeaderFields()
once the incoming HTTP message is deserialized completely.

--Jeff



On 12/27/01 12:55 AM, "Bila Kiss" <email@hidden> wrote:

> Has anybody been able to get the CFNetwork stuff to work? No matter what I
> put in my request header, CFHTTPMessageIsHeaderComplete() keeps returning
> false.
>
> A sample HTTP request that doesn't work for me is:
>
> GET / HTTP/1.1\r\n
> Accept: text/html\r\n
> User-Agent: Mozilla/4.0\r\n
> Host: www.apple.com\r\n
> Connection: close\r\n
> \r\n
>
> (FWIW, it serializes correctly using CFHTTPMessageCopySerializedMessage().)
>
> If I then try to stream the request out as demonstrated in the
> CFNetwork.pdf, CFReadStreamForHTTPRequest() seems to return a valid stream
> and CFReadStreamOpen() returns true but
> CFReadStreamCopyProperty(myReadStream, kCFStreamPropertyHTTPResponseHeader)
> returns NULL.
>
> Any pointers would be much appreciated.
>
> Cheers,
>
> Bila


References: 
 >CFNetwork? (From: Béla Kiss <email@hidden>)

  • Prev by Date: Re: Can I use AGL functions with NSOpenGLContext ?
  • Next by Date: Unexpected behavior of NSNumberFormatter
  • Previous by thread: Re: CFNetwork?
  • Next by thread: AppleScript and application attributes ?
  • Index(es):
    • Date
    • Thread