cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: CURLE_PARTIAL_FILE

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 2 May 2002 09:29:38 +0200 (MET DST)

On Tue, 30 Apr 2002, Cadime wrote:

> I am getting many files from a server. I know that thos files are text.
> Thus, I used CURLOPT_TRANSFERTEXT. However, when I try to get a single file
> the server says its size is 310 bytes. However, I got 315 bytes. If I used
> BIN mode I would got 310 bytes ( I tested it ). Any explanation ? Does all
> servers act like this?

Thinking about it, I bet we must start to ignore size differences when we
transfer files as ASCII, as the size it reports to use can't possibly always
be known to be true. I mean, servers are likely to convert the file at times
when ASCII transfers are made and I doubt they scan the files to check for
that when we do SIZE on the files...

Thus, if the files end up being larger/smaller than initially reported it is
just because it added some bytes when doing the ASCII conversion. I guess.

Anyone thinking differently?

> OK, I tried to forget CURL_PARTIAL_FILE error ( act as a warning ).
> However, I need CURL to do the CURLOPT_POSTQUOTE commands and it is
> returning before that...
>
> Should I do the transfer ALWYS in binary mode? Or there is any other
> solution?

Until we add a fix or something, transferring binary seems to be a
work-around.

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
_______________________________________________________________
Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: bandwidth_at_sourceforge.net
Received on 2002-05-02