Re: CFNetwork, HTTP and POST messages
Re: CFNetwork, HTTP and POST messages
- Subject: Re: CFNetwork, HTTP and POST messages
- From: David Lalonde <email@hidden>
- Date: Fri, 16 Dec 2005 11:24:36 -0500
Hello All,
Thanks to your help, my problem is now resolved.
Becky Willrich's instruction (quoted below) allowed me to see post data
when using tcpflow (Great utility! Thanks again Jim!). It looks like
one should set the "Content-Type" header field to
"application/x-www-form-urlencoded" when posting data to a WEB server
(Apache), otherwise the server does not pass the POST data to the PHP
page.
You need to configure the request BEFORE creating the stream - the two
CFReadStreamCreate calls will take a copy of the request. That's
probably why the body of the request is empty. Just move the
CFHTTPMessageAddAuthentication(), CFHTTPMessageSetHeaderFieldValue(),
and CFHTTPMessageSetBody() calls to prior to the CFReadStreamCreate()
calls.
Hope that helps,
REW
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden