DO NOT REPLY [Bug 35302] - [PATCH] error page redirection for JK/ISAPI on service fail

2005-09-22 Thread bugzilla
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-09-23 00:02 ---
To clarify why this patch is useful (this is the way we use the functionality).

We usually deploy several applications to a single website, requiring multiple
ISAPI redirectors.
There are a couple of cases where the connection from the web server to the
Tomcat engine can fail:
 1. The ISAPI redirector isn't installer properly as a filter
 2. The Extension side of things fails to communicate with Tomcat

We handle these errors on a site by:
 1. Putting a static page on the web server with the same name as the default
resource indicating a web server misconfiguration. If the filter doesn't work,
then this page is served.
 2. Sending a redirect to a designated static error page indicating that Tomcat
couldn't be reached when the Extension fails to communicate with Tomcat. 

Case 2 is what this patch addresses. It allows us to distinguish between generic
500 errors and those caused by the ISAPI redirector, and further allows us to
distinguish between failures to different back-end applications.

-- 
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]



DO NOT REPLY [Bug 35302] - [PATCH] error page redirection for JK/ISAPI on service fail

2005-07-03 Thread bugzilla
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


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WONTFIX




--- Additional Comments From [EMAIL PROTECTED]  2005-07-03 11:24 ---
Current error display works yust fine both for IIS and Firefox,
either when it come to 500, 503 or any other error message.
There was error in load balancer that caused to return the 200 and
still error page that might cause the issue you are addressing.
Anyhow it works now.

-- 
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]



DO NOT REPLY [Bug 35302] - [PATCH] error page redirection for JK/ISAPI on service fail

2005-06-09 Thread bugzilla
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 00:31 ---
Created an attachment (id=15361)
 -- (http://issues.apache.org/bugzilla/attachment.cgi?id=15361action=view)
Error page support for ISAPI redirector

Patch against jk_isapi_plugin.c r1.49

-- 
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]



DO NOT REPLY [Bug 35302] - [PATCH] error page redirection for JK/ISAPI on service fail

2005-06-09 Thread bugzilla
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 -  1.49
+++ jk/native/iis/jk_isapi_plugin.c 9 Jun 2005 23:21:35 -
@@ -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]