At 10:55 AM -0700 8/1/04, Stas Bekman wrote:
--- ModPerl-Registry/lib/ModPerl/RegistryCooker.pm 27 Jun 2004 21:26:45 -0000 1.50
+++ ModPerl-Registry/lib/ModPerl/RegistryCooker.pm 1 Aug 2004 17:52:00 -0000
@@ -42,6 +42,7 @@
use File::Basename;


 use Apache::Const  -compile => qw(:common &OPT_EXECCGI);
+use APR::Const     -compile => qw(ECONNABORTED);
 use ModPerl::Const -compile => 'EXIT';

 unless (defined $ModPerl::Registry::MarkLine) {
@@ -724,9 +725,14 @@
     # ModPerl::Util::exit() throws an exception object whose rc is
     # ModPerl::EXIT
     # (see modperl_perl_exit() and modperl_errsv() C functions)
-    if ($@ && !(ref $@ eq 'APR::Error' && $@ == ModPerl::EXIT)) {
-        $self->log_error($@);
-        return Apache::SERVER_ERROR;
+    if ($@) {
+        if ($@ == APR::ECONNABORTED) {
+            # silently ignore client connection abort
+        }
+        elsif (!(ref $@ eq 'APR::Error' && $@ == ModPerl::EXIT)) {
+            $self->log_error($@);
+            return Apache::SERVER_ERROR;
+        }
     }
     return Apache::OK;
 }

Not quite--now I get this:

[Mon Aug 02 13:59:29 2004] [error] [client [ip address]] Argument "Software caused connection abort at [script path]" isn't numeric in numeric eq (==) at /usr/local/lib/perl5/site_perl/5.8.0/i686-linux/ModPerl/RegistryCooker.pm line 723, <IN> line 20.\n, referer: [referring page]

I guess the problem is that, unlike $!, $@ doesn't have a numeric component. I tried changing this to:

+    if ($@) {
+        if ($@ eq APR::ECONNABORTED) {
+            # silently ignore client connection abort

but that didn't help. Now it says, "APR::Error: Can't handle 'eq' at /usr/local/lib/perl5/site_perl/5.8.0/i686-linux/APR/Error.pm line 39, <IN> line 20.\n".

Next idea? :-)
--
Dan Wilga                                         [EMAIL PROTECTED]
Web Technology Specialist                     http://www.mtholyoke.edu
Mount Holyoke College                                Tel: 413-538-3027
South Hadley, MA  01075            "Who left the cake out in the rain?"

--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Reply via email to