diff --git a/ChangeLog b/ChangeLog index b83f5d5433..42a9980ab7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Nov 19 23:22:40 2009 Shugo Maeda + + * lib/net/ftp.rb (putbinaryfile): use APPE for resume. + Thanks, Tomoyuki Chikanaga. + Thu Nov 19 22:34:49 2009 Shugo Maeda * lib/net/imap.rb (flag_list): untaint strings to intern in the safe diff --git a/lib/net/ftp.rb b/lib/net/ftp.rb index 369aba893c..c611e09ee3 100644 --- a/lib/net/ftp.rb +++ b/lib/net/ftp.rb @@ -449,7 +449,7 @@ module Net end synchronize do voidcmd("TYPE I") - conn = transfercmd(cmd, rest_offset) + conn = transfercmd(cmd) loop do buf = file.read(blocksize) break if buf == nil @@ -559,7 +559,11 @@ module Net f = open(localfile) begin f.binmode - storbinary("STOR " + remotefile, f, blocksize, rest_offset, &block) + if rest_offset + storbinary("APPE " + remotefile, f, blocksize, rest_offset, &block) + else + storbinary("STOR " + remotefile, f, blocksize, rest_offset, &block) + end ensure f.close end