Re: HTTP response using CFHTTPMessageCreateEmpty/CFHTTPMessageAppendBytes
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