Corret. The revised version should work well. Are you going to merge this to the new wget releases?
On 1/11/06, Tony Lewis <[EMAIL PROTECTED]> wrote: > Here's what your version of the code said: > > if ((opt.recursive || opt.page_requisites) > && ((url_scheme (*t) != SCHEME_FTP) || > (opt.use_proxy && url_scheme (*t) == SCHEME_FTP))) > > which means (for the bit after the &&): > > FTP ^FTP > proxy T T > ^proxy F T > > Regardless of whether it is FTP, the condition will always succeed if > use_proxy is true. Therefore, a simpler way of writing the expression is: > (url_scheme (*t) != SCHEME_FTP) || opt.use_proxy > > You're right that I shouldn't have moved opt.use_proxy with the other > command line options. My revised suggestion is: > > if ((opt.recursive || opt.page_requisites) > && ((url_scheme (*t) != SCHEME_FTP) || opt.use_proxy)) > status = retrieve_tree (*t); > else > status = retrieve_url > (*t, &filename, &redirected_URL, NULL, &dt); > > Tony > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of > CHEN Peng > Sent: Tuesday, January 10, 2006 5:06 PM > To: Tony Lewis > Cc: [EMAIL PROTECTED] > Subject: Re: wget 1.10.x fixed recursive ftp download over proxy > > Your simplified code may not work. The intention of patching is to make wget > invoke "retrieve_tree" funtion when it IS "FTP" and uses proxy, while your > code works when it is NOT FTP and uses proxy. > > > On 1/10/06, Tony Lewis <[EMAIL PROTECTED]> wrote: > > > > I believe the following simplified code would have the same effect: > > > > if ((opt.recursive || opt.page_requisites || opt.use_proxy) && > > url_scheme (*t) != SCHEME_FTP) > > status = retrieve_tree (*t); > > else > > status = retrieve_url > > (*t, &filename, &redirected_URL, NULL, &dt); > > > > > > Tony > > > > -- > CHEN Peng <[EMAIL PROTECTED]> > > -- CHEN Peng <[EMAIL PROTECTED]>