Project

General

Profile

Feature #3848 » openuri-ftp-auth.patch

jlecour (Jérémy Lecour), 09/18/2010 04:02 AM

View differences:

(current document)
651 651
      # The access sequence is defined by RFC 1738
652 652
      ftp = Net::FTP.open(self.host)
653 653
      # todo: extract user/passwd from .netrc.
654
      user = 'anonymous'
655
      passwd = nil
654
      if options.include? :http_basic_authentication
655
        user, passwd = options[:http_basic_authentication]
656
      else
657
        user = 'anonymous'
658
        passwd = nil
659
      end
656 660
      user, passwd = self.userinfo.split(/:/) if self.userinfo
657 661
      ftp.login(user, passwd)
658 662
      directories.each {|cwd|