cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: CURLOPT_PREQUOTE does not take effect

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 1 Nov 2016 07:36:29 +0100 (CET)

On Tue, 1 Nov 2016, yuxia.gao_at_thomsonreuters.com wrote:

> I am now using libcurl to develop my FTP client, the version I am using is
> 7.46. By setting "TYPE I" to CURLOPT_PREQUOTE, and "RETR list.txt" to
> CURLOPT_CUSTOMREQUEST, I want to download the file list.txt in Binary mode.
> But actually it is still in ASCII mode.

libcurl defaults to binary mode for downloading FTP files so that sounds
doubly wrong. And if you want ASCII instead, CURLOPT_TRANSFERTEXT can be set
to make that happen.

So you don't need to use any quote method for this functionality. In fact, you
may confuse libcurl if you set TYPE with the quote methods since it may then
get the transfered file sizes wrong (unaligned).

> Can you help to tell me what is wrong with it? And how to solve it?

Test 1405 tests all 3 different "quote" options that this test keeps working
for me.

Can you give us a full example source code showing this happening?

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:  https://curl.haxx.se/mail/etiquette.html
Received on 2016-11-01