DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35302>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35302





------- Additional Comments From [EMAIL PROTECTED]  2005-06-10 01:25 -------
(From update of attachment 15361)
Index: jk/native/iis/jk_isapi_plugin.c
===================================================================
RCS file:
/home/cvspublic/jakarta-tomcat-connectors/jk/native/iis/jk_isapi_plugin.c,v
retrieving revision 1.49
diff -u -r1.49 jk_isapi_plugin.c
--- jk/native/iis/jk_isapi_plugin.c     18 May 2005 18:04:53 -0000      1.49
+++ jk/native/iis/jk_isapi_plugin.c     9 Jun 2005 23:21:35 -0000
@@ -20,6 +20,7 @@
  * Author:      Larry Isaacs <[EMAIL PROTECTED]>                           *
  * Author:      Ignacio J. Ortega <[EMAIL PROTECTED]>                      *
  * Author:      Mladen Turk <[EMAIL PROTECTED]>                            *
+ * Author:      Tim Whittington <[EMAIL PROTECTED]>        *
  * Version:     $Revision: 1.49 $                                          *
  ***************************************************************************/

@@ -69,6 +70,8 @@
 #define URI_SELECT_UNPARSED_VERB    ("unparsed")
 #define URI_SELECT_ESCAPED_VERB     ("escaped")

+#define ERROR_PAGE_TAG              ("error_page")
+
 #define BAD_REQUEST     -1
 #define BAD_PATH        -2
 #define MAX_SERVERNAME  128
@@ -133,6 +136,8 @@
 static int log_level = JK_LOG_EMERG_LEVEL;
 static char worker_file[MAX_PATH * 2];
 static char worker_mount_file[MAX_PATH * 2] = {0};
+static char error_page_buf[INTERNET_MAX_URL_LENGTH] = {0};
+static char *error_page = NULL;

 #define URI_SELECT_OPT_PARSED       0
 #define URI_SELECT_OPT_UNPARSED     1
@@ -1017,9 +1022,26 @@
                                "service() returned OK");
                     }
                     else {
-                        lpEcb->dwHttpStatusCode = is_error;
                         jk_log(logger, JK_LOG_ERROR,
                                "service() failed");
+
+                        /** Try to redirect the client to a page explaining
the ISAPI redirector is down */
+                        if (error_page) {
+                            int len_of_error_page = strlen(error_page);
+                            if (!lpEcb->ServerSupportFunction(lpEcb->ConnID,
+                                                             
HSE_REQ_SEND_URL_REDIRECT_RESP,
+                                                              error_page,
+                                                             
(LPDWORD)&len_of_error_page,
+                                                              (LPDWORD)NULL))
{
+                                jk_log(logger, JK_LOG_ERROR,
+                                    "HttpExtensionProc error, Error page
redirect failed\n");
+                                lpEcb->dwHttpStatusCode = is_error;
+                            }
+                        }
+                        else {
+                            lpEcb->dwHttpStatusCode = is_error;
+                        }
+
                     }
                     e->done(&e, logger);
                 }
@@ -1139,6 +1161,9 @@
         jk_log(logger, JK_LOG_DEBUG, "Using worker mount file %s.",
                worker_mount_file);
         jk_log(logger, JK_LOG_DEBUG, "Using uri select %d.",
uri_select_option);
+        if (error_page) {
+            jk_log(logger, JK_LOG_DEBUG, "Using error page '%s'.\n",
error_page);
+        }
     }
     if (uri_worker_map_alloc(&uw_map, NULL, logger)) {
         rc = JK_FALSE;
@@ -1256,7 +1281,11 @@
                 ok = JK_FALSE;
             }
         }
-
+        tmp = jk_map_get_string(map, ERROR_PAGE_TAG, NULL);
+        if (tmp) {
+            strcpy(error_page_buf, tmp);
+            error_page = error_page_buf;
+        }
     }
     else {
         rc = RegOpenKeyEx(HKEY_LOCAL_MACHINE,
@@ -1322,6 +1351,12 @@
                 ok = JK_FALSE;
             }
         }
+        if (get_registry_config_parameter(hkey,
+                                          ERROR_PAGE_TAG, 
+                                          tmpbuf, sizeof(tmpbuf))) {
+            strcpy(error_page_buf, tmpbuf);
+            error_page = error_page_buf;
+        }

         RegCloseKey(hkey);
     }


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

Reply via email to