• 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: HTTP response using CFHTTPMessageCreateEmpty/CFHTTPMessageAppendBytes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HTTP response using CFHTTPMessageCreateEmpty/CFHTTPMessageAppendBytes


  • Subject: Re: HTTP response using CFHTTPMessageCreateEmpty/CFHTTPMessageAppendBytes
  • From: Greg Hoover <email@hidden>
  • Date: Sat, 14 Mar 2009 17:46:44 -0700

Wow. Don't you hate it when its staring you in the face and you still can't see it.

Thanks.

On Mar 14, 2009, at 5:31 PM, Michael Ash wrote:

On Sat, Mar 14, 2009 at 5:17 PM, Greg Hoover <email@hidden> wrote:
I'm trying to parse an HTTP Post response using the following code. The
problem is that CFHTTPMessageAppendBytes always returns false. I've tested
by stripping down the response to just "HTTP/1.0 200 OK\r\n\r\n" and still
no go. Does anyone know what the appropriate response format is?


CFHTTPMessageRef response = CFHTTPMessageCreateEmpty(kCFAllocatorDefault,
TRUE);

From the documentation for CFHTTPMessageCreateEmpty:

Pass TRUE to create an empty request message; pass FALSE to create an
empty response message.

You're passing TRUE, indicating a request, but then you're feeding it
a response. What happens if you pass FALSE?

Mike

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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: 
 >HTTP response using CFHTTPMessageCreateEmpty/CFHTTPMessageAppendBytes (From: Greg Hoover <email@hidden>)

  • Prev by Date: Re: How to create an NSDecimal?
  • Next by Date: Re: How to create an NSDecimal?
  • Previous by thread: HTTP response using CFHTTPMessageCreateEmpty/CFHTTPMessageAppendBytes
  • Next by thread: How to flash two rectangles in a frame?
  • Index(es):
    • Date
    • Thread