cURL / Mailing Lists / curl-users / Single Mail

curl-users

Problems with a POST passing over 60k of data

From: M D <booomer10_at_yahoo.com>
Date: Thu, 1 May 2003 06:44:41 -0700 (PDT)

I’m running into problems passing a very large request
(60K+). This code works fine for smaller requests but
blows up before the RPC is made when I pass a very
large request. Any suggestions?

CURL *HTTPRPC;
Char* urltest="http://myurl.com/myuri/myservlet";
Char* msg="parm1=fctname&parm2=60kofXMLData…" //
this is a BIG request...

curl_easy_setopt(HTTPRPC, CURLOPT_URL, urltest);

/* explicitly specify POST */
curl_easy_setopt(HTTPRPC, CURLOPT_POSTFIELDS, msg);

/* explicitly specify POST SIZE*/
curl_easy_setopt(HTTPRPC, CURLOPT_POSTFIELDSIZE,
strlen(msg));
                
// Tell curl about what function to call with the
results...
curl_easy_setopt(HTTPRPC, CURLOPT_WRITEFUNCTION,
Session__write);

// And what to pass to the function for the userp...
curl_easy_setopt(HTTPRPC, CURLOPT_FILE, &results);

// Now just run it!
CURLcode res = curl_easy_perform(HTTPRPC);

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2003-05-01