[#10193] String.ord — David Flanagan <david@...>

Hi,

41 messages 2007/02/05
[#10197] Re: String.ord — Yukihiro Matsumoto <matz@...> 2007/02/06

Hi,

[#10198] Re: String.ord — David Flanagan <david@...> 2007/02/06

Yukihiro Matsumoto wrote:

[#10199] Re: String.ord — Daniel Berger <djberg96@...> 2007/02/06

David Flanagan wrote:

[#10200] Re: String.ord — David Flanagan <david@...> 2007/02/06

Daniel Berger wrote:

[#10208] Re: String.ord — "Nikolai Weibull" <now@...> 2007/02/06

On 2/6/07, David Flanagan <david@davidflanagan.com> wrote:

[#10213] Re: String.ord — David Flanagan <david@...> 2007/02/06

Nikolai Weibull wrote:

[#10215] Re: String.ord — "Nikolai Weibull" <now@...> 2007/02/06

On 2/6/07, David Flanagan <david@davidflanagan.com> wrote:

[#10216] Re: String.ord — David Flanagan <david@...> 2007/02/07

Nikolai Weibull wrote:

[#10288] Socket library should support abstract unix sockets — <noreply@...>

Bugs item #8597, was opened at 2007-02-13 16:10

12 messages 2007/02/13

[#10321] File.basename fails on Windows root paths — <noreply@...>

Bugs item #8676, was opened at 2007-02-15 10:09

11 messages 2007/02/15

[#10323] Trouble with xmlrpc — James Edward Gray II <james@...>

Some of the Ruby code used by TextMate makes use of xmlrpc/

31 messages 2007/02/15
[#10324] Re: Trouble with xmlrpc — "Berger, Daniel" <Daniel.Berger@...> 2007/02/15

> -----Original Message-----

[#10326] Re: Trouble with xmlrpc — James Edward Gray II <james@...> 2007/02/15

On Feb 15, 2007, at 1:29 PM, Berger, Daniel wrote:

[#10342] Re: Trouble with xmlrpc — James Edward Gray II <james@...> 2007/02/16

While I am complaining about xmlrpc, we have another issue. It's

[#10343] Re: Trouble with xmlrpc — Alex Young <alex@...> 2007/02/16

James Edward Gray II wrote:

[#10344] Re: Trouble with xmlrpc — James Edward Gray II <james@...> 2007/02/16

On Feb 16, 2007, at 12:08 PM, Alex Young wrote:

Re: [PATCH] Net::FTP should check the control connection on EPIPE

From: Simon Williams <simon.williams@...>
Date: 2007-02-06 09:19:44 UTC
List: ruby-core #10204
On Tue, Feb 06, 2007 at 11:23:01AM +0900, Shugo Maeda wrote:
> Simon Williams wrote:
> > This patch applies to the Net::FTP class that comes with Ruby 1.8.5.
> 
> I merged your patch to SVN trunk.
> Thanks for your contribution.

No problem.  Thanks for applying it.  However, it appears that there
wasn't enough context in the patch for it to apply to the correct
place.  Those two changes were supposed to be at the end of storbinary
and storlines.  I've attached a patch against revision 11638 in SVN
trunk (with more context, this time).


Thanks,
-- 
Simon Williams

Attachments (1)

ftp.rb.epipe.patch (2.83 KB, text/x-diff)
--- ftp.rb.orig	2007-02-06 09:11:02.000000000 +0000
+++ ftp.rb	2007-02-06 09:15:28.000000000 +0000
@@ -288,19 +288,12 @@
     #
     def voidcmd(cmd)
       synchronize do
 	putline(cmd)
 	voidresp
       end
-    rescue Errno::EPIPE
-      # EPIPE, in this case, means that the data connection was unexpectedly
-      # terminated.  Rather than just raising EPIPE to the caller, check the
-      # response on the control connection.  If getresp doesn't raise a more
-      # appropriate exception, re-raise the original exception.
-      getresp
-      raise
     end
     
     def sendport(host, port)
       af = (@sock.peeraddr)[0]
       if af == "AF_INET"
 	hbytes = host.split(".")
@@ -431,19 +424,12 @@
             yield(data)
           end
           conn.close
           voidresp
         end
       end
-    rescue Errno::EPIPE
-      # EPIPE, in this case, means that the data connection was unexpectedly
-      # terminated.  Rather than just raising EPIPE to the caller, check the
-      # response on the control connection.  If getresp doesn't raise a more
-      # appropriate exception, re-raise the original exception.
-      getresp
-      raise
     end
     
     #
     # Puts the connection into ASCII (text) mode, issues the given command, and
     # passes the resulting data, one line at a time, to the associated block. If
     # no block is given, prints the lines. Note that +cmd+ is a server command
@@ -489,12 +475,19 @@
             yield(buf) if block
           end
           conn.close
           voidresp
         end
       end
+    rescue Errno::EPIPE
+      # EPIPE, in this case, means that the data connection was unexpectedly
+      # terminated.  Rather than just raising EPIPE to the caller, check the
+      # response on the control connection.  If getresp doesn't raise a more
+      # appropriate exception, re-raise the original exception.
+      getresp
+      raise
     end
     
     #
     # Puts the connection into ASCII (text) mode, issues the given server-side
     # command (such as "STOR myfile"), and sends the contents of the file
     # named +file+ to the server, one line at a time. If the optional block is
@@ -514,12 +507,19 @@
             yield(buf) if block
           end
           conn.close
           voidresp
         end
       end
+    rescue Errno::EPIPE
+      # EPIPE, in this case, means that the data connection was unexpectedly
+      # terminated.  Rather than just raising EPIPE to the caller, check the
+      # response on the control connection.  If getresp doesn't raise a more
+      # appropriate exception, re-raise the original exception.
+      getresp
+      raise
     end
 
     #
     # Retrieves +remotefile+ in binary mode, storing the result in +localfile+.
     # If +localfile+ is nil, returns retrieved data.
     # If a block is supplied, it is passed the retrieved data in +blocksize+

In This Thread