tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r559202 - in /tomcat/connectors/trunk/jk: native/iis/jk_isapi_plugin.c native/netscape/jk_nsapi_plugin.c xdocs/miscellaneous/changelog.xml
Date Tue, 24 Jul 2007 20:47:33 GMT
Author: rjung
Date: Tue Jul 24 13:47:32 2007
New Revision: 559202

URL: http://svn.apache.org/viewvc?view=rev&rev=559202
Log:
IIS & Sun: Log service failures also, if return code is negative.

Modified:
    tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c
    tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c
    tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml

Modified: tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c?view=diff&rev=559202&r1=559201&r2=559202
==============================================================================
--- tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c (original)
+++ tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c Tue Jul 24 13:47:32 2007
@@ -40,6 +40,7 @@
 #include "jk_worker.h"
 #include "jk_uri_worker_map.h"
 #include "jk_shm.h"
+#include "jk_ajp13.h"
 #include "pcre.h"
 
 #ifndef POSIX_MALLOC_THRESHOLD
@@ -1519,7 +1520,8 @@
                 s.retries = worker->retries;
                 if (worker->get_endpoint(worker, &e, logger)) {
                     int is_error = JK_HTTP_SERVER_ERROR;
-                    if (e->service(e, &s, logger, &is_error)) {
+                    int result;
+                    if ((result = e->service(e, &s, logger, &is_error)) > 0)
{
                         rc = HSE_STATUS_SUCCESS;
                         lpEcb->dwHttpStatusCode = HTTP_STATUS_OK;
                         if (JK_IS_DEBUG_LEVEL(logger))
@@ -1527,8 +1529,14 @@
                                    "service() returned OK");
                     }
                     else {
-                        jk_log(logger, JK_LOG_ERROR,
-                               "service() failed with http error %d", is_error);
+                        if ((result == JK_CLIENT_ERROR) && (is_error == JK_HTTP_OK))
{
+                            jk_log(logger, JK_LOG_INFO,
+                                   "service() failed because client aborted connection");
+                        }
+                        else {
+                            jk_log(logger, JK_LOG_ERROR,
+                                   "service() failed with http error %d", is_error);
+                        }
                         lpEcb->dwHttpStatusCode = is_error;
                         write_error_message(lpEcb, is_error);
                     }

Modified: tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c?view=diff&rev=559202&r1=559201&r2=559202
==============================================================================
--- tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c (original)
+++ tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c Tue Jul 24 13:47:32 2007
@@ -24,13 +24,14 @@
 
 #include "nsapi.h"
 #include "jk_global.h"
+#include "jk_url.h"
 #include "jk_util.h"
 #include "jk_map.h"
 #include "jk_pool.h"
 #include "jk_service.h"
 #include "jk_worker.h"
 #include "jk_shm.h"
-#include "jk_url.h"
+#include "jk_ajp13.h"
 
 #define URI_PATTERN "path"
 #define DEFAULT_WORKER_NAME ("ajp13")
@@ -370,9 +371,24 @@
             jk_endpoint_t *e = NULL;
             if (worker->get_endpoint(worker, &e, logger)) {
                 int recover = JK_FALSE;
-                if (e->service(e, &s, logger, &recover)) {
+                int result;
+                if ((result = e->service(e, &s, logger, &recover)) > 0) {
                     rc = REQ_PROCEED;
+                    if (JK_IS_DEBUG_LEVEL(logger))
+                        jk_log(logger, JK_LOG_DEBUG,
+                               "service() returned OK");
                 }
+                else {
+                    if ((result == JK_CLIENT_ERROR) && (is_error == JK_HTTP_OK))
{
+                        jk_log(logger, JK_LOG_INFO,
+                               "service() failed because client aborted connection");
+                    }
+                    else {
+                        jk_log(logger, JK_LOG_ERROR,
+                               "service() failed with http error %d", is_error);
+                    }
+                }
+
                 e->done(&e, logger);
             }
         }

Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml?view=diff&rev=559202&r1=559201&r2=559202
==============================================================================
--- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Tue Jul 24 13:47:32 2007
@@ -27,6 +27,9 @@
   <br />
   <subsection name="Native">
     <changelog>
+      <update>
+      IIS & Sun: Log service failures also, if return code is negative. (rjung)
+      </update>
       <fix>
         <bug>42849</bug>: Abort startup of Apache httpd 1.3 in case
         mod_jk initialization failed. We already do the same



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message