cURL / Mailing Lists / curl-library / Single Mail


RE: Request is getting truncated by my WAS App server

From: <>
Date: Thu, 12 May 2005 13:13:41 -0000

richard, your original code uses a GET request, not a POST. that's why it
shows up in the url, and why it is truncated.

when you use an html form, are you using a file upload box? your browser
likely makes it into a POST, even if you are pasting the xml directly into
a text box.

you can make it post without it being multi-part, unless you are planning
to use the file upload design.


On Wed, May 11, 2005, "Cobb, Richard" <>

> Sorry, hit send to early...
> The return code was good when I ran it before, I cut out the error
> logic to make the example easier to follow. I did however get a message
> to large error from my WAS server. When I hit my PC WSAD app server it
> just truncates with no error message. I really don't want a multi part
> form because I just want to send an xml request to the server. And yes
> you are right, what I think is happening is that the entire request is
> getting sent in the header, nothing is appearing inside the request
> body. From my monitor the request looks like a get request
>"<alota data>"
> It comes in on one long line and does not appear inside the request
> body. When I send a sample request via an HTML form it works just fine
> and the XML data is in the body. Sorry to be confusing before...
> -----Original Message-----
> From:
> [] On Behalf Of Daniel Stenberg
> Sent: Wednesday, May 11, 2005 6:20 PM
> To: libcurl development
> Subject: Re: Request is getting truncated by my WAS App server
> On Wed, 11 May 2005, Cobb, Richard wrote:
>> I am new to Curl and am trying to fix some old code (someone wrote
>> long ago)
>> that only sends the first 2k of the request. I put a scope on it and
> it
>> seems to be coming in with the URL and not placing the XML inside the
>> Header.
> What libcurl version on what OS?
> What happens when it stops? What does curl_easy_perform() return then?
>> printf("%s",pTURL);
>> curl_easy_setopt(localcurlHndl, CURLOPT_URL,
>> "" );
>> curl_easy_setopt(localcurlHndl, CURLOPT_POSTFIELDS,pTURL);
>> curl_easy_setopt(localcurlHndl, CURLOPT_POSTFIELDSIZE,
>> strlen(pTURL));
>> curl_easy_perform(localcurlHndl);
> Whoa, if you fetch the return code (and CURLOPT_ERRORMESSAGE) it might
> actually tell you more about the problem.
> The code looks fine to me otherwise.
>> The question is do I need to use the curl_formadd to get this data
>> inside
>> the header?
> POST data should not be and is not in the header in case, POST data is
> in the
> request-body. The above snippet will put the data in the request-body,
> and so
> will curl_formadd() and CURLOPT_HTTPPOST, but formadd makes multipart
> formposts, which your current code does not.
> --
> Commercial curl and libcurl Technical Support:

Received on 2005-05-12