svn commit: r500787 - in /tomcat/connectors/trunk/jk: native/common/jk_status.c native/common/jk_util.c native/common/jk_util.h xdocs/miscellaneous/changelog.xml xdocs/reference/status.xml xdocs/refer

2007-01-28 Thread rjung
Author: rjung
Date: Sun Jan 28 05:15:50 2007
New Revision: 500787

URL: http://svn.apache.org/viewvc?view=revrev=500787
Log:
Adding a configuration attribute to the status worker, to
make user comparison case insensitive (BZ 41318).

Modified:
tomcat/connectors/trunk/jk/native/common/jk_status.c
tomcat/connectors/trunk/jk/native/common/jk_util.c
tomcat/connectors/trunk/jk/native/common/jk_util.h
tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
tomcat/connectors/trunk/jk/xdocs/reference/status.xml
tomcat/connectors/trunk/jk/xdocs/reference/workers.xml

Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_status.c?view=diffrev=500787r1=500786r2=500787
==
--- tomcat/connectors/trunk/jk/native/common/jk_status.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_status.c Sun Jan 28 05:15:50 
2007
@@ -260,6 +260,7 @@
 int   read_only;
 char  **user_names;
 unsigned int  num_of_users;
+int   user_case_insensitive;
 jk_uint32_t   good_mask;
 jk_uint32_t   bad_mask;
 jk_worker_t   worker;
@@ -2987,9 +2988,17 @@
 unsigned int i;
 denied = 1;
 for (i = 0; i  w-num_of_users; i++) {
-if (!strcmp(s-remote_user, w-user_names[i])) {
-denied = 0;
-break;
+if (w-user_case_insensitive) {
+if (!strcasecmp(s-remote_user, w-user_names[i])) {
+denied = 0;
+break;
+}
+}
+else {
+if (!strcmp(s-remote_user, w-user_names[i])) {
+denied = 0;
+break;
+}
 }
 }
 }
@@ -3502,20 +3511,26 @@
 p-xmlns = jk_get_worker_xmlns(props, p-name, JK_STATUS_XMLNS_DEF);
 p-doctype = jk_get_worker_xml_doctype(props, p-name, NULL);
 p-read_only = jk_get_is_read_only(props, p-name);
+p-user_case_insensitive = jk_get_worker_user_case_insensitive(props, 
p-name);
 if (JK_IS_DEBUG_LEVEL(l))
 jk_log(l, JK_LOG_DEBUG,
-   Status worker '%s' has css '%s' and read_only '%s',
+   Status worker '%s' is %s and has css '%s', prefix '%s', 
name space '%s', xml name space '%s', document type '%s',
p-name,
+   p-read_only ? read-only : read/write,
p-css ? p-css : (null),
-   p-read_only ? true : false);
+   p-prefix ? p-prefix : (null),
+   p-ns ? p-ns : (null),
+   p-xmlns ? p-xmlns : (null),
+   p-doctype ? p-doctype : (null));
 if (jk_get_worker_user_list(props, p-name,
 (p-user_names),
 (p-num_of_users))  p-num_of_users) {
 for (i = 0; i  p-num_of_users; i++) {
 if (JK_IS_DEBUG_LEVEL(l))
 jk_log(l, JK_LOG_DEBUG,
-restricting access for status worker '%s' to user 
'%s',
-p-name, p-user_names[i]);
+Status worker '%s' restricting access to user 
'%s' case %s,
+p-name, p-user_names[i],
+p-user_case_insensitive ? insensitive : 
sensitive);
 }
 }
 if (jk_get_worker_good_rating(props, p-name,

Modified: tomcat/connectors/trunk/jk/native/common/jk_util.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_util.c?view=diffrev=500787r1=500786r2=500787
==
--- tomcat/connectors/trunk/jk/native/common/jk_util.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_util.c Sun Jan 28 05:15:50 2007
@@ -85,6 +85,7 @@
 
 #define READ_ONLY_OF_WORKER (read_only)
 #define USER_OF_WORKER  (user)
+#define USER_CASE_OF_WORKER (user_case_insensitive)
 #define GOOD_RATING_OF_WORKER   (good)
 #define BAD_RATING_OF_WORKER(bad)
 
@@ -182,6 +183,7 @@
 XML_DOCTYPE_OF_WORKER,
 PROP_PREFIX_OF_WORKER,
 STATUS_FAIL_OF_WORKER,
+USER_CASE_OF_WORKER,
 NULL
 };
 
@@ -1027,6 +1029,20 @@
 
 }
 
+int jk_get_worker_user_case_insensitive(jk_map_t *m, const char *wname)
+{
+int rc = JK_FALSE;
+char buf[1024];
+if (m  wname) {
+int value;
+MAKE_WORKER_PARAM(USER_CASE_OF_WORKER);
+value = jk_map_get_bool(m, buf, 0);
+if (value)
+rc = JK_TRUE;
+}
+return rc;
+
+}
 
 const char *jk_get_worker_style_sheet(jk_map_t *m, const char *wname, const 
char 

DO NOT REPLY [Bug 41318] - JK Status Worker Security User Case Problem in Windows

2007-01-28 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=41318.
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=41318


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2007-01-28 05:16 ---
I added a new attribute user_case_insensitive to the status worker,
which can be set to True in workers.properties to make the user
name comparison case insensitive. Default is False=case sensitive.
This will be part of version 1.2.21.

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



svn commit: r500791 - in /tomcat/connectors/trunk/jk: native/common/jk_status.c xdocs/miscellaneous/changelog.xml

2007-01-28 Thread rjung
Author: rjung
Date: Sun Jan 28 05:38:50 2007
New Revision: 500791

URL: http://svn.apache.org/viewvc?view=revrev=500791
Log:
Refactoring searching for workers and sub workers in status worker.

Modified:
tomcat/connectors/trunk/jk/native/common/jk_status.c
tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml

Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_status.c?view=diffrev=500791r1=500790r2=500791
==
--- tomcat/connectors/trunk/jk/native/common/jk_status.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_status.c Sun Jan 28 05:38:50 
2007
@@ -1009,6 +1009,153 @@
 return JK_TRUE;
 }
 
+static int fetch_worker_and_sub_worker(status_endpoint_t *p,
+   const char *operation,
+   const char **worker,
+   const char **sub_worker,
+   jk_logger_t *l)
+{
+status_worker_t *w = p-worker;
+
+JK_TRACE_ENTER(l);
+status_get_string(p, JK_STATUS_ARG_WORKER, NULL, worker, l);
+status_get_string(p, JK_STATUS_ARG_SUB_WORKER, NULL, sub_worker, l);
+if (JK_IS_DEBUG_LEVEL(l))
+jk_log(l, JK_LOG_DEBUG,
+   Status worker '%s' %s worker '%s' sub worker '%s',
+   w-name, operation,
+   *worker ? *worker : (null), *sub_worker ? *sub_worker : 
(null));
+JK_TRACE_EXIT(l);
+return JK_TRUE;
+}
+
+static int check_valid_lb(jk_ws_service_t *s,
+  status_endpoint_t *p,
+  jk_worker_t *jw,
+  const char *worker,
+  lb_worker_t **lbp,
+  int implemented,
+  jk_logger_t *l)
+{
+status_worker_t *w = p-worker;
+
+JK_TRACE_ENTER(l);
+if (jw-type != JK_LB_WORKER_TYPE) {
+if (implemented) {
+jk_log(l, JK_LOG_WARNING,
+   Status worker '%s' worker type of worker '%s' has no sub 
workers,
+   w-name, worker);
+p-msg = worker type has no sub workers;
+}
+else {
+jk_log(l, JK_LOG_WARNING,
+   Status worker '%s' worker type of worker '%s' not 
implemented,
+   w-name, worker);
+   p-msg = worker type not implemented;
+}
+JK_TRACE_EXIT(l);
+return JK_FALSE;
+}
+*lbp = (lb_worker_t *)jw-worker_private;
+if (!*lbp) {
+jk_log(l, JK_LOG_WARNING,
+   Status worker '%s' lb structure of worker '%s' is (null),
+   w-name, worker);
+p-msg = lb structure is (null);
+JK_TRACE_EXIT(l);
+return JK_FALSE;
+}
+p-msg = OK;
+JK_TRACE_EXIT(l);
+return JK_TRUE;
+}
+
+static int search_worker(jk_ws_service_t *s,
+ status_endpoint_t *p,
+ jk_worker_t **jwp,
+ const char *worker,
+ jk_logger_t *l)
+{
+status_worker_t *w = p-worker;
+
+JK_TRACE_ENTER(l);
+*jwp = NULL;
+if (JK_IS_DEBUG_LEVEL(l))
+jk_log(l, JK_LOG_DEBUG,
+   Status worker '%s' searching worker '%s',
+   w-name, worker ? worker : (null));
+if (!worker || !worker[0]) {
+jk_log(l, JK_LOG_WARNING,
+   Status worker '%s' NULL or EMPTY worker param,
+   w-name);
+p-msg = NULL or EMPTY worker param;
+JK_TRACE_EXIT(l);
+return JK_FALSE;
+}
+*jwp = wc_get_worker_for_name(worker, l);
+if (!*jwp) {
+jk_log(l, JK_LOG_WARNING,
+   Status worker '%s' could not find worker '%s',
+   w-name, worker);
+p-msg = Could not find given worker;
+JK_TRACE_EXIT(l);
+return JK_FALSE;
+}
+p-msg = OK;
+JK_TRACE_EXIT(l);
+return JK_TRUE;
+}
+
+static int search_sub_worker(jk_ws_service_t *s,
+ status_endpoint_t *p,
+ jk_worker_t *jw,
+ const char *worker,
+ worker_record_t **wrp,
+ const char *sub_worker,
+ jk_logger_t *l)
+{
+lb_worker_t *lb = NULL;
+worker_record_t *wr = NULL;
+status_worker_t *w = p-worker;
+unsigned int i;
+
+JK_TRACE_ENTER(l);
+if (JK_IS_DEBUG_LEVEL(l))
+jk_log(l, JK_LOG_DEBUG,
+   Status worker '%s' searching sub worker '%s' of worker '%s',
+   w-name, sub_worker ? sub_worker : (null),
+   worker ? worker : (null));
+if (!sub_worker || !sub_worker[0]) {
+jk_log(l, JK_LOG_WARNING,
+   Status worker '%s' NULL or EMPTY sub_worker param,
+   w-name);
+

svn commit: r500792 - in /tomcat/connectors/trunk/jk: native/common/jk_status.c xdocs/miscellaneous/changelog.xml

2007-01-28 Thread rjung
Author: rjung
Date: Sun Jan 28 05:41:49 2007
New Revision: 500792

URL: http://svn.apache.org/viewvc?view=revrev=500792
Log:
Improved logging in status worker by adding status worker name to messages.
Added messages to the recover worker action.

Modified:
tomcat/connectors/trunk/jk/native/common/jk_status.c
tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml

Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_status.c?view=diffrev=500792r1=500791r2=500792
==
--- tomcat/connectors/trunk/jk/native/common/jk_status.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_status.c Sun Jan 28 05:41:49 
2007
@@ -580,8 +580,8 @@
 break;
 default:
 jk_log(l, JK_LOG_WARNING,
-   Unknown activation type '%d',
-   activation);
+   Status worker '%s' unknown activation type '%d',
+   w-name, activation);
 }
 switch (state)
 {
@@ -608,8 +608,8 @@
 break;
 default:
 jk_log(l, JK_LOG_WARNING,
-   Unknown state type '%d',
-   state);
+   Status worker '%s' unknown state type '%d',
+   w-name, state);
 }
 if (maskbad)
 rv = -1;
