cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Failed writing body (-1 != 16384)

From: Dima Tisnek <dimaqq_at_gmail.com>
Date: Wed, 11 Mar 2015 18:47:52 +0100

兰天, writefunction should return exactly the number of bytes that
libcurl gives it.
Please add logging to your writefunction and check if perhaps it fails
with an error.

For example, if your writefunction looks like `return write(somefd,
data, len)`, then it stands to reason that underlying `write` returned
-1 to indicate an error.

Another (very remote) possibility is that you use an integer of wrong
size somewhere. I'd hazard a guess that 2**14 just happens to be
buffer size.
>>> bin(16384)
'0b100000000000000'

When you've verified your write function, please test against newest
libcurl built from source.

d.

On 10 March 2015 at 13:46, 兰天 <lantian0811_at_163.com> wrote:
> Hi ,all
> I use multi socket ,and I run the program for few minutes ,however I get
> this error
>
> * Connection #20 to host b200.photo.store.qq.com left intact
> * Re-using existing connection! (#33) with host b378.photo.store.qq.com
> * Connected to b378.photo.store.qq.com (101.227.143.124) port 80 (#33)
>> GET
>> /psb?/V10nnL8j44xU4O/g8L30HY2LaPzSHGtD7VMr3oRXboYP7LnupSHjTnxJPI!/b/dK32W.GBOwAA&bo=XgH9AF4B*QACCCw!
>> HTTP/1.1
> Host: xxxxxxxxxxxxxx(for example)
> Accept: */*
>
> < HTTP/1.1 200 OK
> < Cache-Control: max-age=31536000
> < Client-Ip: 14.17.37.11
> < Content-Length: 5328377
> < Content-Type: image/gif
> < Last-Modified: Mon, 18 Dec 2006 07:25:14 GMT
> < Server: httpserver
> < Server-Time: 77
> < Size: 5328377
> <
> * Failed writing body (-1 != 16384)
> * Closing connection #33
>
> I search int google,And it tells about "So it was a problem of encoding."
> Have anyone got this error before? how to fix it?
> Thank you
>
>
>
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-03-11