curl-library
Re: Problem downloading using text transfer mode
Date: Mon, 23 Jun 2008 21:51:11 +0200
Hi Dan!
> I've got an issue downloading text files using text transfer mode. The
> proccess
> > I did was the following:
>
> What platform and what lib curl version?
The platform is Windows XP SP2 and the curl version is 7.18.2 (April 24th,
2008).
>
>
> > 1. I uploaded the file enabling these two options:
> >
> > CURLOPT_TRANSFERTEXT
> > CURLOPT_CRLF
> >
> > 2. I download the file with the same options enable and I miss as
> characters as
> > line-endings are in the file.
>
> I don't understand the problem. What were the line ending characters in
> the original file and what were they in the downloaded file?
Sorry, English is not my mother language and it's so difficult for me to
explain something in this language. so I'm going to explain my problem with
an example. I have in my local Windows machine a file with the following
data:
1234567890
1234
I upload that file to a Linux machine using the text transfer mode and with
CURLOPT_TRANSFERTEXT and CURLOPT_CRLF enabled. When I download this file
what I get is the following:
1234567890
123
This is one character less than the original file. It's just one character
because I onlu have a line ending, if I would have 2 line endings I would
retrieve the file with 2 characters less.
>
>
> > 3. I download the file with those options disabled and the file is
> downloaded
> > properly.
>
> What does "properly" mean in this case? It will depend on the platform
> you're running on.
>
With this I try to meant that if I download the same file that the one in
the last example, but using a binary transfer (CURLOPT_TRANSFERTEXT and
CURLOPT_CRLF disabled), what I get is the file I upload before using the
text mode. That is:
1234567890
1234
I don't know if I'm explaining the problem well. If you need more
information, please let me know it, I'll try to explain better the issue.
Thanks a lot!
Received on 2008-06-23