cURL / Mailing Lists / curl-library / Single Mail


RE: Request is getting truncated by my WAS App server

From: Cobb, Richard <>
Date: Wed, 11 May 2005 18:43:09 -0400

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-----
[] 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
> 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