@@ -619,9 +619,9 @@
 rv = 0;
 if (JK_IS_DEBUG_LEVEL(l))
 jk_log(l, JK_LOG_DEBUG,
-   rating of activation '%s' and state '%s' for good '%08 
JK_UINT32_T_HEX_FMT
+   Status worker '%s' rating of activation '%s' and state '%s' 
for good '%08 JK_UINT32_T_HEX_FMT
' and bad '%08 JK_UINT32_T_HEX_FMT ' is %d,
-   jk_lb_get_activation(wr, l), jk_lb_get_state(wr, l),
+   w-name, jk_lb_get_activation(wr, l), jk_lb_get_state(wr, l),
good, bad, rv);
 return rv;
 }
@@ -942,6 +942,7 @@
 jk_logger_t *l)
 {
 jk_map_t *m;
+status_worker_t *w = p-worker;
 #if defined(AS400) || defined(_REENTRANT)
 char *lasts;
 #endif
@@ -952,14 +953,16 @@
 
 if (!jk_map_alloc((p-req_params))) {
 jk_log(l, JK_LOG_ERROR,
-   could not alloc map for request parameters);
+   Status worker '%s' could not alloc map for request parameters,
+   w-name);
 JK_TRACE_EXIT(l);
 return JK_FALSE;
 }
 if (!s-query_string) {
 if (JK_IS_DEBUG_LEVEL(l))
 jk_log(l, JK_LOG_DEBUG,
-   query string is empty);
+   Status worker '%s' query string is empty,
+   w-name);
 JK_TRACE_EXIT(l);
 return JK_TRUE;
 }
@@ -967,7 +970,8 @@
 query = jk_pool_strdup(s-pool, s-query_string);
 if (!query) {
 jk_log(l, JK_LOG_ERROR,
-   could not copy string);
+   Status worker '%s' could not copy string,
+   w-name);
 JK_TRACE_EXIT(l);
 return JK_FALSE;
 }
@@ -981,7 +985,8 @@
 char *value;
 if (!key) {
 jk_log(l, JK_LOG_ERROR,
-   could not copy string);
+   Status worker '%s' could not copy string,
+   w-name);
 JK_TRACE_EXIT(l);
 return JK_FALSE;
 }
@@ -998,8 +1003,8 @@
 if (strlen(key)) {
 if (JK_IS_DEBUG_LEVEL(l))
 jk_log(l, JK_LOG_DEBUG,
-   adding request param '%s' with value '%s',
-   key, value);
+   Status worker '%s' adding request param '%s' with 
value '%s',
+   w-name, key, value);
 jk_map_put(m, key, value, NULL);
 }
 }
@@ -1284,8 +1289,8 @@
 }
 if (JK_IS_DEBUG_LEVEL(l))
 jk_log(l, JK_LOG_DEBUG,
-   displayed %d maps for worker '%s',
-   count, worker);
+   Status worker '%s' displayed %d maps for worker '%s',
+   w-name, count, worker);
 JK_TRACE_EXIT(l);
 }
 
@@ -1783,19 +1788,22 @@
jk_worker_t *jw,
jk_logger_t *l)
 {
+status_worker_t *w = p-worker;
+
 JK_TRACE_ENTER(l);
 if (jw-type == JK_LB_WORKER_TYPE) {
 lb_worker_t *lb = (lb_worker_t *)jw-worker_private;
 if (lb) {
 if (JK_IS_DEBUG_LEVEL(l))
 jk_log(l, JK_LOG_DEBUG,
-   %s lb worker '%s',
-   displaying, lb-s-name);
+   Status worker '%s' %s lb worker '%s',
+   w-name, displaying, lb-s-name);
 display_worker_lb(s, p, lb, l);
 }
 else {
 jk_log(l, JK_LOG_WARNING,
-   lb worker is (null));
+   Status worker '%s' lb worker is (null),
+   w-name);
 }
 }
   

svn commit: r500805 - in /tomcat/connectors/trunk/jk: native/common/jk_ajp_common.c native/common/jk_connect.c native/common/jk_lb_worker.c native/common/jk_uri_worker_map.c native/common/jk_worker.c

2007-01-28 Thread rjung
Author: rjung
Date: Sun Jan 28 06:55:07 2007
New Revision: 500805

URL: http://svn.apache.org/viewvc?view=revrev=500805
Log:
- BZ41332: Add some more errno logging and unify the format.
- Add a forgotten item to changelog:
  Use correct windows line endings for log file on WIN32 platform.

Modified:
tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c
tomcat/connectors/trunk/jk/native/common/jk_connect.c
tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c
tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c
tomcat/connectors/trunk/jk/native/common/jk_worker.c
tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml

Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c?view=diffrev=500805r1=500804r2=500805
==
--- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Sun Jan 28 
06:55:07 2007
@@ -760,6 +760,7 @@
 rc = select((int)ae-sd + 1, rset, NULL, NULL, tv);
 } while (rc  0  errno == EINTR);
 
+ae-last_errno = 0;
 if (rc == 0) {
 /* Timeout. Set the errno to timeout */
 #if defined(WIN32) || (defined(NETWARE)  defined(__NOVELL_LIBC__))
@@ -767,11 +768,13 @@
 #else
 errno = ETIMEDOUT;
 #endif
+ae-last_errno = errno;
 return JK_FALSE;
 }
 else if (rc  0) {
+ae-last_errno = errno;
 jk_log(l, JK_LOG_WARNING,
-   error during select err=%d, errno);
+   error during select (errno=%d), ae-last_errno);
 return JK_FALSE;
 }
 else
@@ -871,8 +874,8 @@
 ae-last_errno = errno;
 
 jk_log(l, JK_LOG_INFO,
-   Failed opening socket to (%s) with (errno=%d),
-   jk_dump_hinfo(ae-worker-worker_inet_addr, buf), errno);
+   Failed opening socket to (%s) (errno=%d),
+   jk_dump_hinfo(ae-worker-worker_inet_addr, buf), ae-last_errno);
 JK_TRACE_EXIT(l);
 return JK_FALSE;
 }
@@ -913,7 +916,7 @@
 }
 ae-last_errno = errno;
 jk_log(l, JK_LOG_ERROR,
-   sendfull returned %d with errno=%d , rc, ae-last_errno);
+   sendfull returned %d (errno=%d), rc, ae-last_errno);
 
 JK_TRACE_EXIT(l);
 return JK_FALSE;
@@ -947,9 +950,9 @@
 else {
 jk_log(l, JK_LOG_ERROR,
(%s) can't receive the response message from tomcat, 
-   network problems or tomcat is down (%s), err=%d,
-   ae-worker-name, 
jk_dump_hinfo(ae-worker-worker_inet_addr,
-   buf), rc);
+   network problems or tomcat (%s) is down (errno=%d),
+   ae-worker-name, 
jk_dump_hinfo(ae-worker-worker_inet_addr, buf),
+   ae-last_errno);
  JK_TRACE_EXIT(l);
 }
 return JK_FALSE;
@@ -1013,13 +1016,24 @@
 rc = jk_tcp_socket_recvfull(ae-sd, msg-buf, msglen);
 if (rc  0) {
 ae-last_errno = errno;
-jk_log(l, JK_LOG_ERROR,
-   (%s) can't receive the response message from tomcat, 
-   network problems or tomcat (%s) is down %d,
-   ae-worker-name, jk_dump_hinfo(ae-worker-worker_inet_addr, 
buf),
-   rc);
-JK_TRACE_EXIT(l);
-return JK_FALSE;
+if (rc == JK_SOCKET_EOF) {
+jk_log(l, JK_LOG_ERROR,
+   (%s) can't receive the response message from tomcat, 
+   tomcat (%s) has forced a connection close for socket %d,
+   ae-worker-name, 
jk_dump_hinfo(ae-worker-worker_inet_addr, buf),
+   ae-sd);
+JK_TRACE_EXIT(l);
+return JK_FALSE;
+}
+else {
+jk_log(l, JK_LOG_ERROR,
+   (%s) can't receive the response message from tomcat, 
+   network problems or tomcat (%s) is down (errno=%d),
+   ae-worker-name, 
jk_dump_hinfo(ae-worker-worker_inet_addr, buf),
+   ae-last_errno);
+JK_TRACE_EXIT(l);
+return JK_FALSE;
+}
 }
 ae-last_errno = 0;
 ae-endpoint.rd += rc;
