curl-library
Re: Empty HTTP POST request
Date: Thu, 12 Jan 2012 10:41:03 -0800
On Thu, Jan 12, 2012 at 08:02:12AM -0800, Max Burke wrote:
> I'm setting up a POST request with only a handful of fields and I've
> verified that the data pointers are valid, however it doesn't look
> like anything is actually being sent. Both Wireshark and the server
> logs show that the POST request is empty.
>
> Here is the code I'm using to setup and initiate the transfer:
> http://pastebin.com/g3fU1CqZ
>
> Both the server logs and wireshark confirm that the post request is
> empty, so I'm assuming it's a problem with how I'm using the library.
> Does anything look obviously wrong?
The first and last pointers are not being initialized to NULL before
calling curl_formadd. When libcurl gets the, it finds garbage it can't
do anything with. If you look at the return code of curl_formadd, you'll
probably see an error code returned.
>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-01-12