cURL / Mailing Lists / curl-library / Single Mail


curl/libcurl http post problem

From: Prasad J Pandit <>
Date: Tue, 15 Apr 2008 12:50:02 +0530 (IST)

    Hello guys, greetings to all!

I tried to post the same data(which is > 1500 bytes), as my program, using
curl(1) command, and this is what I receieved:

  curl: (18) transfer closed with outstanding read data remaining

(18) is what my program also receives, I've said that before. I'm using
the following curl(1) command on FC8

curl 7.17.1 (i386-redhat-linux-gnu) libcurl/7.17.1 NSS/ zlib/1.2.3
Protocols: tftp ftp telnet dict http file https ftps
Features: IDN IPv6 Largefile SSL libz

Though, the libcurl library linked with my windows program is the latest
one. The reply I'm suppose to receice from the server is as below
(Courtesy: Wireshark)

HTTP/1.1 200 OK
Transfer-Encoding: chunked
Date: Tue, 15 Apr 2008 06:11:35 GMT
Server: CherryPy/3.0.1


   Does libcurl handles `chuncked' reply properly?

Hard to believe/reason that, to get this small `[true/false]' reply I'm
struggling for more than two weeks now, courtesy: `libcurl'(Don't you say:
go use something else).

Second thing, when I used $http_proxy="", curl(1)
could/did not read the data file. All the following commands would just
not exit and go on forever, and the server did not receive the POST data.

   $ curl -d @/tmp/post-data
   $ curl --data @/tmp/post-data
   $ curl --data `cat /tmp/post-data`

I had to do `$ export -n http_proxy', and only then I got the above (18)

Strange may it sound, but the folllowing command worked perfectly fine,
and gave me the proper reply of [true], that too without fiddling with the

  $ wget --post-file=/tmp/post-data

Again, don't tell me to go use something else. I want/expect the proper
reason, for all this.

Hope I was clear enough...thank you!

   - Prasad
Received on 2008-04-15