@@ -1544,8 +1558,8 @@
 JK_FALSE) {
 jk_log(l, JK_LOG_ERROR,
(%s) Timeout with waiting reply from tomcat. 
-   Tomcat is down, stopped or network problems.,
-   p-worker-name);
+   Tomcat is down, stopped or network problems 
(errno=%d),
+   p-worker-name, p-last_errno);
 if (headeratclient == JK_FALSE) {
 if (p-worker-recovery_opts  
RECOVER_ABORT_IF_TCGETREQUEST)
 op-recoverable = JK_FALSE;
@@ -2012,7 +2026,7 @@
 

DO NOT REPLY [Bug 41332] - [PATCH] Improved error reporting in jk_ajp_common.c

2007-01-28 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=41332.
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=41332


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2007-01-28 06:56 ---
I applied a variation of the patch and made the errno log format
more consistent across the different source parts (always using (errno=...)).

Thanks for pointing this out.

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



svn commit: r500810 - /tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

2007-01-28 Thread markt
Author: markt
Date: Sun Jan 28 07:25:04 2007
New Revision: 500810

URL: http://svn.apache.org/viewvc?view=revrev=500810
Log:
Correct change log. The infinite loop issue had already been resolved.

Modified:
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?view=diffrev=500810r1=500809r2=500810
==
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Sun Jan 28 07:25:04 2007
@@ -31,8 +31,8 @@
 web.xml. (markt)
   /fix
   fix
-bug39088/bug: Prevent infinte loops when an exception is thrown
-that returns itself for getRootCause(). (markt)
+bug39088/bug: Port fix from TC5 that improved chances of finding
+the true root cause. (markt)
   /fix
   fix
 bug41217/bug: Set secure attribute on SSO cookie when cookie is



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



svn commit: r500812 - in /tomcat/tc6.0.x/trunk/java/org/apache/catalina: core/StandardWrapper.java valves/ErrorReportValve.java

2007-01-28 Thread markt
Author: markt
Date: Sun Jan 28 07:28:23 2007
New Revision: 500812

URL: http://svn.apache.org/viewvc?view=revrev=500812
Log:
Simplify code since ServletException now uses standard exception chaining.

Modified:
tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardWrapper.java
tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/ErrorReportValve.java

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardWrapper.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardWrapper.java?view=diffrev=500812r1=500811r2=500812
==
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardWrapper.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardWrapper.java Sun 
Jan 28 07:28:23 2007
@@ -709,9 +709,7 @@
 return theException;
 }
 
