• 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: Gus Mueller <email@hidden>
  • Date: Thu, 27 Dec 2001 08:50:10 -0600

No, he had it right the first time-
Every line in the http header ends with a CRLF (\r\n), and then a single
empty line ending with a CRLF marks the end of the headers.

check out http://www.w3.org/Protocols/rfc2068/rfc2068 for more info on
http 1.1

-gus

Dustin Mierau (email@hidden) wrote:
> 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.
> _______________________________________________
> 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.

-gus

--
"Christmas means carnage!" -- Ferdinand, the duck
"Convenience kills." -- August the Conqueror


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

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