Author: mturk
Date: Tue Jul 17 00:49:04 2007
New Revision: 556836

URL: http://svn.apache.org/viewvc?view=rev&rev=556836
Log:
Fix #42849 for IIS only.

Modified:
    tomcat/connectors/trunk/jk/native/iis/jk_isapi_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=556836&r1=556835&r2=556836
==============================================================================
--- tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c (original)
+++ tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c Tue Jul 17 00:49:04 
2007
@@ -1127,6 +1127,7 @@
     return 0;
 }
 
+static int init_error = 0;
 
 DWORD WINAPI HttpFilterProc(PHTTP_FILTER_CONTEXT pfc,
                             DWORD dwNotificationType, LPVOID pvNotification)
@@ -1146,6 +1147,14 @@
         if (!is_mapread)
             is_inited = JK_FALSE;
     }
+    if (!is_inited && !is_mapread) {
+        /* In case the initialization failed
+         * return error. This will make entire IIS
+         * unusable like with Apache servers
+         */
+         SetLastError(ERROR_INVALID_FUNCTION);
+         return SF_STATUS_REQ_ERROR;
+    }
     if (auth_notification_flags == dwNotificationType) {
         char uri[INTERNET_MAX_URL_LENGTH];
         char snuri[INTERNET_MAX_URL_LENGTH] = "/";
@@ -1372,6 +1381,7 @@
                     !SetHeader(pfc, "url", extension_uri)) {
                     jk_log(logger, JK_LOG_ERROR,
                            "error while adding request headers");
+                    SetLastError(ERROR_INVALID_PARAMETER);
                     return SF_STATUS_REQ_ERROR;
                 }
 

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=556836&r1=556835&r2=556836
==============================================================================
--- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Tue Jul 17 
00:49:04 2007
@@ -28,6 +28,13 @@
   <subsection name="Native">
     <changelog>
       <fix>
+        <bug>42849</bug>: Refuse to operate with IIS in case the
+        initialization failed. Instead requesting isapi_redirect.dll
+        500 will be returned to the user. This is as closest as it
+        can get to Apache Httpd wher we refuse to start the server
+        in case of fatal initialization errors. (mturk)
+      </fix>
+      <fix>
       Load Balancer: Fix a deadlock in lb worker, which was exposed on Solaris
       for threaded Apache MPMs. (rjung)
       </fix>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to