bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] [PATCH] FTPS support


From: Ander Juaristi
Subject: Re: [Bug-wget] [PATCH] FTPS support
Date: Fri, 11 Sep 2015 11:13:19 +0200

Yep, I just noticed it was because of using_data_security. What I did was to 
track that in ccon *con. I've got the patch ready, but I'll see if I can merge 
your changes in a while.

Sent from my smartphone. Excuse my brevity.

---- Tim Ruehsen escribió ----

>On Thursday 10 September 2015 16:05:14 Ander Juaristi Alamos wrote:
>> > Hi Ander,
>> > 
>> > during the last test I realized that --recursive won't work with FTPS.
>> 
>> Hi Tim,
>> 
>> If been looking through it and I've seen that the '--recursive' option from
>> FTP and the one from FTPS follow different code paths.
>> 
>> The code that triggers that difference is at main.c, line 1832:
>> 
>>         if ((opt.recursive || opt.page_requisites)
>>               && (url_scheme (*t) != SCHEME_FTP || url_uses_proxy
>> (url_parsed))) {
>>               ...
>>               /* Turn opt.follow_ftp on in case of recursive FTP retrieval
>> */ if (url_scheme (*t) == SCHEME_FTP)
>>                 opt.follow_ftp = 1;
>>               ...
>>             }
>> 
>> If I replace it to include FTPS also:
>> 
>>         if ((opt.recursive || opt.page_requisites)
>>               && ((url_scheme (*t) != SCHEME_FTP && url_scheme (*t) !=
>> SCHEME_FTPS)
>>                   || url_uses_proxy (url_parsed)))
>> 
>>             {
>>               ...
>>               /* Turn opt.follow_ftp on in case of recursive FTP retrieval
>> */ if (url_scheme (*t) == SCHEME_FTP || url_scheme (*t) == SCHEME_FTPS)
>> opt.follow_ftp = 1;
>>               ...
>>             }
>> 
>> Then they both follow the same path. The rationale behind this is that the
>> functionality for FTP should behave exactly the same for FTPS.
>> 
>> However, it hangs when downloading the files... Will look further.
>> 
>> Any thoughts?
>
>Hi Ander,
>
>two things that I found.
>
>1. [PATCH 0002] Some FTPS pieces seem to be missing.
>I went through the code by searching for SCHEME_FTP and "ftp" and added FTPS 
>stuff where it was missing. I did not think throughly about what I did - so 
>please just don't apply those changes blindly.
>
>With those changes, Wget tried to work recursively but hangs on the first 
>PASSIVE data transfer.
>
>2. [PATCH 0003 ]'using_data_security' in getftp() is a local variable, reset 
>for each file, and only set if (prot != PROT_CLEAR). I turned the logic and 
>voila, recursion works. Again, think if this change might break something else 
>that I didn't test.
>
>Regards, Tim

reply via email to

[Prev in Thread] Current Thread [Next in Thread]