Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CFNetwork, HTTP and POST messages



On 12/15/05, David Lalonde <email@hidden> wrote:
> Hello All,
>
> I am moving away from URLAcess and into CFNetwork, as I need to
> authenticate through a proxy server. This is the first time I use Core
> Foundation and CFNetwork and I have run into problems I know not how to
> resolve.
>
> Here is the problem: My application sends a HTTP POST message to a PHP
> page. The PHP page echoes the received POST data. My application then
> outputs the HTTP response into a text file. When I look at the response
> file, I see no POST data.
>
> I tried to set the message's body two ways: By using
> CFHTTPMessageSetBody, taking care of setting the "Content-Length"
> header field appropriately; By using
> CFReadStreamCreateForStreamedHTTPRequest, taking care of opening a read
> stream to the body data's content first.
>
> Anyone have an idea as to what I am doing wrong?

Both of those should work. Do you know that the data is actually
getting as far as the server (use tcpdump etc...)?

Fred
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/macnetworkprog/email@hidden

This email sent to email@hidden

References: 
 >CFNetwork, HTTP and POST messages (From: David Lalonde <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.