• 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: Dustin Mierau <email@hidden>
  • Date: Thu, 27 Dec 2001 02:28:32 -0800

shouldn't the request look like this:

GET / HTTP/1.1n\n\n
Accept: text/html\n\n
User-Agent: Mozilla/4.0\n\n
Host: www.apple.com\n\n
Connection: close\n\n

? I haven't used CFNetwork, but I think you are terminating your lines incorrectly, and I don't think there is need for the double \n at the end of your request.

lates,
-dustin

On Wednesday, December 26, 2001, at 11:55 PM, Bila Kiss 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
--
Bila Kiss telno. 604.264.6113
Arborealis Research email. email@hidden
3322 W 36th Avenue
Vancouver, BC, CANADA V6N 2R9
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: CFNetwork?
      • From: Béla Kiss <email@hidden>
    • Re: CFNetwork?
      • From: Gus Mueller <email@hidden>
References: 
 >CFNetwork? (From: Béla Kiss <email@hidden>)

  • Prev by Date: CFNetwork?
  • Next by Date: Re: Stack size
  • Previous by thread: CFNetwork?
  • Next by thread: Re: CFNetwork?
  • Index(es):
    • Date
    • Thread