Created
February 10, 2011 11:48
-
-
Save calavera/820392 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 2e053f4983ed4c7c95f783a5dc12804ae618d4b3 Mon Sep 17 00:00:00 2001 | |
From: David Calavera <david.calavera@gmail.com> | |
Date: Thu, 10 Feb 2011 13:51:53 +0100 | |
Subject: [PATCH] more accurate fix for JRUBY_RACK-38 | |
--- | |
src/main/ruby/jruby/rack/response.rb | 3 ++- | |
1 files changed, 2 insertions(+), 1 deletions(-) | |
diff --git a/src/main/ruby/jruby/rack/response.rb b/src/main/ruby/jruby/rack/response.rb | |
index 82b5053..75539e0 100644 | |
--- a/src/main/ruby/jruby/rack/response.rb | |
+++ b/src/main/ruby/jruby/rack/response.rb | |
@@ -104,7 +104,8 @@ class JRuby::Rack::Response | |
retry | |
rescue NativeException => e | |
# Don't needlessly raise errors because of client abort exceptions | |
- raise unless e.cause.to_s =~ /(clientabortexception|broken pipe)/i | |
+ raise unless e.cause.to_s =~ /(clientabortexception|broken pipe)/i || | |
+ e.cause.java_class.to_s =~ /(clientabortexception|broken pipe)/i | |
ensure | |
@body.close if @body.respond_to?(:close) | |
end | |
-- | |
1.7.0.4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
mmmm this is weird because Tomcat's ClientAbortException overrides toString to include the class name but `to_s' doesn't show it: