cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl/libcurl http post problem

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 15 Apr 2008 11:41:21 +0200 (CEST)

On Tue, 15 Apr 2008, Prasad J Pandit wrote:

>> That means libcurl didn't get a complete chunked encoding stream.
>
> And why would/should that heppen?

Bad server or similar? when you use the curl tool you can use --trace and
--trace-ascii to get all the details on the actual transfered contents. It
should reveal the reason to the error 18.

Otherwise I suggest a break-point somewhere in the chunked encoding code to
see why libcurl behaves like this.

>> Uh, what exactly is the difference here? What's the first method really
>> about?
>
> Well, no difference that should affect curl(1), but it did, don't know
> why/how.

If you set an environment variable curl will catch that. It can't know how you
set it.

>>> $ wget --post-file=/tmp/post-data http://172.16.1.1:5666/test
>>
>> It automatically found your proxy without you telling it about it? I wasn't
>> aware wget had such abilities.
>
> Missed the point. Point was Wget was able to get the reply back,
> irrespective of the http_proxy setting.

Is the proxy or not proxy connected to your posting problem? I thought the
proxy problem was about curl not figuring out you use a proxy?

Wget is using http 1.0 so of course it won't get any chunked encoded response.
You can try curl with enforced http 1.0 to compare.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2008-04-15