-if (theRootCause instanceof ServletException) {
-deeperRootCause = ((ServletException) theRootCause).getRootCause();
-} else if (jspExceptionClazz!=null 
+if (jspExceptionClazz!=null 
 jspExceptionClazz.isAssignableFrom(theRootCause.getClass())) {
 deeperRootCause = (Throwable)IntrospectionUtils.getProperty(
 theRootCause, rootCause); 

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/ErrorReportValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/ErrorReportValve.java?view=diffrev=500812r1=500811r2=500812
==
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/ErrorReportValve.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/ErrorReportValve.java 
Sun Jan 28 07:28:23 2007
@@ -241,10 +241,7 @@
 sb.append(/pre/p);
 // In case root cause is somehow heavily nested
 try {
-if (rootCause instanceof ServletException) {
-nestedRootCause =
-((ServletException) rootCause).getRootCause();
-} else if (jspExceptionClazz!=null 
+if (jspExceptionClazz!=null 
 jspExceptionClazz.isAssignableFrom(
 rootCause.getClass())) {
 nestedRootCause = (Throwable)IntrospectionUtils.



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



Re: svn commit: r500716 - in /tomcat/tc6.0.x/trunk: java/org/apache/catalina/core/StandardWrapper.java java/org/apache/catalina/valves/ErrorReportValve.java webapps/docs/changelog.xml

2007-01-28 Thread Mark Thomas
Remy Maucherat wrote:
 [EMAIL PROTECTED] wrote:
 Author: markt
 Date: Sat Jan 27 16:55:24 2007
 New Revision: 500716

 URL: http://svn.apache.org/viewvc?view=revrev=500716
 Log:
 Port fix bug 39088 that prevents infinite loops when an exception is
 thrown the returns itself for getRootCause(). Also port changes that
 enable the root cause to be found when the nesting is particularly
 extreme.
 
 Ar, my eyes :D :D
 
 TC 6 already used the clean mechanism (using getCause, which can also
 display a lot more about the exception if proper wrapping was done by
 the application), so reverting to the TC 5.5 hack is super evil. It also
 had a recursion limit which seemed reasonable to me, and is going to be
 more efficient than your check.

I have already done some cleaning and corrected the change log.

There are a couple of problem with getCause. The first is that is
doesn't unwrap a fairly frequent exception for web applications:
SQLException. The second is that it doesn't unwrap a JspException that
has used the JspException(Throwable) constructor.

An alternative approach that has since occurred to me is to modify
JspException in the same way as ServletException so the standard
exception chaining is always used. This would enable getCause to be
used in all cases apart from SQLException and allow a much cleaner
patch whilst retaining improved root cause identification.

Having now just looked at the JavaDoc for JspException in the JSP 2.1
final spec we have to make this change to be spec compliant.
getRootCause has been deprecated in favour of getCause.

I'll make the changes later today.

Mark


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



svn commit: r500824 - /tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/JspException.java

2007-01-28 Thread markt
Author: markt
Date: Sun Jan 28 08:39:42 2007
New Revision: 500824

URL: http://svn.apache.org/viewvc?view=revrev=500824
Log:
Replace tabs with 8 spaces and tidy up the javadocs afterwards. No functional 
change.

Modified:
tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/JspException.java

Modified: tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/JspException.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/JspException.java?view=diffrev=500824r1=500823r2=500824
==
--- tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/JspException.java (original)
+++ tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/JspException.java Sun Jan 28 
08:39:42 2007
@@ -39,13 +39,11 @@
  * specified message. The message can be written 
  * to the server log and/or displayed for the user. 
  *
- * @param msg  a codeString/code 
- * specifying the text of 
- * the exception message
- *
+ * @param msg   a codeString/code specifying the text of the exception
+ *  message
  */
 public JspException(String msg) {
-   super(msg);
+super(msg);
 }
 
 
@@ -56,19 +54,17 @@
  * normal operation, including a description message.
  *
  *
- * @param message  a codeString/code containing 
- * the text of the exception message
- *
- * @param rootCausethe codeThrowable/code exception 
- * that interfered with the servlet's
- * normal operation, making this servlet
- * exception necessary
+ * @param message   a codeString/code containing the text of the
+ *  exception message
  *
+ * @param rootCause the codeThrowable/code exception that
+ *  interfered with the servlet's normal operation,
+ *  making this servlet exception necessary
  */
 
 public JspException(String message, Throwable rootCause) {
-   super(message);
-   this.rootCause = rootCause;
+super(message);
+this.rootCause = rootCause;
 }
 
 
@@ -85,29 +81,25 @@
  * this method can be overridden to create an exception message 
  * designed for a specific locale.
  *
- * @param rootCausethe codeThrowable/code exception
- * that interfered with the JSP's
- * normal operation, making the JSP exception
- * necessary
- *
+ * @param rootCause the codeThrowable/code exception that
+ *  interfered with the JSP's normal operation, making
+ *  the JSP exception necessary
  */
 
 public JspException(Throwable rootCause) {
-   super(rootCause.getLocalizedMessage());
-   this.rootCause = rootCause;
+super(rootCause.getLocalizedMessage());
+this.rootCause = rootCause;
 }
 
 
 /**
  * Returns the exception that caused this JSP exception.
  *
- *
- * @return the codeThrowable/code 
- * that caused this JSP exception
+ * @return  the codeThrowable/code that caused this JSP exception
  *
  */
 
 public Throwable getRootCause() {
-   return rootCause;
+return rootCause;
 }
 }



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



svn commit: r500830 - /tomcat/connectors/trunk/jk/native/common/jk_status.c

2007-01-28 Thread rjung
Author: rjung
Date: Sun Jan 28 08:57:38 2007
New Revision: 500830

URL: http://svn.apache.org/viewvc?view=revrev=500830
Log:
Fix compilation error in status worker.

Modified:
tomcat/connectors/trunk/jk/native/common/jk_status.c

Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_status.c?view=diffrev=500830r1=500829r2=500830
==
--- tomcat/connectors/trunk/jk/native/common/jk_status.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_status.c Sun Jan 28 08:57:38 
2007
@@ -1313,6 +1313,8 @@
 unsigned int degraded = 0;
 unsigned int bad = 0;
 int map_count;
+int ms_min;
+int ms_max;
 unsigned int j;
 const char *name = lb-s-name;
 status_worker_t *w = p-worker;
@@ -1353,8 +1355,8 @@
 }
 
 map_count = count_maps(s, name, l);
-int ms_min = lb-maintain_time - (int)difftime(now, 
lb-s-last_maintain_time);
-int ms_max = ms_min + lb-maintain_time;
+ms_min = lb-maintain_time - (int)difftime(now, lb-s-last_maintain_time);
+ms_max = ms_min + lb-maintain_time;
 ms_min -= JK_LB_MAINTAIN_TOLERANCE;
 if (ms_min  0) {
 ms_min = 0;



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



svn commit: r500843 - in /tomcat/tc6.0.x/trunk/java: javax/servlet/jsp/JspException.java org/apache/catalina/core/StandardWrapper.java org/apache/catalina/valves/ErrorReportValve.java

2007-01-28 Thread markt
Author: markt
Date: Sun Jan 28 09:28:36 2007
New Revision: 500843

URL: http://svn.apache.org/viewvc?view=revrev=500843
Log:
Update JspException to align with the JSP 2.1 spec.
Update root cause finding to take advantage of being able to use getCause

Modified:
tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/JspException.java
tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardWrapper.java
tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/ErrorReportValve.java

Modified: tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/JspException.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/JspException.java?view=diffrev=500843r1=500842r2=500843
==
--- tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/JspException.java (original)
+++ tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/JspException.java Sun Jan 28 
09:28:36 2007
@@ -48,55 +48,51 @@
 
 
 /**
- * Constructs a new JSP exception when the JSP 
- * needs to throw an exception and include a message 
- * about the root cause exception that interfered with its 
- * normal operation, including a description message.
- *
+ * Constructs a new codeJSPException/code with the specified detail
+ * message and cause. The cause is saved for later retrieval by the
+ * codejava.lang.Throwable.getCause()/code and [EMAIL PROTECTED] 
#getRootCause()}
+ * methods.
+ * 
+ * @see codejava.lang.Exception.Exception(String, Throwable)/code
  *
  * @param message   a codeString/code containing the text of the
  *  exception message
  *
- * @param rootCause the codeThrowable/code exception that
- *  interfered with the servlet's normal operation,
- *  making this servlet exception necessary
+ * @param cause the codeThrowable/code exception that
+ *  interfered with the JSP's normal operation,
+ *  making this JSP exception necessary
  */
 
-public JspException(String message, Throwable rootCause) {
-super(message);
-this.rootCause = rootCause;
+public JspException(String message, Throwable cause) {
+super(message, cause);
 }
 
 
 /**
- * Constructs a new JSP exception when the JSP 
- * needs to throw an exception and include a message
- * about the root cause exception that interfered with its
- * normal operation.  The exception's message is based on the localized
- * message of the underlying exception.
- *
- * pThis method calls the codegetLocalizedMessage/code method
- * on the codeThrowable/code exception to get a localized exception
- * message. When subclassing codeJspException/code, 
- * this method can be overridden to create an exception message 
- * designed for a specific locale.
+ * Constructs a new codeJSPException/code with the specified cause.
+ * The cause is saved for later retrieval by the
+ * codejava.lang.Throwable.getCause()/code and [EMAIL PROTECTED] 
#getRootCause()}
+ * methods.
+ * 
+ * @see codejava.lang.Exception.Exception(Throwable)/code
  *
- * @param rootCause the codeThrowable/code exception that
+ * @param cause the codeThrowable/code exception that
  *  interfered with the JSP's normal operation, making
  *  the JSP exception necessary
  */
 
-public JspException(Throwable rootCause) {
-super(rootCause.getLocalizedMessage());
-this.rootCause = rootCause;
+public JspException(Throwable cause) {
+super(cause);
 }
 
 
 /**
+ * @deprecated As of JSP 2.1, replaced by
+ * codejava.lang.Throwable.getCause()/code
+ *  
  * Returns the exception that caused this JSP exception.
  *
  * @return  the codeThrowable/code that caused this JSP exception
- *
  */
 
 public Throwable getRootCause() {

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardWrapper.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardWrapper.java?view=diffrev=500843r1=500842r2=500843
==
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardWrapper.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardWrapper.java Sun 
Jan 28 09:28:36 2007
@@ -62,7 +62,6 @@
 import org.apache.catalina.security.SecurityUtil;
 import org.apache.catalina.util.Enumerator;
 import org.apache.catalina.util.InstanceSupport;
-import org.apache.tomcat.util.IntrospectionUtils;
 import org.apache.tomcat.util.log.SystemLogHandler;
 import org.apache.tomcat.util.modeler.Registry;
 
@@ -295,18 +294,6 @@
 protected static Properties restrictedServlets = null;
 

svn commit: r500864 - in /tomcat/connectors/trunk/jk: native/iis/jk_isapi_plugin.c xdocs/miscellaneous/changelog.xml

2007-01-28 Thread rjung
Author: rjung
Date: Sun Jan 28 11:50:35 2007
New Revision: 500864

URL: http://svn.apache.org/viewvc?view=revrev=500864
Log:
Refactoring isapi_plugin configuration reading.
Contributed by Tim DOT Whittington AT orionhealth DOT com (BZ 41333)

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=diffrev=500864r1=500863r2=500864
==
--- tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c (original)
+++ tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c Sun Jan 28 11:50:35 
2007
@@ -86,9 +86,9 @@
 #define URI_SELECT_PARSED_VERB  (parsed)
 #define URI_SELECT_UNPARSED_VERB(unparsed)
 #define URI_SELECT_ESCAPED_VERB (escaped)
-#define URI_REWRITE_VERB(rewrite_rule_file)
-#define SHM_SIZE_VERB   (shm_size)
-#define WORKER_MOUNT_RELOAD_VERB(worker_mount_reload)
+#define URI_REWRITE_TAG (rewrite_rule_file)
+#define SHM_SIZE_TAG(shm_size)
+#define WORKER_MOUNT_RELOAD_TAG (worker_mount_reload)
 
 
 #define TRANSLATE_HEADER(Translate:)
@@ -211,6 +211,13 @@
 
 static int read_registry_init_data(void);
 
+static int get_config_parameter(LPVOID src, const char *tag, 
+char *val, DWORD sz);
+
+static int get_config_bool(LPVOID src, const char *tag, int def);
+
+static int get_config_int(LPVOID src, const char *tag, int def);
+
 static int get_registry_config_parameter(HKEY hkey,
  const char *tag, char *b, DWORD sz);
 
@@ -1324,152 +1331,107 @@
 
 static int read_registry_init_data(void)
 {
-char tmpbuf[INTERNET_MAX_URL_LENGTH];
-HKEY hkey;
-long rc;
+char tmpbuf[MAX_PATH];
 int ok = JK_TRUE;
-const char *tmp;
-jk_map_t *map;
+LPVOID src;
+HKEY hkey;
+jk_map_t *map = NULL;
 
 if (jk_map_alloc(map)) {
 if (jk_map_read_properties(map, ini_file_name, NULL, logger)) {
 using_ini_file = JK_TRUE;
-}
-}
-if (using_ini_file) {
-tmp = jk_map_get_string(map, JK_LOG_FILE_TAG, NULL);
-if (tmp) {
-strcpy(log_file, tmp);
-}
-else {
-ok = JK_FALSE;
-}
-tmp = jk_map_get_string(map, JK_LOG_LEVEL_TAG, NULL);
-if (tmp) {
-log_level = jk_parse_log_level(tmp);
-}
-tmp = jk_map_get_string(map, EXTENSION_URI_TAG, NULL);
-if (tmp) {
-strcpy(extension_uri, tmp);
+src = map;
 }
 else {
-ok = JK_FALSE;
+jk_map_free(map);
 }
-tmp = jk_map_get_string(map, JK_WORKER_FILE_TAG, NULL);
-if (tmp) {
-strcpy(worker_file, tmp);
+}
+if (!using_ini_file) {
+long rc = RegOpenKeyEx(HKEY_LOCAL_MACHINE, REGISTRY_LOCATION, 
+   (DWORD)0, KEY_READ, hkey);
+if (ERROR_SUCCESS != rc) {
+return JK_FALSE;
 }
 else {
-ok = JK_FALSE;
+src = hkey;
 }
-tmp = jk_map_get_string(map, JK_MOUNT_FILE_TAG, NULL);
-if (tmp) {
-strcpy(worker_mount_file, tmp);
+}
+ok = ok  get_config_parameter(src, JK_LOG_FILE_TAG, log_file, 
sizeof(log_file));
+if (get_config_parameter(src, JK_LOG_LEVEL_TAG, tmpbuf, sizeof(tmpbuf))) {
+log_level = jk_parse_log_level(tmpbuf);
+}
+ok = ok  get_config_parameter(src, EXTENSION_URI_TAG, extension_uri, 
sizeof(extension_uri));
+ok = ok  get_config_parameter(src, JK_WORKER_FILE_TAG, worker_file, 
sizeof(worker_file));
+ok = ok  get_config_parameter(src, JK_MOUNT_FILE_TAG, worker_mount_file, 
sizeof(worker_mount_file));
+get_config_parameter(src, URI_REWRITE_TAG, rewrite_rule_file, 
sizeof(rewrite_rule_file));
+if (get_config_parameter(src, URI_SELECT_TAG, tmpbuf, sizeof(tmpbuf))) {
+int opt = parse_uri_select(tmpbuf);
+if (opt = 0) {
+uri_select_option = opt;
 }
 else {
 ok = JK_FALSE;
 }
-tmp = jk_map_get_string(map, URI_REWRITE_VERB, NULL);
-if (tmp) {
-strcpy(rewrite_rule_file, tmp);
-}
-tmp = jk_map_get_string(map, URI_SELECT_TAG, NULL);
-if (tmp) {
-int opt = parse_uri_select(tmp);
-if (opt = 0) {
-uri_select_option = opt;
-}
-else {
-ok = JK_FALSE;
-}
-}
-tmp = jk_map_get_string(map, SHM_SIZE_VERB, NULL);
-if (tmp) {
-shm_config_size = atoi(tmp);
-}
-tmp = jk_map_get_string(map, WORKER_MOUNT_RELOAD_VERB, NULL);
-if (tmp) {
-

DO NOT REPLY [Bug 41333] - [PATCH] Reworked IIS config getting to remove duplication

2007-01-28 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=41333.
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=41333


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2007-01-28 11:51 ---
Thanks. Commited 98% after testing.
Will be part of 1.2.21.

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



svn commit: r500865 - in /tomcat/connectors/trunk/jk: native/iis/jk_isapi_plugin.c xdocs/miscellaneous/changelog.xml xdocs/reference/iis.xml

2007-01-28 Thread rjung
Author: rjung
Date: Sun Jan 28 12:03:32 2007
New Revision: 500865

URL: http://svn.apache.org/viewvc?view=revrev=500865
Log:
Allow session IDs to get stripped off URLs of static content in IIS 
(configurable). (BZ 41439)
We still need to port this to Apache and Sun Web Server.

Modified:
tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c
tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
tomcat/connectors/trunk/jk/xdocs/reference/iis.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=diffrev=500865r1=500864r2=500865
==
--- tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c (original)
+++ tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c Sun Jan 28 12:03:32 
2007
@@ -89,6 +89,7 @@
 #define URI_REWRITE_TAG (rewrite_rule_file)
 #define SHM_SIZE_TAG(shm_size)
 #define WORKER_MOUNT_RELOAD_TAG (worker_mount_reload)
+#define STRIP_SESSION_TAG   (strip_session)
 
 
 #define TRANSLATE_HEADER(Translate:)
@@ -165,6 +166,7 @@
 static int  worker_mount_reload = JK_URIMAP_DEF_RELOAD;
 static char rewrite_rule_file[MAX_PATH * 2] = {0};
 static int shm_config_size = JK_SHM_DEF_SIZE;
+static int strip_session = 0;
 
 #define URI_SELECT_OPT_PARSED   0
 #define URI_SELECT_OPT_UNPARSED 1
@@ -1010,6 +1012,17 @@
 if (JK_IS_DEBUG_LEVEL(logger))
 jk_log(logger, JK_LOG_DEBUG,
[%s] is not a servlet url, uri);
+if (strip_session) {
+   char *jsessionid = strstr(uri, 
JK_PATH_SESSION_IDENTIFIER);
+if (jsessionid) {
+if (JK_IS_DEBUG_LEVEL(logger))
+jk_log(logger, JK_LOG_DEBUG,
+   removing session identifier [%s] for non 
servlet url [%s],
+   jsessionid, uri);
+*jsessionid = '\0';
+SetHeader(pfc, url, uri);
+}
+}
 }
 }
 }
@@ -1375,6 +1388,7 @@
 }
 shm_config_size = get_config_int(src, SHM_SIZE_TAG, JK_SHM_DEF_SIZE);
 worker_mount_reload = get_config_int(src, WORKER_MOUNT_RELOAD_TAG, 
JK_URIMAP_DEF_RELOAD);
+strip_session = get_config_bool(src, STRIP_SESSION_TAG, JK_FALSE);
 
 if (using_ini_file) {
 jk_map_free(map);

Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml?view=diffrev=500865r1=500864r2=500865
==
--- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Sun Jan 28 
12:03:32 2007
@@ -27,6 +27,10 @@
   subsection name=Native
 changelog
   add
+bug41439/bug: Allow session IDs to get stripped off URLs of static
+content in IIS (configurable). (rjung)
+  /add
+  add
 bug41333/bug: Refactoring isapi_plugin configuration reading. 
(rjung)
   /add
   add

Modified: tomcat/connectors/trunk/jk/xdocs/reference/iis.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/reference/iis.xml?view=diffrev=500865r1=500864r2=500865
==
--- tomcat/connectors/trunk/jk/xdocs/reference/iis.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/reference/iis.xml Sun Jan 28 12:03:32 2007
@@ -65,15 +65,15 @@
 (can be debug, info, warn, error or trace).
 /p/attribute
 attribute name=worker_file required=truep
-A string value with the full path to workers.properties file
+A string value which is the full path to workers.properties file
 (for example bc:\tomcat\conf\workers.properties/b)
 /p/attribute
 attribute name=worker_mount_file required=truep
-A string value with is the full path to uriworkermap.properties file
+A string value which is the full path to uriworkermap.properties file
 (for example bc:\tomcat\conf\uriworkermap.properties/b)
 /p/attribute
 attribute name=rewrite_rule_file required=falsep
-A string value with is the full path to rewrite.properties file
+A string value which is the full path to rewrite.properties file
 (for example bc:\tomcat\conf\rewrite.properties/b)
 /p/attribute
 attribute name=shm_size required=falsep
@@ -88,6 +88,16 @@
 bworker_mount_file/b will be reloaded.
 /p
 pThis directive has been added in version 1.2.20/p
+/attribute
+attribute name=strip_session required=falsep
+A string value representing a boolean. If it is set to true,
+URL session prefixes of the form ;jsessionid=... get stripped of URLs,
+even if the are served locally by the web server.

DO NOT REPLY [Bug 41439] - JK 1.2.20 in IIS does not remove ;jsessionid=... from unmapped requests

2007-01-28 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=41439.
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=41439


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2007-01-28 12:07 ---
Although one doesn't have to use the struts tags, if one needs static content
URLs, I still like the idea of being able to strip the suffixes. That way one
will be able to seperate static from dynamic content during deployment time and
developers can still stay on the safe side by encoding all URLs.

I added a new property strip_session, which can be set in the registry or the
proerties file (see docs) to a boolean value (see docs). Default is false,
i.e. suffixes of the form ;jsessionid=... will *not* be stripped. By turing
strip_session to true, they will be stripped, if the request doesn't get
forwarded to tomcat.

We still need to port this to Apache und Sun Web Server though ...

This will be part of version 1.2.21.


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



svn commit: r500869 - /tomcat/connectors/trunk/jk/xdocs/reference/iis.xml

2007-01-28 Thread rjung
Author: rjung
Date: Sun Jan 28 12:07:57 2007
New Revision: 500869

URL: http://svn.apache.org/viewvc?view=revrev=500869
Log:
Fix typo in docs.

Modified:
tomcat/connectors/trunk/jk/xdocs/reference/iis.xml

Modified: tomcat/connectors/trunk/jk/xdocs/reference/iis.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/reference/iis.xml?view=diffrev=500869r1=500868r2=500869
==
--- tomcat/connectors/trunk/jk/xdocs/reference/iis.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/reference/iis.xml Sun Jan 28 12:07:57 2007
@@ -91,7 +91,7 @@
 /attribute
 attribute name=strip_session required=falsep
 A string value representing a boolean. If it is set to true,
-URL session prefixes of the form ;jsessionid=... get stripped of URLs,
+URL session suffixes of the form ;jsessionid=... get stripped of URLs,
 even if the are served locally by the web server.
 A true value can be represented by the string 1 or any string starting
 with the letters T or t. A false value will be assumed for 0



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



svn commit: r500880 - in /tomcat/connectors/trunk/jk: native/apache-1.3/ native/apache-2.0/ native/common/ native/iis/ native/netscape/ native/nt_service/ xdocs/miscellaneous/

2007-01-28 Thread rjung
Author: rjung
Date: Sun Jan 28 13:10:33 2007
New Revision: 500880

URL: http://svn.apache.org/viewvc?view=revrev=500880
Log:
- uriworkermap.properties: Fix off-by-one problem when deleting
  URL mapping during reloading of uriworkermap.properties.
- A few fixes to map handling w.r.t duplicate entries:
  - Add warning if duplicate map keys are read and are not allowed,
e.g. when parsing uriworkermap.properties.
  - Don't concat worker names, if uriworkermap.properties has a duplicate
pattern, instead overwrite the worker.
  - Log deprecation message even in duplication case.

Modified:
tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c
tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c
tomcat/connectors/trunk/jk/native/common/jk_map.c
tomcat/connectors/trunk/jk/native/common/jk_map.h
tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c
tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c
tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c
tomcat/connectors/trunk/jk/native/nt_service/jk_nt_service.c
tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml

Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c?view=diffrev=500880r1=500879r2=500880
==
--- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Sun Jan 28 13:10:33 
2007
@@ -1704,7 +1704,7 @@
 (jk_server_conf_t *) ap_get_module_config(s-module_config,
   jk_module);
 
-if (jk_map_read_property(conf-worker_properties, line, conf-log) == 
JK_FALSE)
+if (jk_map_read_property(conf-worker_properties, line, 1, conf-log) == 
JK_FALSE)
 return ap_pstrcat(cmd-temp_pool, Invalid JkWorkerProperty , line);
 
 return NULL;
@@ -2445,7 +2445,7 @@
 }
 */
 
-if (!jk_map_read_properties(init_map, conf-worker_file, NULL, conf-log)) 
{
+if (!jk_map_read_properties(init_map, conf-worker_file, NULL, 1, 
conf-log)) {
 
 if (jk_map_size(init_map) == 0) {
 ap_log_error(APLOG_MARK, APLOG_EMERG, s,

Modified: tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c?view=diffrev=500880r1=500879r2=500880
==
--- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Sun Jan 28 13:10:33 
2007
@@ -1739,7 +1739,7 @@
 return err_string;
 }
 
-if (jk_map_read_property(conf-worker_properties, line, conf-log) == 
JK_FALSE)
+if (jk_map_read_property(conf-worker_properties, line, 1, conf-log) == 
JK_FALSE)
 return apr_pstrcat(cmd-temp_pool, Invalid JkWorkerProperty , line);
 
 return NULL;
@@ -2587,7 +2587,7 @@
 jk_set_worker_def_cache_size(mpm_threads);
 
 /* if(map_alloc(init_map)) { */
-if (!jk_map_read_properties(init_map, conf-worker_file, NULL, conf-log)) 
{
+if (!jk_map_read_properties(init_map, conf-worker_file, NULL, 1, 
conf-log)) {
 if (jk_map_size(init_map) == 0) {
 ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_CRIT,
  0, NULL,

Modified: tomcat/connectors/trunk/jk/native/common/jk_map.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_map.c?view=diffrev=500880r1=500879r2=500880
==
--- tomcat/connectors/trunk/jk/native/common/jk_map.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_map.c Sun Jan 28 13:10:33 2007
@@ -346,7 +346,7 @@
 return rc;
 }
 
-int jk_map_read_property(jk_map_t *m, const char *str, jk_logger_t *l)
+int jk_map_read_property(jk_map_t *m, const char *str, int allow_duplicates, 
jk_logger_t *l)
 {
 int rc = JK_TRUE;
 char buf[LENGTH_OF_LINE + 1];
@@ -365,29 +365,38 @@
 trim(v);
 if (strlen(v)  strlen(prp)) {
 const char *oldv = jk_map_get_string(m, prp, NULL);
+if (jk_is_deprecated_property(prp)) {
+jk_log(l, JK_LOG_WARNING,
+   The attribute '%s' is deprecated - please check
+the documentation for the correct replacement.,
+   prp);
+}
 v = jk_map_replace_properties(m, v);
-if (oldv  jk_is_unique_property(prp) == JK_FALSE) {
-char *tmpv = jk_pool_alloc(m-p,
-   strlen(v) + strlen(oldv) + 3);
-if (tmpv) {
-char sep = '*';
-if (jk_is_path_property(prp))
-

DO NOT REPLY [Bug 41466] - NIO Connector: IllegalArgumentException: You can only write using the application write buffer provided by the handler

2007-01-28 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=41466.
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=41466


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |ASSIGNED




--- Additional Comments From [EMAIL PROTECTED]  2007-01-28 13:28 ---
Patch is invalid and would lead to invalid SSL data being sent, bug is
acknowledged and will be fixed.

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



svn commit: r500890 - /tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/channel/TestDataIntegrity.java

2007-01-28 Thread fhanik
Author: fhanik
Date: Sun Jan 28 13:34:21 2007
New Revision: 500890

URL: http://svn.apache.org/viewvc?view=revrev=500890
Log:
minor change

Modified:

tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/channel/TestDataIntegrity.java

Modified: 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/channel/TestDataIntegrity.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/channel/TestDataIntegrity.java?view=diffrev=500890r1=500889r2=500890
==
--- 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/channel/TestDataIntegrity.java
 (original)
+++ 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/channel/TestDataIntegrity.java
 Sun Jan 28 13:34:21 2007
@@ -55,7 +55,9 @@
 threads[x] = new Thread() {
 public void run() {
 try {
+long start = System.currentTimeMillis();
 for (int i = 0; i  msgCount; i++) channel1.send(new 
Member[] {channel2.getLocalMember(false)}, Data.createRandomData(),0);
+System.out.println(Thread[+this.getName()+] sent 
+msgCount+ messages in +(System.currentTimeMillis()-start)+ ms.);
 }catch ( Exception x ) {
 x.printStackTrace();
 return;
@@ -69,8 +71,8 @@
 for (int x=0; xthreads.length; x++ ) { threads[x].join();}
 //sleep for 50 sec, let the other messages in
 long start = System.currentTimeMillis();
-while ( (System.currentTimeMillis()-start)12  
msgCount*threadCount!=listener1.count) Thread.sleep(500);
-System.err.println(Finished NO_ACK);
+while ( (System.currentTimeMillis()-start)15000  
msgCount*threadCount!=listener1.count) Thread.sleep(500);
+System.err.println(Finished NO_ACK [+listener1.count+]);
 assertEquals(Checking success 
messages.,msgCount*threadCount,listener1.count);
 }
 
@@ -81,7 +83,9 @@
 threads[x] = new Thread() {
 public void run() {
 try {
+long start = System.currentTimeMillis();
 for (int i = 0; i  msgCount; i++) 
channel1.send(new Member[] {channel2.getLocalMember(false)}, 
Data.createRandomData(),GroupChannel.SEND_OPTIONS_ASYNCHRONOUS);
+System.out.println(Thread[+this.getName()+] 
sent +msgCount+ messages in +(System.currentTimeMillis()-start)+ ms.);
 }catch ( Exception x ) {
 x.printStackTrace();
 return;
@@ -96,7 +100,7 @@
 //sleep for 50 sec, let the other messages in
 long start = System.currentTimeMillis();
 while ( (System.currentTimeMillis()-start)15000  
msgCount*threadCount!=listener1.count) Thread.sleep(500);
-System.err.println(Finished ASYNC MULTI THREAD);
+System.err.println(Finished ASYNC MULTI THREAD 
[+listener1.count+]);
 assertEquals(Checking success 
messages.,msgCount*threadCount,listener1.count);
 }
 public void testDataSendASYNC() throws Exception {



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



DO NOT REPLY [Bug 41466] - NIO Connector: IllegalArgumentException: You can only write using the application write buffer provided by the handler

2007-01-28 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=41466.
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=41466


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2007-01-28 13:35 ---
The following fix has been applied

Index: java/org/apache/tomcat/util/net/NioSelectorPool.java
===
--- java/org/apache/tomcat/util/net/NioSelectorPool.java(revision 
500888)
+++ java/org/apache/tomcat/util/net/NioSelectorPool.java(working copy)
@@ -103,6 +103,10 @@
 boolean timedout = false;
 int keycount = 1; //assume we can write
 long time = System.currentTimeMillis(); //start the timeout timer
+if ( socket.getBufHandler().getWriteBuffer()!= buf ) {
+socket.getBufHandler().getWriteBuffer().put(buf);
+buf = socket.getBufHandler().getWriteBuffer();
+}
 try {
 while ( (!timedout)  buf.hasRemaining() ) {
 if ( keycount  0 ) { //only write if we were registered for a
write


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



svn commit: r500892 - /tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioSelectorPool.java

2007-01-28 Thread fhanik
Author: fhanik
Date: Sun Jan 28 13:35:53 2007
New Revision: 500892

URL: http://svn.apache.org/viewvc?view=revrev=500892
Log:
Fix for bugzilla 41466
When using the NioChannel and SecureNioChannel its important to use the 
channels buffers

Modified:
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioSelectorPool.java

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioSelectorPool.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioSelectorPool.java?view=diffrev=500892r1=500891r2=500892
==
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioSelectorPool.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioSelectorPool.java 
Sun Jan 28 13:35:53 2007
@@ -103,6 +103,10 @@
 boolean timedout = false;
 int keycount = 1; //assume we can write
 long time = System.currentTimeMillis(); //start the timeout timer
+if ( socket.getBufHandler().getWriteBuffer()!= buf ) {
+socket.getBufHandler().getWriteBuffer().put(buf);
+buf = socket.getBufHandler().getWriteBuffer();
+}
 try {
 while ( (!timedout)  buf.hasRemaining() ) {
 if ( keycount  0 ) { //only write if we were registered for a 
write



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



Re: svn commit: r500716 - in /tomcat/tc6.0.x/trunk: java/org/apache/catalina/core/StandardWrapper.java java/org/apache/catalina/valves/ErrorReportValve.java webapps/docs/changelog.xml

2007-01-28 Thread Remy Maucherat

Mark Thomas wrote:

Remy Maucherat wrote:

[EMAIL PROTECTED] wrote:

Author: markt
Date: Sat Jan 27 16:55:24 2007
New Revision: 500716

URL: http://svn.apache.org/viewvc?view=revrev=500716
Log:
Port fix bug 39088 that prevents infinite loops when an exception is
thrown the returns itself for getRootCause(). Also port changes that
enable the root cause to be found when the nesting is particularly
extreme.

Ar, my eyes :D :D

TC 6 already used the clean mechanism (using getCause, which can also
display a lot more about the exception if proper wrapping was done by
the application), so reverting to the TC 5.5 hack is super evil. It also
had a recursion limit which seemed reasonable to me, and is going to be
more efficient than your check.


I have already done some cleaning and corrected the change log.

There are a couple of problem with getCause. The first is that is
doesn't unwrap a fairly frequent exception for web applications:
SQLException. The second is that it doesn't unwrap a JspException that
has used the JspException(Throwable) constructor.

An alternative approach that has since occurred to me is to modify
JspException in the same way as ServletException so the standard
exception chaining is always used. This would enable getCause to be
used in all cases apart from SQLException and allow a much cleaner
patch whilst retaining improved root cause identification.

Having now just looked at the JavaDoc for JspException in the JSP 2.1
final spec we have to make this change to be spec compliant.
getRootCause has been deprecated in favour of getCause.

I'll make the changes later today.


I think it's better if I veto this patch, then. The previous code was 
simpler, complied with the new Java standard for exception nesting, and 
had better protections against infinite loops. Using getCause is the 
standard way of unwrapping exceptions, and should be used moving forward.


Note: I see you have fixed JspException as ServletException has been 
fixed earlier.


Rémy


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



Re: svn commit: r500716 - in /tomcat/tc6.0.x/trunk: java/org/apache/catalina/core/StandardWrapper.java java/org/apache/catalina/valves/ErrorReportValve.java webapps/docs/changelog.xml

2007-01-28 Thread Mark Thomas
Remy Maucherat wrote:
 Mark Thomas wrote:
 An alternative approach that has since occurred to me is to modify
 JspException in the same way as ServletException so the standard
 exception chaining is always used. This would enable getCause to be
 used in all cases apart from SQLException and allow a much cleaner
 patch whilst retaining improved root cause identification.

 Having now just looked at the JavaDoc for JspException in the JSP 2.1
 final spec we have to make this change to be spec compliant.
 getRootCause has been deprecated in favour of getCause.

 I'll make the changes later today.
 
 I think it's better if I veto this patch, then. The previous code was
 simpler, complied with the new Java standard for exception nesting, and
 had better protections against infinite loops. Using getCause is the
 standard way of unwrapping exceptions, and should be used moving forward.

Fair enough. My biggest concern was the lack of JspException
unwrapping. The SQLException support was a nice to have but I'm not
that bothered about it.

 Note: I see you have fixed JspException as ServletException has been
 fixed earlier.

I am assuming the veto doesn't apply to this.

Mark

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



svn commit: r500918 - in /tomcat/tc6.0.x/trunk: java/org/apache/catalina/core/StandardWrapper.java java/org/apache/catalina/valves/ErrorReportValve.java webapps/docs/changelog.xml

2007-01-28 Thread markt
Author: markt
Date: Sun Jan 28 17:45:06 2007
New Revision: 500918

URL: http://svn.apache.org/viewvc?view=revrev=500918
Log:
Revert port of 39088 as per discussion on dev list.

Modified:
tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardWrapper.java
tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/ErrorReportValve.java
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardWrapper.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardWrapper.java?view=diffrev=500918r1=500917r2=500918
==
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardWrapper.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardWrapper.java Sun 
Jan 28 17:45:06 2007
@@ -31,8 +31,6 @@
 import java.security.AccessController;
 import java.security.PrivilegedActionException;
 import java.security.PrivilegedExceptionAction;
-import java.sql.SQLException;
-
 import javax.servlet.Servlet;
 import javax.servlet.ServletConfig;
 import javax.servlet.ServletContext;
@@ -293,7 +291,7 @@
  */
 protected static Properties restrictedServlets = null;
 
-
+
 // - Properties
 
 
@@ -677,35 +675,18 @@
  * @param e The servlet exception
  */
 public static Throwable getRootCause(ServletException e) {
-Throwable rootCause = e.getRootCause();
-return findRootCause(e, rootCause);
+Throwable rootCause = e;
+Throwable rootCauseCheck = null;
+// Extra aggressive rootCause finding
+int loops = 0;
+do {
+loops++;
+rootCauseCheck = rootCause.getCause();
+if (rootCauseCheck != null)
+rootCause = rootCauseCheck;
+} while (rootCauseCheck != null  (loops  20));
+return rootCause;
 }
-
-
-/*
- * Work through the root causes using specific methods for well known types
- * and getCause() for the rest. Stop when the next rootCause is null or
- * an exception is found that has itself as its own rootCause. 
- */
-private static final Throwable findRootCause(Throwable theException,
-Throwable theRootCause) {
-
-Throwable deeperRootCause = null;
-
-if (theRootCause == null || theRootCause == theException) {
-return theException;
-}
-
-if (theRootCause instanceof SQLException) {
-deeperRootCause = ((SQLException) theRootCause).getNextException();
-}
-if (deeperRootCause == null) {
-deeperRootCause = theRootCause.getCause();
-}
-
-return findRootCause(theRootCause, deeperRootCause);
-}
-
 
 
 /**

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/ErrorReportValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/ErrorReportValve.java?view=diffrev=500918r1=500917r2=500918
==
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/ErrorReportValve.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/ErrorReportValve.java 
Sun Jan 28 17:45:06 2007
@@ -21,7 +21,6 @@
 
 import java.io.IOException;
 import java.io.Writer;
-import java.sql.SQLException;
 
 import javax.servlet.ServletException;
 import javax.servlet.ServletRequest;
@@ -217,9 +216,9 @@
 sb.append(RequestUtil.filter(stackTrace));
 sb.append(/pre/p);
 
+int loops = 0;
 Throwable rootCause = throwable.getCause();
-Throwable nestedRootCause = null;
-while (rootCause != null) {
+while (rootCause != null  (loops  10)) {
 stackTrace = getPartialServletStackTrace(rootCause);
 sb.append(pb);
 sb.append(sm.getString(errorReportValve.rootCause));
@@ -227,25 +226,10 @@
 sb.append(RequestUtil.filter(stackTrace));
 sb.append(/pre/p);
 // In case root cause is somehow heavily nested
-try {
-if (rootCause instanceof SQLException) {
-nestedRootCause = ((SQLException) rootCause).
-getNextException();
-}
-if (nestedRootCause == null) {
-nestedRootCause = rootCause.getCause();
-}
-
-if (rootCause == nestedRootCause)
-rootCause = null;
-else {
-rootCause = nestedRootCause;
-nestedRootCause = null;
-}
-} catch (ClassCastException e) {
-rootCause = 

DO NOT REPLY [Bug 39468] - ConcurrentModificationException during webapp reload

2007-01-28 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=39468.
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=39468





--- Additional Comments From [EMAIL PROTECTED]  2007-01-28 22:06 ---
(In reply to comment #0)
 I occasionally receive this exception while using the reload function in
 Tomcat's manager interface to reload my webapp. It is reproducible on 
multiple
 machines, all running Tomcat 5.0.27 on Sun J2SE 1.4.2.10. After receiving the
 exception I must restart Tomcat for the webapp to be usable again.

Is there a workaround or solution to the ConcurrentModificationException 
issue. Please provide the details or impact of using a higher version of 
jmx.jar if this is the workaround

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



Bug report for Tomcat 3 [2007/01/28]

2007-01-28 Thread bugzilla
+---+
| Bugzilla Bug ID   |
| +-+
| | Status: UNC=Unconfirmed NEW=New ASS=Assigned|
| | OPN=ReopenedVER=Verified(Skipped Closed/Resolved)   |
| |   +-+
| |   | Severity: BLK=Blocker CRI=CriticalMAJ=Major |
| |   |   MIN=Minor   NOR=Normal  ENH=Enhancement   |
| |   |   +-+
| |   |   | Date Posted |
| |   |   |  +--+
| |   |   |  | Description  |
| |   |   |  |  |
| 2350|Ver|Nor|2001-06-27|ServletConfig.getInitParameter() requires url-patt|
| 5331|Ass|Nor|2001-12-09|getPathInfo vs URL normalization  |
| 6027|Inf|Maj|2002-01-25|Tomcat  Automatically shuts down as service   |
| 6488|Ver|Maj|2002-02-15|Error: 304. Apparent bug in default ErrorHandler c|
| 7785|Inf|Blk|2002-04-06|tomcat bug in context reloading   |
| 7863|Inf|Maj|2002-04-09|I have a problem when running Tomcat with IIS |
| 8187|Inf|Cri|2002-04-17|Errors when Tomcat used with MS Access database   |
| 9737|Ver|Nor|2002-06-10|ArrayIndexOutOfBoundsException when sending just p|
|10047|Ass|Cri|2002-06-20|IllegalStateException |
|10406|Ass|Cri|2002-07-02|IllegalStateException |
|11087|Inf|Blk|2002-07-23|IllegalStateException |
|12156|Inf|Cri|2002-08-29|Apache and Tomcat 3.3.1 Interworking problem  |
|16363|Ass|Cri|2003-01-23|Stack Overflow accessing compiled JSP - Tomcat 3.2|
|39250|Inf|Cri|2006-04-07|Tomcat 3.2.1 + JDK 1.4|
+-+---+---+--+--+
| Total   14 bugs   |
+---+

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



Bug report for Tomcat 4 [2007/01/28]

2007-01-28 Thread bugzilla
+---+
| Bugzilla Bug ID   |
| +-+
| | Status: UNC=Unconfirmed NEW=New ASS=Assigned|
| | OPN=ReopenedVER=Verified(Skipped Closed/Resolved)   |
| |   +-+
| |   | Severity: BLK=Blocker CRI=CriticalMAJ=Major |
| |   |   MIN=Minor   NOR=Normal  ENH=Enhancement   |
| |   |   +-+
| |   |   | Date Posted |
| |   |   |  +--+
| |   |   |  | Description  |
| |   |   |  |  |
| 3839|Opn|Enh|2001-09-26|Problem bookmarking login page|
| 4227|Opn|Enh|2001-10-17|Invalid CGI path  |
| 5329|New|Enh|2001-12-08|NT Service exits startup before Tomcat is finished|
| 5795|New|Enh|2002-01-10|Catalina Shutdown relies on localhost causing prob|
| 5829|New|Enh|2002-01-13|StandardManager needs to cope with sessions throwi|
| 5985|New|Enh|2002-01-23|Tomcat should perform a more restrictive validatio|
| 6600|Opn|Enh|2002-02-20|enodeURL adds 'jsession' when 'isRequestedSessionI|
| 6614|New|Enh|2002-02-21|Have Bootstrap and StandardClassLoader use the sam|
| 6671|New|Enh|2002-02-25|Simple custom tag example uses old declaration sty|
| 7043|New|Enh|2002-03-12|database user and password for JDBC Based Store   |
| 7374|New|Enh|2002-03-22|Apache Tomcat/4.0.1 message on standard output|
| 7676|New|Enh|2002-04-02|Allow name property to use match experssions in h|
| 7723|New|Enh|2002-04-03|[patch] additional factory for org.apache.naming.f|
| 8026|New|Enh|2002-04-12|Exceptions in StandardHostDeployer.addChild are lo|
| 8323|New|Enh|2002-04-20|No support for running the 64 bit JVM |
| 8343|New|Enh|2002-04-21|adding a absorber logger class to org.apache.ca|
| 8441|New|Enh|2002-04-23|Command line files for NetWare|
| 8705|New|Enh|2002-05-01|SessionListener should extend EventListener   |
| 8744|New|Enh|2002-05-02|No way to configure/extend runtime classloaders.  |
| 8776|New|Enh|2002-05-03|The session url encoding under somce circumstances|
| 9227|New|Enh|2002-05-19|Allow an empty value of a pathname in the Standard|
| 9456|New|Enh|2002-05-28|Problem saving server.xml file: invalid XML markup|
| 9511|New|Enh|2002-05-30|Object instantiation optimization in StandardSessi|
| 9629|New|Enh|2002-06-05|Fix ServletContext.getResourcePaths to match spec |
| 9745|New|Enh|2002-06-10|extern cache mgt bug for conditionally dynamic pag|
| 9852|New|Enh|2002-06-13|Odd Digest and Realm Behaviour|
|10021|New|Enh|2002-06-19|Include upgrade option in installer   |
|10060|New|Enh|2002-06-20|Make the common and shared class loaders look in c|
|10120|New|Enh|2002-06-21|Custom realm and shared instalation.  |
|10225|New|Enh|2002-06-25|ANT Tasks Error Situation |
|10335|New|Enh|2002-06-28|[RFE,patch] Make JAASRealm more flexible  |
|10457|New|Enh|2002-07-03|Patch submission for DefaultServlet/WebdavServlet |
|10526|New|Enh|2002-07-06|Authenticators do not always cache the Principal  |
|10565|Opn|Enh|2002-07-08|shutdown hook problem:  java.lang.NoClassDefFoundE|
|10691|Ass|Enh|2002-07-11|staring tomcat gives indication that tomcat is sta|
|10699|New|Enh|2002-07-11|Apache SOAP 2.3 will not operate properly |
|10972|New|Enh|2002-07-19|Realm without className in server.xml produces N|
|11069|Opn|Enh|2002-07-23|Tomcat not flag error if tld is outside of /WEB-IN|
|11129|New|Enh|2002-07-24|New valve for putting the sessionIDs in the reques|
|11248|New|Enh|2002-07-29|DefaultServlet doesn't send expires header|
|11754|Opn|Enh|2002-08-15|Synchronous shutdown script - shutdown.sh should w|
|12069|New|Enh|2002-08-27|Creation of more HttpSession objects for one previ|
|12658|New|Enh|2002-09-15|a proxy host and port at the Host element level |
|12766|New|Enh|2002-09-18|Tomcat should use tld files in /WEB-INF/ over vers|
|13309|Opn|Enh|2002-10-04|Catalina calls System.exit()  |
|13634|New|Enh|2002-10-15|Allowing system properties to be substituted in co|
|13689|Opn|Enh|2002-10-16|Classloader paths for 'Common' classes and librari|
|13731|New|Enh|2002-10-17|Final request, response, session and other variabl|
|13941|New|Enh|2002-10-24|reload is VERY slow   |
|13965|New|Enh|2002-10-25|Catalina.sh correction request for Tru64 Unix |
|14097|New|Enh|2002-10-30|hardcoded registry value for vm lets tomcat servic|

Bug report for Watchdog [2007/01/28]

2007-01-28 Thread bugzilla
+---+
| Bugzilla Bug ID   |
| +-+
| | Status: UNC=Unconfirmed NEW=New ASS=Assigned|
| | OPN=ReopenedVER=Verified(Skipped Closed/Resolved)   |
| |   +-+
| |   | Severity: BLK=Blocker CRI=CriticalMAJ=Major |
| |   |   MIN=Minor   NOR=Normal  ENH=Enhancement   |
| |   |   +-+
| |   |   | Date Posted |
| |   |   |  +--+
| |   |   |  | Description  |
| |   |   |  |  |
|  278|Unc|Nor|2000-12-04|Bug in GetParameterValuesTestServlet.java file Bug|
|  279|Unc|Nor|2000-12-04|Logical Error in GetParameterValuesTestServlet Bug|
|  469|Unc|Nor|2001-01-17|in example-taglib.tld urn should be uri BugRat|
|  470|Unc|Nor|2001-01-17|FAIL positiveForward.jsp and positiveInclude.jsp B|
| 9634|New|Enh|2002-06-05|No tests exist for ServletContext.getResourcePaths|
|10703|New|Enh|2002-07-11|Need to test getRequestURI after RequestDispatcher|
|11336|New|Enh|2002-07-31|Test wrapped path methods with RD.foward()|
|11663|New|Maj|2002-08-13|JSP precompile tests rely on Jasper specific behav|
|11664|New|Maj|2002-08-13|A sweep is needed of all Watchdog 4.0 tag librarie|
|11665|New|Maj|2002-08-13|ServletToJSPErrorPageTest and ServletToServletErro|
|11666|New|Maj|2002-08-13|SetBufferSize_1TestServlet is invalid.|
|14004|New|Maj|2002-10-28|Incorrent behaviour of all attribute-related lifec|
|15504|New|Nor|2002-12-18|JSP positiveGetValues test relies on order preserv|
|24649|New|Nor|2003-11-12|getRemoteHost fails when agent has uppercase chara|
|29398|New|Nor|2004-06-04|Update site and note current status   |
+-+---+---+--+--+
| Total   15 bugs   |
+---+

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



Bug report for Tomcat 5 [2007/01/28]

2007-01-28 Thread bugzilla
+---+
| Bugzilla Bug ID   |
| +-+
| | Status: UNC=Unconfirmed NEW=New ASS=Assigned|
| | OPN=ReopenedVER=Verified(Skipped Closed/Resolved)   |
| |   +-+
| |   | Severity: BLK=Blocker CRI=CriticalMAJ=Major |
| |   |   MIN=Minor   NOR=Normal  ENH=Enhancement   |
| |   |   +-+
| |   |   | Date Posted |
| |   |   |  +--+
| |   |   |  | Description  |
| |   |   |  |  |
|22679|Ver|Enh|2003-08-24|how to access ssl session ID out of tomcat to prev|
|28039|New|Enh|2004-03-30|Cluster Support for SingleSignOn  |
|28634|Ass|Enh|2004-04-27|Extend StandardManager/StandardSession for DeltaMa|
|29160|Ver|Enh|2004-05-23|precompile problem: _jspx_meth_* (javax.servlet.js|
|29494|Inf|Enh|2004-06-10|No way to set PATH when running as a service on Wi|
|30241|Ver|Enh|2004-07-21|Enhance build script to use branch argument when c|
|33262|Inf|Enh|2005-01-27|Service Manager autostart should check for adminis|
|33453|Opn|Enh|2005-02-08|Jasper should recompile JSP files whose datestamps|
|33650|Inf|Enh|2005-02-19|Jasper performance for multiple files processing  |
|33671|Opn|Enh|2005-02-21|Manual Windows service installation with custom na|
|34801|New|Enh|2005-05-08|PATCH: CGIServlet does not terminate child after a|
|34805|Ass|Enh|2005-05-08|warn about invalid security constraint url pattern|
|34868|Ass|Enh|2005-05-11|allow to register a trust store for a session that|
|35054|Inf|Enh|2005-05-25|warn if appBase is not existing as a File or direc|
|35079|Inf|Enh|2005-05-26|Should be able to specify DNS lookup timeout  |
|35229|Opn|Enh|2005-06-05|alert user about expired certificates in client ce|
|35552|Inf|Enh|2005-06-29|JMS destination under Context   |
|35746|Inf|Enh|2005-07-14|session manager should be immune to system clock t|
|35765|New|Enh|2005-07-16|make the SSL cipher config in server.xml fail safe|
|35869|Inf|Enh|2005-07-26|Can't run as a service on Windows Server 2003 64-B|
|36133|Inf|Enh|2005-08-10|Support JSS SSL implementation|
|36169|New|Enh|2005-08-12|[PATCH] Enable chunked encoding for IIS JK connect|
|36362|New|Enh|2005-08-25|missing check for Java reserved keywords in tag fi|
|36365|Opn|Nor|2005-08-26|IIS5.1-isapi_redirector.dll (1.2.14) plugin issue |
|36540|Inf|Enh|2005-09-07|pooled cluster replication does not seem ensure sy|
|36569|Inf|Enh|2005-09-09|Redirects produce illegal URL's   |
|36630|Opn|Maj|2005-09-13|Error instantiating servlet class |
|36837|Inf|Enh|2005-09-28|Looking for ProxyHandler implementation of Http re|
|36922|Inf|Enh|2005-10-04|setup.sh file mis-advertised and missing  |
|36923|New|Nor|2005-10-05|Deactivated EL expressions are not parsed for jsp |
|37018|Ass|Enh|2005-10-11|Document how to use tomcat-SSL with a pkcs11 token|
|37072|New|Nor|2005-10-13|Encoding mismatch in error condition  |
|37084|Opn|   |2005-10-14|JspC from ant fails on JSPs that use custom taglib|
|37138|New|Enh|2005-10-18|Allow to specify a security provider (priority lis|
|37326|Ass|Nor|2005-11-01|No error reported when jsp:include has non-exist|
|37334|Inf|Enh|2005-11-02|Realm digest property not aligned with the adminis|
|37449|Opn|Enh|2005-11-10|Two UserDatabaseRealm break manager user  |
|37485|Inf|Enh|2005-11-14|I'd like to run init SQL after JDBC Connection cre|
|37498|Inf|Nor|2005-11-14|[PATCH] NPE in org.apache.catalina.core.ContainerB|
|37515|Inf|Nor|2005-11-15|smap not generated by JspC when used from Ant for |
|37627|Opn|Nor|2005-11-24|Slow and incomplete dynamic content generation aft|
|37674|New|Nor|2005-11-29|Windows EXE fails to pass spaces in JVMTI -javaage|
|37785|Inf|Nor|2005-12-05|Changing startup type via Tomcat Monitor does not |
|37794|Opn|Nor|2005-12-05|getParameter() fails on POST with transfer-encodin|
|37797|Inf|Maj|2005-12-05|Configure Tomcat utility truncates classpath to 96|
|37822|Opn|Nor|2005-12-07|WebappClassLoader interfering with Catalina core c|
|37834|Ass|Nor|2005-12-08|compressableMimeTypes not working properly|
|37847|Ass|Enh|2005-12-09|Allow User To Optionally Specify Catalina Output F|
|37869|Opn|Nor|2005-12-12|Cannot obtain client certificate with SSL / client|
|37918|Ass|Nor|2005-12-15|EL cannot find valid getter from object when using|
|37956|Opn|Enh|2005-12-18|Make 'set static fields to null' ClassLoader leak |