svn commit: r536218 - /tomcat/connectors/trunk/jk3/ROADMAP

2007-05-08 Thread rjung
Author: rjung
Date: Tue May  8 08:17:01 2007
New Revision: 536218

URL: http://svn.apache.org/viewvc?view=rev&rev=536218
Log:
Adding more dreams and some svn properties to the roadmap :)

Modified:
tomcat/connectors/trunk/jk3/ROADMAP   (contents, props changed)

Modified: tomcat/connectors/trunk/jk3/ROADMAP
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk3/ROADMAP?view=diff&rev=536218&r1=536217&r2=536218
==
--- tomcat/connectors/trunk/jk3/ROADMAP (original)
+++ tomcat/connectors/trunk/jk3/ROADMAP Tue May  8 08:17:01 2007
@@ -1,43 +1,52 @@
-APACHE TOMCAT JK3 CONNECTOR ROADMAP   
-*-text-*-
-
-ApacheCon EU 2007 DISCUSSION POINTS:
-
-* Lets make next generation connector and software load balancer
-  for application servers.
-* Lets put JK 1.2 in maintenance mode
-  - Stop adding things to the JK 1.2 and only fix bugs
-  - We'll still need to vote how to maintain this
-* It should be APR based and supported platforms should be
-  - Apache Httpd 2+
-  - Microsoft IIS 5+ (Windows 2000 and up)
-  - Generic API for standalone based programs
-* Java code will be Java5 based
-  - Java5 is mandatory
-  - Both server and client reference implementation
-will be developed
-* Scripting support for the Load Balancer
-  - Load balancer will have some sort of scripting
-to be able to make rule based load balancers
-  - We still have to decide if we need a full-blown
-scripting support, or a simple rule engine will do
-* Extended AJP 1.3 protocol
-  - Keep AJP 1.3 backward compatible
-  - CPING/CPONG will be mandatory when establishing
-new connections.
-  - Add connection close notification.
-Done by extending CPING/CPONG
-  - See how we can have 64K+ headers
-Idea is to treat them as POST data if the
-header doesn't fit inside header AJP packet
-* Make JK3 protocol independent
-  - Although developed with protocol independence in mind
-JK 1.2 is practically unusable for non AJP 1.3 protocols.
-JK3 should allow custom protocols like http or fastcgi
-* Add persistence to the dynamic configuration
-  - Have a way to merge the static configuration with
-modified dynamic configuration via jkstatus
-* Add management thread for each child
-  - APR_HAS_THREADS presence will be mandatory
-  - For each child process in web server a management thread
-will be created that will monitor state and dynamic
-configuration.
+APACHE TOMCAT JK3 CONNECTOR ROADMAP   
-*-text-*-
+
+ApacheCon EU 2007 DISCUSSION POINTS:
+
+* Lets make next generation connector and software load balancer
+  for application servers.
+* Lets put JK 1.2 in maintenance mode
+  - Stop adding things to the JK 1.2 and only fix bugs
+  - We'll still need to vote how to maintain this
+* It should be APR based and supported platforms should be
+  - Apache Httpd 2+
+  - Microsoft IIS 5+ (Windows 2000 and up)
+  - Generic API for standalone based programs
+* Java code will be Java5 based
+  - Java5 is mandatory
+  - Both server and client reference implementation
+will be developed
+* Scripting support for the Load Balancer
+  - Load balancer will have some sort of scripting
+to be able to make rule based load balancers
+  - We still have to decide if we need a full-blown
+scripting support, or a simple rule engine will do
+* Extended AJP 1.3 protocol
+  - Keep AJP 1.3 backward compatible
+  - CPING/CPONG will be mandatory when establishing
+new connections.
+  - Add connection close notification.
+Done by extending CPING/CPONG
+  - See how we can have 64K+ headers
+Idea is to treat them as POST data if the
+header doesn't fit inside header AJP packet
+* Make JK3 protocol independent
+  - Although developed with protocol independence in mind
+JK 1.2 is practically unusable for non AJP 1.3 protocols.
+JK3 should allow custom protocols like http or fastcgi
+* Add persistence to the dynamic configuration
+  - Have a way to merge the static configuration with
+modified dynamic configuration via jkstatus
+* More powerful log framework
+  - Using hierarchical logger names with corresponding
+log levels to be able to debug or trace only
+appropriate parts of the code
+* Add management thread for each child
+  - APR_HAS_THREADS presence will be mandatory
+  - For each child process in web server a management thread
+will be created that will monitor state and dynamic
+configuration.
+* COMET support
+  - Finding our ways how to drop idle connections bet

svn commit: r537640 - /tomcat/connectors/trunk/jk/native/configure.in

2007-05-13 Thread rjung
Author: rjung
Date: Sun May 13 12:02:36 2007
New Revision: 537640

URL: http://svn.apache.org/viewvc?view=rev&rev=537640
Log:
Rearrange configure.in, such that in case we
got with-apxs we detect CC from apxs and warn,
if the CC environment variable differs.
Also we output, which libtool we use.
Finally a small typo fix in an output string.

Modified:
tomcat/connectors/trunk/jk/native/configure.in

Modified: tomcat/connectors/trunk/jk/native/configure.in
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/configure.in?view=diff&rev=537640&r1=537639&r2=537640
==
--- tomcat/connectors/trunk/jk/native/configure.in (original)
+++ tomcat/connectors/trunk/jk/native/configure.in Sun May 13 12:02:36 2007
@@ -15,17 +15,6 @@
 
 AM_INIT_AUTOMAKE(${PACKAGE}, ${VERSION})
 
-AC_PROG_CC
-AC_PROG_LD
-
-dnl Not sure what it does, but the libtool manual seems to require this
-dnl It should use the native platform dlopen ( if available )
-AC_LIBTOOL_DLOPEN
-
-dnl AM_PROG_LIBTOOL often causes problems.
-dnl I have solved them once using aclocal --acdir=/usr/local/share/aclocal/
-AM_PROG_LIBTOOL
-
 AC_PATH_PROG(TEST,test,$PATH)dnl
 AC_SUBST(TEST)
 
@@ -47,7 +36,107 @@
 AC_PATH_PROG(MKDIR,mkdir,$PATH)dnl
 AC_SUBST(MKDIR)
 
-dnl AC_PATH_PROG(LIBTOOL,libtool,$PATH)dnl
+APACHE_CONFIG_VARS=`pwd`/scripts/build/config_vars.mk
+WEBSERVER=""
+apache_dir=""
+apache_include=""
+APXS="apxs"
+AC_ARG_WITH(apxs,
+[  --with-apxs[=FILE]  Build shared Apache module. FILE is the optional
+pathname to the apxs tool; defaults to finding
+   apxs in your PATH.],
+[
+case "${withval}" in
+y | yes | true) find_apxs=true ;;
+n | no | false) find_apxs=false ;;
+*) find_apxs=false ;;
+esac
+
+if ${TEST} ${find_apxs} ; then
+AC_MSG_RESULT([need to check for Perl first, apxs depends on it...])
+AC_PATH_PROG(PERL,perl,$PATH)dnl
+
+if ${TEST} ${find_apxs} ; then
+APXS=${withval}
+else
+AC_PATH_PROG(APXS,apxs,$PATH)dnl
+fi
+
+if ${TEST} -n "${APXS}" ; then
+dnl Seems that we have it, but have to check if it is OK first
+if ${TEST} ! -x "${APXS}" ; then
+AC_MSG_ERROR(Invalid location for apxs: '${APXS}')
+fi
+
+${APXS} -q PREFIX >/dev/null 2>/dev/null || apxs_support=false
+
+if ${TEST} "${apxs_support}" = "false" ; then
+AC_MSG_RESULT(could not find ${APXS})
+AC_MSG_ERROR(You must specify a valid --with-apxs path)
+fi
+
+dnl apache_dir and apache_include are also needed.
+apache_dir=`$APXS -q PREFIX`
+apache_include="-I`$APXS -q INCLUDEDIR`"
+
+dnl test apache version
+APA=`${GREP} STANDARD20 ${APXS}`
+if ${TEST} -z "$APA" ; then
+WEBSERVER="apache-1.3"
+   APXSCC="`$APXS -q CC`"
+   APXSCFLAGS="`$APXS -q CFLAGS` -DJK_PREFORK"
+   APXS_CPPFLAGS=""
+else
+WEBSERVER="apache-2.0"
+   APRINCLUDEDIR=""
+   INCTEMP="`$APXS -q APR_INCLUDEDIR` `$APXS -q APU_INCLUDEDIR`"
+   for INC in ${INCTEMP}; do
+   APRINCLUDEDIR="${APRINCLUDEDIR} -I${INC}"
+   done
+AC_MSG_RESULT([APRINCLUDEDIR is $APRINCLUDEDIR])
+   APXSCC="`$APXS -q CC`"
+   APXSCFLAGS="`${APXS} -q CFLAGS` `${APXS} -q EXTRA_CFLAGS` 
-DHAVE_APR ${APRINCLUDEDIR}"
+   APXSCPPFLAGS="`${APXS} -q EXTRA_CPPFLAGS`"
+APACHE_CONFIG_VARS="`${APXS} -q 
exp_installbuilddir`/config_vars.mk"
+LIBTOOL=`$APXS -q LIBTOOL`
+fi
+AC_MSG_RESULT([building connector for \"$WEBSERVER\"])
+if ${TEST} -z "${CC}" ; then
+CC="${APXSCC}"
+else
+if ${TEST} "${CC}" != "$APXSCC" ; then
+WARN_CC=1
+fi
+fi
+
+AC_SUBST(APXS)
+fi
+fi
+],
+[
+   AC_MSG_RESULT(no apxs given)
+])
+
+AC_SUBST(APACHE_CONFIG_VARS)
+
+AC_PROG_CC
+AC_PROG_LD
+
+SAVE_LIBTOOL="$LIBTOOL"
+
+dnl Not sure what it does, but the libtool manual seems to require this
+dnl It should use the native platform dlopen ( if available )
+AC_LIBTOOL_DLOPEN
+
+dnl AM_PROG_LIBTOOL often causes problems.
+dnl I have solved them once using aclocal --acdir=/usr/local/share/aclocal/
+AM_PROG_LIBTOOL
+
+if ${TEST} -n "${SAVE_LIBTOOL}" ; t

svn commit: r538838 - /tomcat/connectors/branches/other/JK_1_2_23/

2007-05-17 Thread rjung
Author: rjung
Date: Thu May 17 01:47:50 2007
New Revision: 538838

URL: http://svn.apache.org/viewvc?view=rev&rev=538838
Log:
Create a branch to prepare 1.2.23 based on 1.2.22 plus small fix
instead of trunk.

Added:
tomcat/connectors/branches/other/JK_1_2_23/
  - copied from r538836, tomcat/connectors/tags/jk1.2.x/JK_1_2_22/


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



svn commit: r538842 - /tomcat/connectors/trunk/jk/xdocs/index.xml

2007-05-17 Thread rjung
Author: rjung
Date: Thu May 17 01:58:28 2007
New Revision: 538842

URL: http://svn.apache.org/viewvc?view=rev&rev=538842
Log:
Fix release date for 1.2.22 in docs welcome page (wrong month).

Modified:
tomcat/connectors/trunk/jk/xdocs/index.xml

Modified: tomcat/connectors/trunk/jk/xdocs/index.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/index.xml?view=diff&rev=538842&r1=538841&r2=538842
==
--- tomcat/connectors/trunk/jk/xdocs/index.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/index.xml Thu May 17 01:58:28 2007
@@ -29,7 +29,7 @@
 
 
 
-17 March 2007 - JK-1.2.22 
released
+17 April 2007 - JK-1.2.22 
released
 The Apache Tomcat team is proud to announce the immediate availability
 of Tomcat Connectors 1.2.22 Stable.
 



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



svn commit: r538845 - in /tomcat/connectors/branches/other/JK_1_2_23/jk: native/STATUS.txt native/common/jk_version.h native/iis/installer/isapi-redirector-win32-msi.ism native/iis/isapi_redirect.rc x

2007-05-17 Thread rjung
Author: rjung
Date: Thu May 17 02:12:40 2007
New Revision: 538845

URL: http://svn.apache.org/viewvc?view=rev&rev=538845
Log:
Port post 1.2.22 changes to 1.2.23 branch:
- version bump
- docs changes about 1.2.22 release
(revs 529275, 530028, 530038, 538842)

Modified:
tomcat/connectors/branches/other/JK_1_2_23/jk/native/STATUS.txt
tomcat/connectors/branches/other/JK_1_2_23/jk/native/common/jk_version.h

tomcat/connectors/branches/other/JK_1_2_23/jk/native/iis/installer/isapi-redirector-win32-msi.ism
tomcat/connectors/branches/other/JK_1_2_23/jk/native/iis/isapi_redirect.rc
tomcat/connectors/branches/other/JK_1_2_23/jk/xdocs/index.xml
tomcat/connectors/branches/other/JK_1_2_23/jk/xdocs/news/20070301.xml

Modified: tomcat/connectors/branches/other/JK_1_2_23/jk/native/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/branches/other/JK_1_2_23/jk/native/STATUS.txt?view=diff&rev=538845&r1=538844&r2=538845
==
--- tomcat/connectors/branches/other/JK_1_2_23/jk/native/STATUS.txt (original)
+++ tomcat/connectors/branches/other/JK_1_2_23/jk/native/STATUS.txt Thu May 17 
02:12:40 2007
@@ -3,7 +3,8 @@
 
 Release:
 
-1.2.22  : in development
+1.2.23  : in development
+1.2.22  : released April 17, 2007
 1.2.21  : released March 1, 2007
 1.2.20  : released December 10, 2006
 1.2.19  : released September 17, 2006

Modified: 
tomcat/connectors/branches/other/JK_1_2_23/jk/native/common/jk_version.h
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/branches/other/JK_1_2_23/jk/native/common/jk_version.h?view=diff&rev=538845&r1=538844&r2=538845
==
--- tomcat/connectors/branches/other/JK_1_2_23/jk/native/common/jk_version.h 
(original)
+++ tomcat/connectors/branches/other/JK_1_2_23/jk/native/common/jk_version.h 
Thu May 17 02:12:40 2007
@@ -26,14 +26,14 @@
 /** START OF AREA TO MODIFY BEFORE RELEASING */
 #define JK_VERMAJOR 1
 #define JK_VERMINOR 2
-#define JK_VERFIX   22
-#define JK_VERSTRING"1.2.22"
+#define JK_VERFIX   23
+#define JK_VERSTRING"1.2.23"
 
 /* Beta number */
 #define JK_VERBETA  0
 #define JK_BETASTRING   "0"
 /* set JK_VERISRELEASE to 1 when release (do not forget to commit!) */
-#define JK_VERISRELEASE 1
+#define JK_VERISRELEASE 0
 #define JK_VERRC0
 #define JK_RCSTRING "0"
 

Modified: 
tomcat/connectors/branches/other/JK_1_2_23/jk/native/iis/installer/isapi-redirector-win32-msi.ism
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/branches/other/JK_1_2_23/jk/native/iis/installer/isapi-redirector-win32-msi.ism?view=diff&rev=538845&r1=538844&r2=538845
==
--- 
tomcat/connectors/branches/other/JK_1_2_23/jk/native/iis/installer/isapi-redirector-win32-msi.ism
 (original)
+++ 
tomcat/connectors/branches/other/JK_1_2_23/jk/native/iis/installer/isapi-redirector-win32-msi.ism
 Thu May 17 02:12:40 2007
@@ -3409,7 +3409,7 @@
ProductIDnone
ProductLanguage1033
ProductNameTomcat Isapi 
Redirector
-   ProductVersion1.2.22
+   ProductVersion1.2.23
ProgressType0install
ProgressType1Installing
ProgressType2installed

Modified: 
tomcat/connectors/branches/other/JK_1_2_23/jk/native/iis/isapi_redirect.rc
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/branches/other/JK_1_2_23/jk/native/iis/isapi_redirect.rc?view=diff&rev=538845&r1=538844&r2=538845
==
--- tomcat/connectors/branches/other/JK_1_2_23/jk/native/iis/isapi_redirect.rc 
(original)
+++ tomcat/connectors/branches/other/JK_1_2_23/jk/native/iis/isapi_redirect.rc 
Thu May 17 02:12:40 2007
@@ -14,13 +14,13 @@
 "specific language governing permissions and " \
 "limitations under the License."
 
-#define JK_VERSION_STR  "1.2.22"
+#define JK_VERSION_STR  "1.2.23"
 #define JK_DLL_BASENAME "isapi_redirect-" JK_VERSION_STR
 
 
 1 VERSIONINFO
- FILEVERSION 1,2,22,0
- PRODUCTVERSION 1,2,22,0
+ FILEVERSION 1,2,23,0
+ PRODUCTVERSION 1,2,23,0
  FILEFLAGSMASK 0x3fL
 #if defined(_DEBUG)
  FILEFLAGS 0x01L

Modified: tomcat/connectors/branches/other/JK_1_2_23/jk/xdocs/index.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/branches/other/JK_1_2_23/jk/xdocs/index.xml?view=diff&rev=538845&r1=538844&r2=538845
==
--- tomcat/connectors/branches/other/JK_1_2_23/jk/xdocs/index.xml (original)
+++ tomcat/connectors/branches/other/JK_1_2_23/jk/xdocs/index.xml Thu May 17 
02:1

svn commit: r538911 - in /tomcat/connectors/branches/other/JK_1_2_23/jk: native/common/jk_global.h xdocs/miscellaneous/changelog.xml xdocs/reference/apache.xml xdocs/webserver_howto/apache.xml

2007-05-17 Thread rjung
Author: rjung
Date: Thu May 17 06:26:19 2007
New Revision: 538911

URL: http://svn.apache.org/viewvc?view=rev&rev=538911
Log:
Change the default value of JkOptions to ForwardURICompatUnparsed
and enhance documentation concerning the three possible
forwarding options.

Modified:
tomcat/connectors/branches/other/JK_1_2_23/jk/native/common/jk_global.h

tomcat/connectors/branches/other/JK_1_2_23/jk/xdocs/miscellaneous/changelog.xml
tomcat/connectors/branches/other/JK_1_2_23/jk/xdocs/reference/apache.xml

tomcat/connectors/branches/other/JK_1_2_23/jk/xdocs/webserver_howto/apache.xml

Modified: 
tomcat/connectors/branches/other/JK_1_2_23/jk/native/common/jk_global.h
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/branches/other/JK_1_2_23/jk/native/common/jk_global.h?view=diff&rev=538911&r1=538910&r2=538911
==
--- tomcat/connectors/branches/other/JK_1_2_23/jk/native/common/jk_global.h 
(original)
+++ tomcat/connectors/branches/other/JK_1_2_23/jk/native/common/jk_global.h Thu 
May 17 06:26:19 2007
@@ -239,7 +239,7 @@
 #define JK_OPT_FWDURICOMPATUNPARSED 0x0002
 #define JK_OPT_FWDURIESCAPED0x0003
 
-#define JK_OPT_FWDURIDEFAULTJK_OPT_FWDURICOMPAT
+#define JK_OPT_FWDURIDEFAULTJK_OPT_FWDURICOMPATUNPARSED
 
 #define JK_OPT_FWDKEYSIZE   0x0004
 

Modified: 
tomcat/connectors/branches/other/JK_1_2_23/jk/xdocs/miscellaneous/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/branches/other/JK_1_2_23/jk/xdocs/miscellaneous/changelog.xml?view=diff&rev=538911&r1=538910&r2=538911
==
--- 
tomcat/connectors/branches/other/JK_1_2_23/jk/xdocs/miscellaneous/changelog.xml 
(original)
+++ 
tomcat/connectors/branches/other/JK_1_2_23/jk/xdocs/miscellaneous/changelog.xml 
Thu May 17 06:26:19 2007
@@ -22,6 +22,19 @@
   new documentation project for JK was started.
   
 
+
+  
+  
+
+  
+  Change the default value of JkOptions to ForwardURICompatUnparsed.
+  The old default value was ForwardURICompat.
+  This should make URL interpretation between Apache httpd and
+  Tomcat consistent (prevent double decoding problems). (rjung)
+  
+
+  
+
 
   
   

Modified: 
tomcat/connectors/branches/other/JK_1_2_23/jk/xdocs/reference/apache.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/branches/other/JK_1_2_23/jk/xdocs/reference/apache.xml?view=diff&rev=538911&r1=538910&r2=538911
==
--- tomcat/connectors/branches/other/JK_1_2_23/jk/xdocs/reference/apache.xml 
(original)
+++ tomcat/connectors/branches/other/JK_1_2_23/jk/xdocs/reference/apache.xml 
Thu May 17 06:26:19 2007
@@ -209,7 +209,8 @@
 
 This directive can be used multiple times per virtual server.
 
-The default value is "ForwardURICompat".
+The default value is "ForwardURICompatUnparsed" since version 1.2.23.
+Until version 1.2.22 the default value was "ForwardURICompat".
 
 
 Adds a name and an optional default value of environment variable
@@ -417,8 +418,9 @@
 
 The three following options +ForwardURIxxx are mutually exclusive.
 Exactly one of them is required, a negative sign prefix is not allowed with 
them.
-By default, the option ForwardURICompat is turned on.
-You can turn this off by switching on one of the other two.
+The default value is "ForwardURICompatUnparsed" since version 1.2.23.
+Until version 1.2.22 the default value was "ForwardURICompat".
+You can turn the default off by switching on one of the other two options.
 
 
 
@@ -435,12 +437,14 @@
 
 
 
-JkOptions ForwardURICompat, you ask mod_jk to send the URI to Tomcat 
normally, 
-which is less spec compliant but mod_rewrite compatible, 
-use it for compatibility with Tomcat 3.2.x engines (on by default).
+Using JkOptions ForwardURICompatUnparsed, the forwarded URI 
+will be unparsed. It's spec compliant and also the safest option.
+It will always forward the original request URI, so rewriting
+URIs with mod_rewrite and then forwarding the rewritten URI
+will not work.
 
   
-  JkOptions +ForwardURICompat
+  JkOptions +ForwardURICompatUnparsed
 
 
 
@@ -448,11 +452,15 @@
 
 
 
-JkOptions ForwardURICompatUnparsed, the forwarded URI 
-is unparsed, it's spec compliant but broke mod_rewrite.
+Using JkOptions ForwardURICompat, the forwarded URI will
+be decoded by Apache httpd. Encoded characters will be decoded and
+explicit path components like /.. will already be removed.
+This is less spec compliant and is not safe if you are using
+prefix JkMount. This option will allow to rewrite URIs with
+mod_rewrite before forwarding.
 
   
-  JkOptions +ForwardURICompatUnparsed
+  JkOptions +ForwardURICompat
 
 
 
@@ -460,8 +468,11 @@
 
 
 
-JkOptions ForwardURIEscaped, t

svn commit: r538964 - in /tomcat/connectors/branches/other/JK_1_2_23/jk/xdocs: reference/apache.xml webserver_howto/apache.xml

2007-05-17 Thread rjung
Author: rjung
Date: Thu May 17 08:21:27 2007
New Revision: 538964

URL: http://svn.apache.org/viewvc?view=rev&rev=538964
Log:
Small adjustments to the changed docs parts.

Modified:
tomcat/connectors/branches/other/JK_1_2_23/jk/xdocs/reference/apache.xml

tomcat/connectors/branches/other/JK_1_2_23/jk/xdocs/webserver_howto/apache.xml

Modified: 
tomcat/connectors/branches/other/JK_1_2_23/jk/xdocs/reference/apache.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/branches/other/JK_1_2_23/jk/xdocs/reference/apache.xml?view=diff&rev=538964&r1=538963&r2=538964
==
--- tomcat/connectors/branches/other/JK_1_2_23/jk/xdocs/reference/apache.xml 
(original)
+++ tomcat/connectors/branches/other/JK_1_2_23/jk/xdocs/reference/apache.xml 
Thu May 17 08:21:27 2007
@@ -437,13 +437,13 @@
 
 
 
-Using JkOptions ForwardURICompatUnparsed, the forwarded URI 
+Using JkOptions ForwardURICompatUnparsed, the forwarded URI
 will be unparsed. It's spec compliant and also the safest option.
 It will always forward the original request URI, so rewriting
 URIs with mod_rewrite and then forwarding the rewritten URI
 will not work.
 
-  
+
   JkOptions +ForwardURICompatUnparsed
 
 
@@ -454,12 +454,12 @@
 
 Using JkOptions ForwardURICompat, the forwarded URI will
 be decoded by Apache httpd. Encoded characters will be decoded and
-explicit path components like /.. will already be removed.
-This is less spec compliant and is not safe if you are using
+explicit path components like ".." will already be resolved.
+This is less spec compliant and is not safe if you are using
 prefix JkMount. This option will allow to rewrite URIs with
 mod_rewrite before forwarding.
 
-  
+
   JkOptions +ForwardURICompat
 
 
@@ -470,11 +470,11 @@
 
 Using JkOptions ForwardURIEscaped, the forwarded URI will
 be the encoded form of the URI used by ForwardURICompat.
-Explicit path components like /.. will already be removed.
+Explicit path components like ".." will already be resolved.
 This will not work in combination with URL encoded session IDs,
 but it will allow to rewrite URIs with mod_rewrite before forwarding.
 
-  
+
   JkOptions +ForwardURIEscaped
 
 
@@ -483,7 +483,7 @@
 
 
 
-JkOptions ForwardDirectories is used in conjunction with 
DirectoryIndex 
+JkOptions ForwardDirectories is used in conjunction with 
DirectoryIndex
 directive of Apache web server. As such mod_dir should be available to Apache,
 statically or dynamically (DSO)
 

Modified: 
tomcat/connectors/branches/other/JK_1_2_23/jk/xdocs/webserver_howto/apache.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/branches/other/JK_1_2_23/jk/xdocs/webserver_howto/apache.xml?view=diff&rev=538964&r1=538963&r2=538964
==
--- 
tomcat/connectors/branches/other/JK_1_2_23/jk/xdocs/webserver_howto/apache.xml 
(original)
+++ 
tomcat/connectors/branches/other/JK_1_2_23/jk/xdocs/webserver_howto/apache.xml 
Thu May 17 08:21:27 2007
@@ -492,8 +492,8 @@
 
 Using JkOptions ForwardURICompat, the forwarded URI will
 be decoded by Apache httpd. Encoded characters will be decoded and
-explicit path components like /.. will already be removed.
-This is less spec compliant and is not safe if you are using
+explicit path components like ".." will already be resolved.
+This is less spec compliant and is not safe if you are using
 prefix JkMount. This option will allow to rewrite URIs with
 mod_rewrite before forwarding.
 
@@ -508,7 +508,7 @@
 
 Using JkOptions ForwardURIEscaped, the forwarded URI will
 be the encoded form of the URI used by ForwardURICompat.
-Explicit path components like /.. will already be removed.
+Explicit path components like ".." will already be resolved.
 This will not work in combination with URL encoded session IDs,
 but it will allow to rewrite URIs with mod_rewrite before forwarding.
 



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



svn commit: r538965 - /tomcat/connectors/branches/other/JK_1_2_23/jk/tools/jkrelease.sh

2007-05-17 Thread rjung
Author: rjung
Date: Thu May 17 08:23:16 2007
New Revision: 538965

URL: http://svn.apache.org/viewvc?view=rev&rev=538965
Log:
Add flag to release from a branch to release script.

Modified:
tomcat/connectors/branches/other/JK_1_2_23/jk/tools/jkrelease.sh

Modified: tomcat/connectors/branches/other/JK_1_2_23/jk/tools/jkrelease.sh
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/branches/other/JK_1_2_23/jk/tools/jkrelease.sh?view=diff&rev=538965&r1=538964&r2=538965
==
--- tomcat/connectors/branches/other/JK_1_2_23/jk/tools/jkrelease.sh (original)
+++ tomcat/connectors/branches/other/JK_1_2_23/jk/tools/jkrelease.sh Thu May 17 
08:23:16 2007
@@ -11,15 +11,17 @@
 # And any one of: w3m, elinks, links
 
 usage() {
-echo "Usage:: $0 -t VERSION [-T]"
+echo "Usage:: $0 -t VERSION [-b BRANCH | -T]"
 echo "-t: version to package"
+echo "-b: package from branch BRANCH"
 echo "-T: package from trunk"
 }
 
-while getopts :t:T c
+while getopts :t:b:T c
 do
 case $c in
 t) tag=$OPTARG;;
+b) branch=$OPTARG;;
 T) trunk=trunk;;
 \:)usage
exit 2;;
@@ -42,16 +44,38 @@
 
  NO CHANGE BELOW THIS LINE ##
 
-if [ "X$tag" = "X" ]
+if [ -z "$tag" ]
 then
 usage
 exit 2
 fi
-if [ "X$trunk" = "Xtrunk" ]
+if [ -n "$trunk" -a -n "$branch" ]
+then
+usage
+echo "Only one of the options '-b' and '-T' allowed."
+exit 2
+fi
+if [ -n "$trunk" ]
 then
 JK_SVN_URL="${SVNROOT}/${SVNPROJ}/trunk"
 JK_REV=`svn info ${JK_SVN_URL} | awk '$1 == "Revision:" {print $2}'`
+if [ -z "$JK_REV" ]
+then
+   echo "No Revision found at '$JK_SVN_URL'"
+   exit 3
+fi
 JK_DIST=${JK_CVST}-${tag}-dev-${JK_REV}-src
+elif [ -n "$branch" ]
+then
+JK_BRANCH=`echo $branch | sed -e 's#/#__#g'`
+JK_SVN_URL="${SVNROOT}/${SVNPROJ}/branches/$branch"
+JK_REV=`svn info ${JK_SVN_URL} | awk '$1 == "Revision:" {print $2}'`
+if [ -z "$JK_REV" ]
+then
+   echo "No Revision found at '$JK_SVN_URL'"
+   exit 3
+fi
+JK_DIST=${JK_CVST}-${tag}-dev-${JK_BRANCH}-${JK_REV}-src
 else
 JK_VER=$tag
 JK_TAG=`echo $tag | sed -e 's#^#JK_#' -e 's#\.#_#g'`



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



svn commit: r538966 - /tomcat/connectors/trunk/jk/tools/jkrelease.sh

2007-05-17 Thread rjung
Author: rjung
Date: Thu May 17 08:28:07 2007
New Revision: 538966

URL: http://svn.apache.org/viewvc?view=rev&rev=538966
Log:
Port r538965 from 1.2.23 branch (enhanced jkrelease.sh script).

Modified:
tomcat/connectors/trunk/jk/tools/jkrelease.sh

Modified: tomcat/connectors/trunk/jk/tools/jkrelease.sh
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/tools/jkrelease.sh?view=diff&rev=538966&r1=538965&r2=538966
==
--- tomcat/connectors/trunk/jk/tools/jkrelease.sh (original)
+++ tomcat/connectors/trunk/jk/tools/jkrelease.sh Thu May 17 08:28:07 2007
@@ -11,15 +11,17 @@
 # And any one of: w3m, elinks, links
 
 usage() {
-echo "Usage:: $0 -t VERSION [-T]"
+echo "Usage:: $0 -t VERSION [-b BRANCH | -T]"
 echo "-t: version to package"
+echo "-b: package from branch BRANCH"
 echo "-T: package from trunk"
 }
 
-while getopts :t:T c
+while getopts :t:b:T c
 do
 case $c in
 t) tag=$OPTARG;;
+b) branch=$OPTARG;;
 T) trunk=trunk;;
 \:)usage
exit 2;;
@@ -42,16 +44,38 @@
 
  NO CHANGE BELOW THIS LINE ##
 
-if [ "X$tag" = "X" ]
+if [ -z "$tag" ]
 then
 usage
 exit 2
 fi
-if [ "X$trunk" = "Xtrunk" ]
+if [ -n "$trunk" -a -n "$branch" ]
+then
+usage
+echo "Only one of the options '-b' and '-T' allowed."
+exit 2
+fi
+if [ -n "$trunk" ]
 then
 JK_SVN_URL="${SVNROOT}/${SVNPROJ}/trunk"
 JK_REV=`svn info ${JK_SVN_URL} | awk '$1 == "Revision:" {print $2}'`
+if [ -z "$JK_REV" ]
+then
+   echo "No Revision found at '$JK_SVN_URL'"
+   exit 3
+fi
 JK_DIST=${JK_CVST}-${tag}-dev-${JK_REV}-src
+elif [ -n "$branch" ]
+then
+JK_BRANCH=`echo $branch | sed -e 's#/#__#g'`
+JK_SVN_URL="${SVNROOT}/${SVNPROJ}/branches/$branch"
+JK_REV=`svn info ${JK_SVN_URL} | awk '$1 == "Revision:" {print $2}'`
+if [ -z "$JK_REV" ]
+then
+   echo "No Revision found at '$JK_SVN_URL'"
+   exit 3
+fi
+JK_DIST=${JK_CVST}-${tag}-dev-${JK_BRANCH}-${JK_REV}-src
 else
 JK_VER=$tag
 JK_TAG=`echo $tag | sed -e 's#^#JK_#' -e 's#\.#_#g'`



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



svn commit: r538975 - in /tomcat/connectors/trunk/jk: native/common/jk_global.h xdocs/miscellaneous/changelog.xml xdocs/reference/apache.xml xdocs/webserver_howto/apache.xml xdocs/webserver_howto/nes.

2007-05-17 Thread rjung
Author: rjung
Date: Thu May 17 08:40:49 2007
New Revision: 538975

URL: http://svn.apache.org/viewvc?view=rev&rev=538975
Log:
Port 1.2.23 changes from 1.2.23 branch to trunk
(r538911, r538964)

Modified:
tomcat/connectors/trunk/jk/native/common/jk_global.h
tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
tomcat/connectors/trunk/jk/xdocs/reference/apache.xml
tomcat/connectors/trunk/jk/xdocs/webserver_howto/apache.xml
tomcat/connectors/trunk/jk/xdocs/webserver_howto/nes.xml

Modified: tomcat/connectors/trunk/jk/native/common/jk_global.h
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_global.h?view=diff&rev=538975&r1=538974&r2=538975
==
--- tomcat/connectors/trunk/jk/native/common/jk_global.h (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_global.h Thu May 17 08:40:49 
2007
@@ -234,7 +234,7 @@
 #define JK_OPT_FWDURICOMPATUNPARSED 0x0002
 #define JK_OPT_FWDURIESCAPED0x0003
 
-#define JK_OPT_FWDURIDEFAULTJK_OPT_FWDURICOMPAT
+#define JK_OPT_FWDURIDEFAULTJK_OPT_FWDURICOMPATUNPARSED
 
 #define JK_OPT_FWDKEYSIZE   0x0004
 

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=538975&r1=538974&r2=538975
==
--- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Thu May 17 
08:40:49 2007
@@ -23,7 +23,7 @@
   new documentation project for JK was started.
   
 
-
+
   
   
 
@@ -32,6 +32,19 @@
   
   
   Docs: Add comments on i5/OS build for V5R4 and previous releases. 
(hgomez)
+  
+
+  
+
+
+  
+  
+
+  
+  Change the default value of JkOptions to ForwardURICompatUnparsed.
+  The old default value was ForwardURICompat.
+  This should make URL interpretation between Apache httpd and
+  Tomcat consistent (prevent double decoding problems). (rjung)
   
 
   

Modified: tomcat/connectors/trunk/jk/xdocs/reference/apache.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/reference/apache.xml?view=diff&rev=538975&r1=538974&r2=538975
==
--- tomcat/connectors/trunk/jk/xdocs/reference/apache.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/reference/apache.xml Thu May 17 08:40:49 
2007
@@ -209,7 +209,8 @@
 
 This directive can be used multiple times per virtual server.
 
-The default value is "ForwardURICompat".
+The default value is "ForwardURICompatUnparsed" since version 1.2.23.
+Until version 1.2.22 the default value was "ForwardURICompat".
 
 
 Adds a name and an optional default value of environment variable
@@ -417,8 +418,9 @@
 
 The three following options +ForwardURIxxx are mutually exclusive.
 Exactly one of them is required, a negative sign prefix is not allowed with 
them.
-By default, the option ForwardURICompat is turned on.
-You can turn this off by switching on one of the other two.
+The default value is "ForwardURICompatUnparsed" since version 1.2.23.
+Until version 1.2.22 the default value was "ForwardURICompat".
+You can turn the default off by switching on one of the other two options.
 
 
 
@@ -435,12 +437,14 @@
 
 
 
-JkOptions ForwardURICompat, you ask mod_jk to send the URI to Tomcat 
normally, 
-which is less spec compliant but mod_rewrite compatible, 
-use it for compatibility with Tomcat 3.2.x engines (on by default).
+Using JkOptions ForwardURICompatUnparsed, the forwarded URI
+will be unparsed. It's spec compliant and also the safest option.
+It will always forward the original request URI, so rewriting
+URIs with mod_rewrite and then forwarding the rewritten URI
+will not work.
 
-  
-  JkOptions +ForwardURICompat
+
+  JkOptions +ForwardURICompatUnparsed
 
 
 
@@ -448,11 +452,15 @@
 
 
 
-JkOptions ForwardURICompatUnparsed, the forwarded URI 
-is unparsed, it's spec compliant but broke mod_rewrite.
+Using JkOptions ForwardURICompat, the forwarded URI will
+be decoded by Apache httpd. Encoded characters will be decoded and
+explicit path components like ".." will already be resolved.
+This is less spec compliant and is not safe if you are using
+prefix JkMount. This option will allow to rewrite URIs with
+mod_rewrite before forwarding.
 
-  
-  JkOptions +ForwardURICompatUnparsed
+
+  JkOptions +ForwardURICompat
 
 
 
@@ -460,10 +468,13 @@
 
 
 
-JkOptions ForwardURIEscaped, the forwarded URI is escaped and 
-Tomcat (since 3.3 rc2) will do the decoding part.
+Using JkOptions ForwardURIEscaped, the forwarded URI will
+be the encoded form of the URI 

svn commit: r539263 - in /tomcat/connectors/branches/other/JK_1_2_23/jk: native/STATUS.txt native/common/jk_version.h native/common/portable.h.sample native/configure.in xdocs/index.xml xdocs/news/200

2007-05-17 Thread rjung
Author: rjung
Date: Thu May 17 22:42:49 2007
New Revision: 539263

URL: http://svn.apache.org/viewvc?view=rev&rev=539263
Log:
Prepare release of JK 1.2.23.

Modified:
tomcat/connectors/branches/other/JK_1_2_23/jk/native/STATUS.txt
tomcat/connectors/branches/other/JK_1_2_23/jk/native/common/jk_version.h

tomcat/connectors/branches/other/JK_1_2_23/jk/native/common/portable.h.sample
tomcat/connectors/branches/other/JK_1_2_23/jk/native/configure.in
tomcat/connectors/branches/other/JK_1_2_23/jk/xdocs/index.xml
tomcat/connectors/branches/other/JK_1_2_23/jk/xdocs/news/20070301.xml

Modified: tomcat/connectors/branches/other/JK_1_2_23/jk/native/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/branches/other/JK_1_2_23/jk/native/STATUS.txt?view=diff&rev=539263&r1=539262&r2=539263
==
--- tomcat/connectors/branches/other/JK_1_2_23/jk/native/STATUS.txt (original)
+++ tomcat/connectors/branches/other/JK_1_2_23/jk/native/STATUS.txt Thu May 17 
22:42:49 2007
@@ -3,7 +3,7 @@
 
 Release:
 
-1.2.23  : in development
+1.2.23  : released May 18, 2007
 1.2.22  : released April 17, 2007
 1.2.21  : released March 1, 2007
 1.2.20  : released December 10, 2006

Modified: 
tomcat/connectors/branches/other/JK_1_2_23/jk/native/common/jk_version.h
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/branches/other/JK_1_2_23/jk/native/common/jk_version.h?view=diff&rev=539263&r1=539262&r2=539263
==
--- tomcat/connectors/branches/other/JK_1_2_23/jk/native/common/jk_version.h 
(original)
+++ tomcat/connectors/branches/other/JK_1_2_23/jk/native/common/jk_version.h 
Thu May 17 22:42:49 2007
@@ -33,7 +33,7 @@
 #define JK_VERBETA  0
 #define JK_BETASTRING   "0"
 /* set JK_VERISRELEASE to 1 when release (do not forget to commit!) */
-#define JK_VERISRELEASE 0
+#define JK_VERISRELEASE 1
 #define JK_VERRC0
 #define JK_RCSTRING "0"
 

Modified: 
tomcat/connectors/branches/other/JK_1_2_23/jk/native/common/portable.h.sample
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/branches/other/JK_1_2_23/jk/native/common/portable.h.sample?view=diff&rev=539263&r1=539262&r2=539263
==
--- 
tomcat/connectors/branches/other/JK_1_2_23/jk/native/common/portable.h.sample 
(original)
+++ 
tomcat/connectors/branches/other/JK_1_2_23/jk/native/common/portable.h.sample 
Thu May 17 22:42:49 2007
@@ -93,4 +93,4 @@
 #define USE_SO_SNDTIMEO 1
 
 /* Version number of package */
-#define VERSION "1.2.22"
+#define VERSION "1.2.23"

Modified: tomcat/connectors/branches/other/JK_1_2_23/jk/native/configure.in
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/branches/other/JK_1_2_23/jk/native/configure.in?view=diff&rev=539263&r1=539262&r2=539263
==
--- tomcat/connectors/branches/other/JK_1_2_23/jk/native/configure.in (original)
+++ tomcat/connectors/branches/other/JK_1_2_23/jk/native/configure.in Thu May 
17 22:42:49 2007
@@ -11,7 +11,7 @@
 
 dnl package and version. (synchronization with common/jk_version.h ?)
 PACKAGE=mod_jk
-VERSION=1.2.22
+VERSION=1.2.23
 
 AM_INIT_AUTOMAKE(${PACKAGE}, ${VERSION})
 

Modified: tomcat/connectors/branches/other/JK_1_2_23/jk/xdocs/index.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/branches/other/JK_1_2_23/jk/xdocs/index.xml?view=diff&rev=539263&r1=539262&r2=539263
==
--- tomcat/connectors/branches/other/JK_1_2_23/jk/xdocs/index.xml (original)
+++ tomcat/connectors/branches/other/JK_1_2_23/jk/xdocs/index.xml Thu May 17 
22:42:49 2007
@@ -29,6 +29,40 @@
 
 
 
+18 May 2007 - JK-1.2.23 
released
+The Apache Tomcat team is proud to announce the immediate availability
+of Tomcat Connectors 1.2.23 Stable.
+
+This version addresses the security flaw:
+
+http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-1860";>CVE-2007-1860
+A double encoded ".." in a URL can be used to access URLs on the AJP backend,
+for which no mod_jk forwarding rule exists (patch for CVE-2007-0450 was 
insufficient).
+
+This version fixes the problem by using ForwardURICompatUnparsed
+as the default for the forwarding JkOption.
+You can similarly fix the problem for all previous versions of mod_jk by 
setting
+"JkOption ForwardURICompatUnparsed".
+If you upgrade to version 1.2.23 please ensure, that you do not have
+a different forwarding option in your existing configuration.
+We highly recommend, that you are consulting the
+forwarding documentation,
+especially concerning the implications for interaction with mod_rewrite.
+
+Please note that this issue only affects configuration

svn commit: r539266 - /tomcat/connectors/tags/jk1.2.x/JK_1_2_23/

2007-05-17 Thread rjung
Author: rjung
Date: Thu May 17 22:45:37 2007
New Revision: 539266

URL: http://svn.apache.org/viewvc?view=rev&rev=539266
Log:
Tag JK release 1.2.23 from 1.2.23 branch.

Added:
tomcat/connectors/tags/jk1.2.x/JK_1_2_23/
  - copied from r539264, tomcat/connectors/branches/other/JK_1_2_23/


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



svn commit: r539553 - in /tomcat/site/trunk: docs/download-connectors.html xdocs/download-connectors.xml

2007-05-18 Thread rjung
Author: rjung
Date: Fri May 18 11:41:58 2007
New Revision: 539553

URL: http://svn.apache.org/viewvc?view=rev&rev=539553
Log:
Update connectors download page for new release 1.2.23.

Modified:
tomcat/site/trunk/docs/download-connectors.html
tomcat/site/trunk/xdocs/download-connectors.xml

Modified: tomcat/site/trunk/docs/download-connectors.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/download-connectors.html?view=diff&rev=539553&r1=539552&r2=539553
==
--- tomcat/site/trunk/docs/download-connectors.html (original)
+++ tomcat/site/trunk/docs/download-connectors.html Fri May 18 11:41:58 2007
@@ -222,7 +222,7 @@
 
 
 JK 1.2 (
-WARNING: Critical vulnerabilities in previous 
versions
+WARNING: Important vulnerabilities in previous 
versions
 ) 
 
 
@@ -233,18 +233,18 @@
 
 
 
-JK
 1.2.22 Source Release tar.gz
+JK
 1.2.23 Source Release tar.gz
 
 
-[http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.22/tomcat-connectors-1.2.22-src.tar.gz.asc";>pgp]
+[http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.23/tomcat-connectors-1.2.23-src.tar.gz.asc";>pgp]
 
 
 
 
-JK
 1.2.22 Source Release zip
+JK
 1.2.23 Source Release zip
 
 
-[http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.22/tomcat-connectors-1.2.22-src.zip.asc";>pgp]
+[http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.23/tomcat-connectors-1.2.23-src.zip.asc";>pgp]
 
 
 

Modified: tomcat/site/trunk/xdocs/download-connectors.xml
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/download-connectors.xml?view=diff&rev=539553&r1=539552&r2=539553
==
--- tomcat/site/trunk/xdocs/download-connectors.xml (original)
+++ tomcat/site/trunk/xdocs/download-connectors.xml Fri May 18 11:41:58 2007
@@ -26,17 +26,17 @@
 
 
 
-JK 1.2 (WARNING: Critical vulnerabilities in previous 
versions) 
+JK 1.2 (WARNING: Important vulnerabilities in previous 
versions) 
 
 
 Source
-JK
 1.2.22 Source Release tar.gz
-[http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.22/tomcat-connectors-1.2.22-src.tar.gz.asc";>pgp]
+JK
 1.2.23 Source Release tar.gz
+[http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.23/tomcat-connectors-1.2.23-src.tar.gz.asc";>pgp]
 
 
 
-JK
 1.2.22 Source Release zip
-[http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.22/tomcat-connectors-1.2.22-src.zip.asc";>pgp]
+JK
 1.2.23 Source Release zip
+[http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.23/tomcat-connectors-1.2.23-src.zip.asc";>pgp]
 
 
 



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



svn commit: r539565 - in /tomcat/site/trunk: docs/security-jk.html xdocs/security-jk.xml

2007-05-18 Thread rjung
Author: rjung
Date: Fri May 18 12:10:19 2007
New Revision: 539565

URL: http://svn.apache.org/viewvc?view=rev&rev=539565
Log:
Update jk connectors security pages.

Modified:
tomcat/site/trunk/docs/security-jk.html
tomcat/site/trunk/xdocs/security-jk.xml

Modified: tomcat/site/trunk/docs/security-jk.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/security-jk.html?view=diff&rev=539565&r1=539564&r2=539565
==
--- tomcat/site/trunk/docs/security-jk.html (original)
+++ tomcat/site/trunk/docs/security-jk.html Fri May 18 12:10:19 2007
@@ -2,7 +2,7 @@
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
 
 
-Apache Tomcat - Apache Tomcat 6.x vulnerabilities
+Apache Tomcat - Apache Tomcat JK Connectors vulnerabilities
 
 
 
@@ -196,6 +196,62 @@
and the CVE list. Please send comments or corrections for these
vulnerabilities to the mailto:[EMAIL PROTECTED]">Tomcat
Security Team.
+
+  
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Fixed in Apache Tomcat JK Connector 1.2.23
+
+
+
+
+
+
+
+
+
+important: Information disclosure
+   http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-1860";>
+   CVE-2007-1860 (patch for CVE-2007-0450 was insufficient)
+
+
+When multiple components (firewalls, caches, proxies and Tomcat)
+   process a request, the request URL should not get decoded multiple times
+   in an iterative way by these components. Otherwise it might be possible
+   to pass access control rules implemented on front of the last component
+   by applying multiple URL encoding to the request.
+   
+
+mod_jk before version 1.2.23 by default decoded request URLs inside 
Apache
+   httpd and forwarded the encoded URL to Tomcat, which itself did a second
+   decoding. This made it possible to pass a prefix JkMount for /someapp,
+   but actually access /otherapp on Tomcat. Starting with version 1.2.23
+   by default mod_jk forwards the original unchanged request URL to Tomcat.
+   You can achieve the same level of security for older versions by setting
+   the forwarding option "JkOption ForwardURICompatUnparsed".
+   
+
+Please note, that your configuration might contain a different 
forwarding
+   JkOption. In this case, please consult the
+   http://tomcat.apache.org/connectors-doc/reference/apache.html#Forwarding";>
+   forwarding documentation concerning the security implications.
+   The new default setting is more secure than before, but it breaks
+   interoperability with mod_rwrite.
+   
+
+Affects: All versions of JK, but only the Apache httpd mod_jk module
 
   
 

Modified: tomcat/site/trunk/xdocs/security-jk.xml
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/security-jk.xml?view=diff&rev=539565&r1=539564&r2=539565
==
--- tomcat/site/trunk/xdocs/security-jk.xml (original)
+++ tomcat/site/trunk/xdocs/security-jk.xml Fri May 18 12:10:19 2007
@@ -3,7 +3,7 @@
 
   
 Apache Tomcat Project
-Apache Tomcat 6.x vulnerabilities
+Apache Tomcat JK Connectors vulnerabilities
   
 
 
@@ -21,6 +21,39 @@
and the CVE list. Please send comments or corrections for these
vulnerabilities to the mailto:[EMAIL PROTECTED]">Tomcat
Security Team.
+
+  
+
+  
+important: Information disclosure
+   http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-1860";>
+   CVE-2007-1860 (patch for CVE-2007-0450 was insufficient)
+
+When multiple components (firewalls, caches, proxies and Tomcat)
+   process a request, the request URL should not get decoded multiple times
+   in an iterative way by these components. Otherwise it might be possible
+   to pass access control rules implemented on front of the last component
+   by applying multiple URL encoding to the request.
+   
+
+mod_jk before version 1.2.23 by default decoded request URLs inside 
Apache
+   httpd and forwarded the encoded URL to Tomcat, which itself did a second
+   decoding. This made it possible to pass a prefix JkMount for /someapp,
+   but actually access /otherapp on Tomcat. Starting with version 1.2.23
+   by default mod_jk forwards the original unchanged request URL to Tomcat.
+   You can achieve the same level of security for older versions by setting
+   the forwarding option "JkOption ForwardURICompatUnparsed".
+   
+
+Please note, that your configuration might contain a different 
forwarding
+   JkOption. In this case, please consult the
+   http://tomcat.apache.org/connectors-doc/reference/apache.html#Forwarding";>
+   forwarding documentation concerning the security implications.
+   The new default setting is more secure than before, but it br

svn commit: r539573 - in /tomcat/site/trunk: docs/security-jk.html xdocs/security-jk.xml

2007-05-18 Thread rjung
Author: rjung
Date: Fri May 18 12:33:35 2007
New Revision: 539573

URL: http://svn.apache.org/viewvc?view=rev&rev=539573
Log:
Fix typo in connectors security page.

Modified:
tomcat/site/trunk/docs/security-jk.html
tomcat/site/trunk/xdocs/security-jk.xml

Modified: tomcat/site/trunk/docs/security-jk.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/security-jk.html?view=diff&rev=539573&r1=539572&r2=539573
==
--- tomcat/site/trunk/docs/security-jk.html (original)
+++ tomcat/site/trunk/docs/security-jk.html Fri May 18 12:33:35 2007
@@ -248,7 +248,7 @@
http://tomcat.apache.org/connectors-doc/reference/apache.html#Forwarding";>
forwarding documentation concerning the security implications.
The new default setting is more secure than before, but it breaks
-   interoperability with mod_rwrite.
+   interoperability with mod_rewrite.

 
 Affects: All versions of JK, but only the Apache httpd mod_jk module

Modified: tomcat/site/trunk/xdocs/security-jk.xml
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/security-jk.xml?view=diff&rev=539573&r1=539572&r2=539573
==
--- tomcat/site/trunk/xdocs/security-jk.xml (original)
+++ tomcat/site/trunk/xdocs/security-jk.xml Fri May 18 12:33:35 2007
@@ -50,7 +50,7 @@
http://tomcat.apache.org/connectors-doc/reference/apache.html#Forwarding";>
forwarding documentation concerning the security implications.
The new default setting is more secure than before, but it breaks
-   interoperability with mod_rwrite.
+   interoperability with mod_rewrite.

 
 Affects: All versions of JK, but only the Apache httpd mod_jk module



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



svn commit: r539721 - in /tomcat/connectors/trunk/jk/xdocs: index.xml news/20070301.xml

2007-05-19 Thread rjung
Author: rjung
Date: Sat May 19 02:23:24 2007
New Revision: 539721

URL: http://svn.apache.org/viewvc?view=rev&rev=539721
Log:
Backport JK 1.2.23 release documents to trunk.
(r539263)

Modified:
tomcat/connectors/trunk/jk/xdocs/index.xml
tomcat/connectors/trunk/jk/xdocs/news/20070301.xml

Modified: tomcat/connectors/trunk/jk/xdocs/index.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/index.xml?view=diff&rev=539721&r1=539720&r2=539721
==
--- tomcat/connectors/trunk/jk/xdocs/index.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/index.xml Sat May 19 02:23:24 2007
@@ -29,6 +29,40 @@
 
 
 
+18 May 2007 - JK-1.2.23 
released
+The Apache Tomcat team is proud to announce the immediate availability
+of Tomcat Connectors 1.2.23 Stable.
+
+This version addresses the security flaw:
+
+http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-1860";>CVE-2007-1860
+A double encoded ".." in a URL can be used to access URLs on the AJP backend,
+for which no mod_jk forwarding rule exists (patch for CVE-2007-0450 was 
insufficient).
+
+This version fixes the problem by using ForwardURICompatUnparsed
+as the default for the forwarding JkOption.
+You can similarly fix the problem for all previous versions of mod_jk by 
setting
+"JkOption ForwardURICompatUnparsed".
+If you upgrade to version 1.2.23 please ensure, that you do not have
+a different forwarding option in your existing configuration.
+We highly recommend, that you are consulting the
+forwarding documentation,
+especially concerning the implications for interaction with mod_rewrite.
+
+Please note that this issue only affects configurations,
+which use a prefix forwarding rule like "/myapp/*" or "/myapp/*.jsp"
+to restrict access to the context "/myapp". The issue will allow 
+malicious URLs to reach "/otherapp" or "/otherapp/*.jsp" as well.
+
+The Tomcat Project thanks Kazu Nambo for his responsible reporting of this 
+vulnerability.
+
+Download the http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.23/tomcat-connectors-1.2.23-src.tar.gz";>JK
 1.2.23 release sources
+ | http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.23/tomcat-connectors-1.2.23-src.tar.gz.asc";>PGP
 signature
+
+Download the http://www.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/";>binaries
 for selected platforms.
+
+
 17 April 2007 - JK-1.2.22 
released
 The Apache Tomcat team is proud to announce the immediate availability
 of Tomcat Connectors 1.2.22 Stable.

Modified: tomcat/connectors/trunk/jk/xdocs/news/20070301.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/news/20070301.xml?view=diff&rev=539721&r1=539720&r2=539721
==
--- tomcat/connectors/trunk/jk/xdocs/news/20070301.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/news/20070301.xml Sat May 19 02:23:24 2007
@@ -15,14 +15,14 @@
 
 
 
- 
-1 March - JK-1.2.21 released
+ 
+18 May - JK-1.2.23 released
 
 The Apache Tomcat team is proud to announce the immediate availability
-of Tomcat Connectors 1.2.21. This is a stable release adding new features
-and a few bug fixes to version 1.2.20.
+of Tomcat Connectors 1.2.23. This is a stable release adding new features
+and a few bug fixes to version 1.2.23.
 
-It fixes a Critical vulnerability introduced 
in version 1.2.19
+It fixes an http://tomcat.apache.org/security-jk.html";>Important 
vulnerability.
 
  Please see the ChangeLog for a 
full list of changes.
 
@@ -37,6 +37,22 @@
 The Apache Tomcat team is proud to announce the immediate availability
 of Tomcat Connectors 1.2.22. This is a stable release adding new features
 and a few bug fixes to version 1.2.22.
+
+ Please see the ChangeLog for a 
full list of changes.
+
+If you find any bugs while using this release, please fill in the
+http://issues.apache.org/bugzilla/enter_bug.cgi?product=Tomcat%205";>Bugzilla
+Bug Report. When entering bug select Native:JK Component.
+
+
+ 
+1 March - JK-1.2.21 released
+
+The Apache Tomcat team is proud to announce the immediate availability
+of Tomcat Connectors 1.2.21. This is a stable release adding new features
+and a few bug fixes to version 1.2.20.
+
+It fixes a http://tomcat.apache.org/security-jk.html";>Critical 
vulnerability introduced in version 1.2.19
 
  Please see the ChangeLog for a 
full list of changes.
 



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



svn commit: r539722 - in /tomcat/connectors/trunk/jk/native: STATUS.txt common/jk_version.h common/portable.h.sample configure.in iis/installer/isapi-redirector-win32-msi.ism iis/isapi_redirect.rc

2007-05-19 Thread rjung
Author: rjung
Date: Sat May 19 02:26:08 2007
New Revision: 539722

URL: http://svn.apache.org/viewvc?view=rev&rev=539722
Log:
Version bump after JK release.

Modified:
tomcat/connectors/trunk/jk/native/STATUS.txt
tomcat/connectors/trunk/jk/native/common/jk_version.h
tomcat/connectors/trunk/jk/native/common/portable.h.sample
tomcat/connectors/trunk/jk/native/configure.in

tomcat/connectors/trunk/jk/native/iis/installer/isapi-redirector-win32-msi.ism
tomcat/connectors/trunk/jk/native/iis/isapi_redirect.rc

Modified: tomcat/connectors/trunk/jk/native/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/STATUS.txt?view=diff&rev=539722&r1=539721&r2=539722
==
--- tomcat/connectors/trunk/jk/native/STATUS.txt (original)
+++ tomcat/connectors/trunk/jk/native/STATUS.txt Sat May 19 02:26:08 2007
@@ -3,7 +3,8 @@
 
 Release:
 
-1.2.23  : in development
+1.2.24  : in development
+1.2.23  : released May 18, 2007
 1.2.22  : released April 17, 2007
 1.2.21  : released March 1, 2007
 1.2.20  : released December 10, 2006

Modified: tomcat/connectors/trunk/jk/native/common/jk_version.h
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_version.h?view=diff&rev=539722&r1=539721&r2=539722
==
--- tomcat/connectors/trunk/jk/native/common/jk_version.h (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_version.h Sat May 19 02:26:08 
2007
@@ -26,8 +26,8 @@
 /** START OF AREA TO MODIFY BEFORE RELEASING */
 #define JK_VERMAJOR 1
 #define JK_VERMINOR 2
-#define JK_VERFIX   23
-#define JK_VERSTRING"1.2.23"
+#define JK_VERFIX   24
+#define JK_VERSTRING"1.2.24"
 
 /* Beta number */
 #define JK_VERBETA  0

Modified: tomcat/connectors/trunk/jk/native/common/portable.h.sample
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/portable.h.sample?view=diff&rev=539722&r1=539721&r2=539722
==
--- tomcat/connectors/trunk/jk/native/common/portable.h.sample (original)
+++ tomcat/connectors/trunk/jk/native/common/portable.h.sample Sat May 19 
02:26:08 2007
@@ -93,4 +93,4 @@
 #define USE_SO_SNDTIMEO 1
 
 /* Version number of package */
-#define VERSION "1.2.22"
+#define VERSION "1.2.24"

Modified: tomcat/connectors/trunk/jk/native/configure.in
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/configure.in?view=diff&rev=539722&r1=539721&r2=539722
==
--- tomcat/connectors/trunk/jk/native/configure.in (original)
+++ tomcat/connectors/trunk/jk/native/configure.in Sat May 19 02:26:08 2007
@@ -11,7 +11,7 @@
 
 dnl package and version. (synchronization with common/jk_version.h ?)
 PACKAGE=mod_jk
-VERSION=1.2.22
+VERSION=1.2.24
 
 AM_INIT_AUTOMAKE(${PACKAGE}, ${VERSION})
 

Modified: 
tomcat/connectors/trunk/jk/native/iis/installer/isapi-redirector-win32-msi.ism
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/iis/installer/isapi-redirector-win32-msi.ism?view=diff&rev=539722&r1=539721&r2=539722
==
--- 
tomcat/connectors/trunk/jk/native/iis/installer/isapi-redirector-win32-msi.ism 
(original)
+++ 
tomcat/connectors/trunk/jk/native/iis/installer/isapi-redirector-win32-msi.ism 
Sat May 19 02:26:08 2007
@@ -3409,7 +3409,7 @@
ProductIDnone
ProductLanguage1033
ProductNameTomcat Isapi 
Redirector
-   ProductVersion1.2.23
+   ProductVersion1.2.24
ProgressType0install
ProgressType1Installing
ProgressType2installed

Modified: tomcat/connectors/trunk/jk/native/iis/isapi_redirect.rc
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/iis/isapi_redirect.rc?view=diff&rev=539722&r1=539721&r2=539722
==
--- tomcat/connectors/trunk/jk/native/iis/isapi_redirect.rc (original)
+++ tomcat/connectors/trunk/jk/native/iis/isapi_redirect.rc Sat May 19 02:26:08 
2007
@@ -14,13 +14,13 @@
 "specific language governing permissions and " \
 "limitations under the License."
 
-#define JK_VERSION_STR  "1.2.23"
+#define JK_VERSION_STR  "1.2.24"
 #define JK_DLL_BASENAME "isapi_redirect-" JK_VERSION_STR
 
 
 1 VERSIONINFO
- FILEVERSION 1,2,23,0
- PRODUCTVERSION 1,2,23,0
+ FILEVERSION 1,2,24,0
+ PRODUCTVERSION 1,2,24,0
  FILEFLAGSMASK 0x3fL
 #if defined(_DEBUG)
  FILEFLAGS 0x01L



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



svn commit: r539768 - /tomcat/connectors/trunk/jk/tools/jkrelease.sh

2007-05-19 Thread rjung
Author: rjung
Date: Sat May 19 08:20:08 2007
New Revision: 539768

URL: http://svn.apache.org/viewvc?view=rev&rev=539768
Log:
Fix commandline options for links (at least for Links2).
Checked results for NEWS: files generated by elinks and links
are the same except for trailing space and indentation
of separator lines.

Modified:
tomcat/connectors/trunk/jk/tools/jkrelease.sh

Modified: tomcat/connectors/trunk/jk/tools/jkrelease.sh
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/tools/jkrelease.sh?view=diff&rev=539768&r1=539767&r2=539768
==
--- tomcat/connectors/trunk/jk/tools/jkrelease.sh (original)
+++ tomcat/connectors/trunk/jk/tools/jkrelease.sh Sat May 19 08:20:08 2007
@@ -8,7 +8,7 @@
 # libtoolize, aclocal, autoheader, automake, autoconf
 # tar, zip, gzip
 # gpg
-# And any one of: w3m, elinks, links
+# And any one of: w3m, elinks, links (links2)
 
 usage() {
 echo "Usage:: $0 -t VERSION [-b BRANCH | -T]"
@@ -151,8 +151,8 @@
 
 # Check for links, elinks or w3m
 W3MOPTS="-dump -cols 80 -t 4 -S -O iso-8859-1 -T text/html"
-LNKOPTS="-dump -dump-width 80 -dump-charset iso-8859-1 -no-numbering 
-no-references -no-home"
-ELNKOPTS=$LNKOPTS
+ELNKOPTS="-dump -dump-width 80 -dump-charset iso-8859-1 -no-numbering 
-no-references -no-home"
+LNKOPTS="-dump -width 80 -codepage iso-8859-1 -no-g -html-numbered-links 0"
 failed=true
 for tool in `echo "w3m elinks links"`
 do



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



svn commit: r539895 - in /tomcat/tc6.0.x/trunk: java/org/apache/catalina/manager/HTMLManagerServlet.java webapps/docs/changelog.xml

2007-05-20 Thread rjung
Author: rjung
Date: Sun May 20 10:12:08 2007
New Revision: 539895

URL: http://svn.apache.org/viewvc?view=rev&rev=539895
Log:
Fix BZ 42459: Manager webap table format error
for stopped and undeployed webapps.

Modified:

tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/HTMLManagerServlet.java
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/HTMLManagerServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/HTMLManagerServlet.java?view=diff&rev=539895&r1=539894&r2=539895
==
--- 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/HTMLManagerServlet.java 
(original)
+++ 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/HTMLManagerServlet.java 
Sun May 20 10:12:08 2007
@@ -1006,7 +1006,7 @@
 "   {7} \n" +
 "  \n" +
 " \n" +
-"\n";
+"\n\n";
 
 private static final String STARTED_NONDEPLOYED_APPS_ROW_BUTTON_SECTION =
 " \n" +
@@ -1017,7 +1017,7 @@
 "   {7} \n" +
 "  \n" +
 " \n" +
-"\n";
+"\n\n";
 
 private static final String STOPPED_NONDEPLOYED_APPS_ROW_BUTTON_SECTION =
 " \n" +
@@ -1028,7 +1028,7 @@
 "   {7} \n" +
 "  \n" +
 " \n" +
-"\n";
+"\n\n";
 
 private static final String DEPLOY_SECTION =
 "\n" +

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=diff&rev=539895&r1=539894&r2=539895
==
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Sun May 20 10:12:08 2007
@@ -31,6 +31,13 @@
   
 
   
+  
+
+  
+ 42459: Tomcat Web Application Manager table error (rjung)
+  
+
+  
 
 
   



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



svn commit: r543093 - in /tomcat/connectors/trunk/jk: native/common/jk_mt.h xdocs/miscellaneous/changelog.xml xdocs/webserver_howto/apache.xml

2007-05-31 Thread rjung
Author: rjung
Date: Thu May 31 02:27:59 2007
New Revision: 543093

URL: http://svn.apache.org/viewvc?view=rev&rev=543093
Log:
Always build thread safe against Apache httpd 2.0/2.2
(unless configure detects --enable-prefork).
_REENTRANT flag for APR is not a safe threading detection
for all platforms.

Modified:
tomcat/connectors/trunk/jk/native/common/jk_mt.h
tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
tomcat/connectors/trunk/jk/xdocs/webserver_howto/apache.xml

Modified: tomcat/connectors/trunk/jk/native/common/jk_mt.h
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_mt.h?view=diff&rev=543093&r1=543092&r2=543093
==
--- tomcat/connectors/trunk/jk/native/common/jk_mt.h (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_mt.h Thu May 31 02:27:59 2007
@@ -33,18 +33,10 @@
 #define getpid()   ((int)GetThreadGroupID())
 #endif
 
-/*
- * All WIN32 code is MT, UNIX code that uses pthreads is marked by the POSIX
- * _REENTRANT define.
- */
-#if defined (WIN32) || defined(_REENTRANT) || (defined(NETWARE) && 
defined(__NOVELL_LIBC__))
 #ifdef JK_PREFORK 
 #define _MT_CODE 0
 #else
 #define _MT_CODE 1
-#endif
-#else
-#define _MT_CODE 0
 #endif
 
 /*

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=543093&r1=543092&r2=543093
==
--- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Thu May 31 
02:27:59 2007
@@ -27,6 +27,10 @@
   
   
 
+  
+  Always build with thread support, unless flag --enable-prefork
+  is set during for configure. (rjung)
+  
   
   i5/OS (AS/400) V5R4 port where Apache 2.0 modules should now use UTF8. 
(hgomez)
   

Modified: tomcat/connectors/trunk/jk/xdocs/webserver_howto/apache.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/webserver_howto/apache.xml?view=diff&rev=543093&r1=543092&r2=543093
==
--- tomcat/connectors/trunk/jk/xdocs/webserver_howto/apache.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/webserver_howto/apache.xml Thu May 31 
02:27:59 2007
@@ -838,25 +838,26 @@
 
 
 
-If you want to build mod_jk for Apache 1.3 and 2.0/2.2, you should
+If you want to build mod_jk for different version of Apache httpd, like 1.3, 
2.0 and 2.2,
+you need to go through the full build process for each of them.
+Please note, that httpd 2.0 and 2.2 modules are not compatible. The 
mod_jk directory
+used is "apache-2.0" in both cases, but you need to compile separately.
 
 
-use configure and indicate Apache 1.3 apxs location (--with-apxs)
+use configure and indicate the correct Apache httpd apxs location (--with-apxs)
 
 
 use make
 
 
-copy the mod_jk binary to the apache modules location
+copy the resulting mod_jk.so binary from the apache-1.3 or apache-2.0 
subdirectory
+to the Apache httpd modules location.
 
 
-make clean (to remove all previously compiled modules)
+make clean (to remove all previously compiled object files)
 
 
-use configure and indicate Apache 2.0/2.2 apxs location,
-
-
-then make.
+Start over with the apxs location for your next Apache httpd version.
 
 
 
@@ -886,17 +887,14 @@
 
   --enable-prefork
   
-In case you build mod_jk for a multi-threaded Apache 2.0/2.2 MPM 
(Multi-Processing Module),
+In case you build mod_jk for a multi-threaded Apache httpd 2.0/2.2 MPM 
(Multi-Processing Module),
 some areas of mod_jk code need to be synchronized to make it thread-safe.
-Configure autodetects, whether your are using a multi-threaded MPM.
-For instance, the worker MPM is multi-threaded, the prefork MPM is not.
-Depending on how you build your Apache httpd, in some cases configure
-detects that it needs to build thread safe, although actually it would not be 
necessary.
-One such case is, if you build against Apache httpd with prefork MPM,
-and your APR (Apache Portable Runtime) libraries have been build with thread 
support
-(the output of "apxs -q EXTRA_CPPFLAGS" will contain "-D_REENTRANT").
+Because configure can not easily detect, whether your are using a 
multi-threaded MPM,
+mod_jk by default is always build thread-safe for Apache httpd 2.0/2.2.
 If you are sure, that your MPM is not multi-threaded, you can use 
"--enable-prefork"
-to force the removal of the synchronization code (thus increasing performance 
a bit).
+to force the removal of the synchronization code (thus increasing performance 
a bit).
+For instance, the prefork MPM is not multi-

svn commit: r543419 - /tomcat/connectors/trunk/jk/native/common/jk_util.c

2007-06-01 Thread rjung
Author: rjung
Date: Fri Jun  1 00:53:52 2007
New Revision: 543419

URL: http://svn.apache.org/viewvc?view=rev&rev=543419
Log:
Correct pthread_t casting in jk_gettid().
Needed at least on Mac OS X,
shouldn't hurt on other platforms.

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

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=diff&rev=543419&r1=543418&r2=543419
==
--- tomcat/connectors/trunk/jk/native/common/jk_util.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_util.c Fri Jun  1 00:53:52 2007
@@ -1686,7 +1686,7 @@
 pthread_getunique_np(&t, &tid);
 return ((int)(tid.intId.lo & 0x));
 #else
-int tid = (int)(t & 0x);
+int tid = ((int)t) & 0x;
 return tid;
 #endif /* AS400 */
 }



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



svn commit: r543563 - /tomcat/connectors/trunk/jk/tools/jkrelease.sh

2007-06-01 Thread rjung
Author: rjung
Date: Fri Jun  1 11:12:33 2007
New Revision: 543563

URL: http://svn.apache.org/viewvc?view=rev&rev=543563
Log:
Allow to roll testing tarballs from a local
svn workspace. This makes release testing easier.

Modified:
tomcat/connectors/trunk/jk/tools/jkrelease.sh

Modified: tomcat/connectors/trunk/jk/tools/jkrelease.sh
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/tools/jkrelease.sh?view=diff&rev=543563&r1=543562&r2=543563
==
--- tomcat/connectors/trunk/jk/tools/jkrelease.sh (original)
+++ tomcat/connectors/trunk/jk/tools/jkrelease.sh Fri Jun  1 11:12:33 2007
@@ -11,18 +11,24 @@
 # And any one of: w3m, elinks, links (links2)
 
 usage() {
-echo "Usage:: $0 -t VERSION [-b BRANCH | -T]"
+echo "Usage:: $0 -t VERSION [-b BRANCH | -T | -d DIR]"
 echo "-t: version to package"
 echo "-b: package from branch BRANCH"
 echo "-T: package from trunk"
+echo "-d: package from local directory"
 }
 
-while getopts :t:b:T c
+conflict=0
+while getopts :t:b:d:T c
 do
 case $c in
 t) tag=$OPTARG;;
-b) branch=$OPTARG;;
-T) trunk=trunk;;
+b) branch=$OPTARG
+   conflict=$(($conflict+1));;
+T) trunk=trunk
+   conflict=$(($conflict+1));;
+d) local_dir=$OPTARG
+   conflict=$(($conflict+1));;
 \:)usage
exit 2;;
 \?)usage
@@ -31,6 +37,30 @@
 done
 shift `expr $OPTIND - 1`
 
+if [ $conflict -gt 1 ]
+then
+usage
+echo "Only one of the options '-b', '-T'  and '-d' is allowed."
+exit 2
+fi
+
+if [ -n "$local_dir" ]
+then
+echo "Caution: Packaging from directory!"
+echo "Make sure the directory is committed."
+answer="x"
+while [ "$answer" != "y" -a "$answer" != "n" ]
+do
+echo "Do you want to procede? [y/n]"
+read answer
+done
+if [ "$answer" != "y" ]
+then
+echo "Aborting."
+exit 4
+fi
+fi
+
 SVNROOT="http://svn.apache.org/repos/asf";
 SVNPROJ="tomcat/connectors"
 JK_CVST="tomcat-connectors"
@@ -49,12 +79,6 @@
 usage
 exit 2
 fi
-if [ -n "$trunk" -a -n "$branch" ]
-then
-usage
-echo "Only one of the options '-b' and '-T' allowed."
-exit 2
-fi
 if [ -n "$trunk" ]
 then
 JK_SVN_URL="${SVNROOT}/${SVNPROJ}/trunk"
@@ -76,6 +100,16 @@
exit 3
 fi
 JK_DIST=${JK_CVST}-${tag}-dev-${JK_BRANCH}-${JK_REV}-src
+elif [ -n "$local_dir" ]
+then
+JK_SVN_URL="$local_dir"
+JK_REV=`svn info ${JK_SVN_URL} | awk '$1 == "Revision:" {print $2}'`
+if [ -z "$JK_REV" ]
+then
+   echo "No Revision found at '$JK_SVN_URL'"
+   exit 3
+fi
+JK_DIST=${JK_CVST}-${tag}-dev-local-${JK_REV}-src
 else
 JK_VER=$tag
 JK_TAG=`echo $tag | sed -e 's#^#JK_#' -e 's#\.#_#g'`



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



svn commit: r548683 - in /tomcat/connectors/trunk/jk/xdocs: generic_howto/loadbalancers.xml miscellaneous/changelog.xml reference/workers.xml

2007-06-19 Thread rjung
Author: rjung
Date: Tue Jun 19 03:33:33 2007
New Revision: 548683

URL: http://svn.apache.org/viewvc?view=rev&rev=548683
Log:
Clarify relation between worker names and jvmRoute for load balancing.
Hopefully this will answer the most frequently asked question in a way
users will understand (at least if they RTFM).

Modified:
tomcat/connectors/trunk/jk/xdocs/generic_howto/loadbalancers.xml
tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
tomcat/connectors/trunk/jk/xdocs/reference/workers.xml

Modified: tomcat/connectors/trunk/jk/xdocs/generic_howto/loadbalancers.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/generic_howto/loadbalancers.xml?view=diff&rev=548683&r1=548682&r2=548683
==
--- tomcat/connectors/trunk/jk/xdocs/generic_howto/loadbalancers.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/generic_howto/loadbalancers.xml Tue Jun 19 
03:33:33 2007
@@ -66,6 +66,14 @@
 
 
 The overall result is that workers managed by the same lb worker are 
load-balanced (based on their lbfactor and current user session) and also 
fall-backed so a single Tomcat process death will not "kill" the entire site.
+
+
+If you want to use session stickyness, you must set different jvmRoute 
attributes
+in the Engine element in Tomcat's server.xml. Furthermore the names of the 
workers
+which are managed by the balancer have to be equal to the jvmRoute of the 
Tomcat
+instance they connect with.
+
+
 The following table specifies some properties that the lb worker can accept:
 
 balance_workers is a comma separated list of workers that the load 
balancer need to manage. 

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=548683&r1=548682&r2=548683
==
--- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Tue Jun 19 
03:33:33 2007
@@ -27,6 +27,9 @@
   
   
 
+  
+  Docs: Clarify relation between worker names and jvmRoute for load 
balancing. (rjung)
+  
   
   Use initial zero timeout for jk_is_socket_connected. The resulting
   detection is the same but offers a huge performance increase

Modified: tomcat/connectors/trunk/jk/xdocs/reference/workers.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/reference/workers.xml?view=diff&rev=548683&r1=548682&r2=548683
==
--- tomcat/connectors/trunk/jk/xdocs/reference/workers.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/reference/workers.xml Tue Jun 19 03:33:33 
2007
@@ -52,8 +52,9 @@
 
 
 Each workers.properties directive consists of three words separated by dot. 
The first word is always
-worker. The second word is the worker name that can be any name. The 
worker name reflects the
-name of the jvmRoute defined in Tomcat's server.xml configuration file.
+worker. The second word is the worker name that can be any name. In the 
case of load-balancing,
+the worker name has an additional meaning. Please consult the
+Load Balancer HowTo.
 
 
 
@@ -249,6 +250,17 @@
 The overall result is that workers managed by the same lb worker are 
load-balanced
 (based on their lbfactor and current user session) and also fall-backed so a 
single
 Tomcat process death will not "kill" the entire site.
+
+
+If you want to use session stickyness, you must set different jvmRoute 
attributes
+in the Engine element in Tomcat's server.xml. Furthermore the names of the 
workers
+which are managed by the balancer have to be equal to the jvmRoute of the 
Tomcat
+instance they connect with.
+
+
+The restriction on the worker names can be lifted, if you use the route 
attribute for the workers.
+
+
 The following table specifies properties that the lb worker can accept:
 
 



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



svn commit: r548709 - in /tomcat/connectors/trunk/jk: native/apache-1.3/mod_jk.c native/apache-2.0/mod_jk.c xdocs/miscellaneous/changelog.xml

2007-06-19 Thread rjung
Author: rjung
Date: Tue Jun 19 05:34:33 2007
New Revision: 548709

URL: http://svn.apache.org/viewvc?view=rev&rev=548709
Log:
Apache: Add forwarding uri to debug log.

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/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=diff&rev=548709&r1=548708&r2=548709
==
--- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Tue Jun 19 05:34:33 
2007
@@ -578,24 +578,6 @@
 s->no_more_chunks = 0;
 s->query_string = r->args;
 
-/* Dump all connection param so we can trace what's going to
- * the remote tomcat
- */
-if (JK_IS_DEBUG_LEVEL(conf->log)) {
-jk_log(conf->log, JK_LOG_DEBUG,
-   "Service protocol=%s method=%s host=%s addr=%s name=%s port=%d 
auth=%s user=%s laddr=%s raddr=%s",
-   STRNULL_FOR_NULL(s->protocol),
-   STRNULL_FOR_NULL(s->method),
-   STRNULL_FOR_NULL(s->remote_host),
-   STRNULL_FOR_NULL(s->remote_addr),
-   STRNULL_FOR_NULL(s->server_name),
-   s->server_port,
-   STRNULL_FOR_NULL(s->auth_type),
-   STRNULL_FOR_NULL(s->remote_user),
-   STRNULL_FOR_NULL(r->connection->local_ip),
-   STRNULL_FOR_NULL(r->connection->remote_ip));
-}
-
 /*
  * The 2.2 servlet spec errata says the uri from
  * HttpServletRequest.getRequestURI() should remain encoded.
@@ -793,6 +775,26 @@
 }
 }
 s->uw_map = conf->uw_map;
+
+/* Dump all connection param so we can trace what's going to
+ * the remote tomcat
+ */
+if (JK_IS_DEBUG_LEVEL(conf->log)) {
+jk_log(conf->log, JK_LOG_DEBUG,
+   "Service protocol=%s method=%s host=%s addr=%s name=%s port=%d 
auth=%s user=%s laddr=%s raddr=%s uri=%s",
+   STRNULL_FOR_NULL(s->protocol),
+   STRNULL_FOR_NULL(s->method),
+   STRNULL_FOR_NULL(s->remote_host),
+   STRNULL_FOR_NULL(s->remote_addr),
+   STRNULL_FOR_NULL(s->server_name),
+   s->server_port,
+   STRNULL_FOR_NULL(s->auth_type),
+   STRNULL_FOR_NULL(s->remote_user),
+   STRNULL_FOR_NULL(r->connection->local_ip),
+   STRNULL_FOR_NULL(r->connection->remote_ip),
+   STRNULL_FOR_NULL(s->req_uri));
+}
+
 return JK_TRUE;
 }
 

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=diff&rev=548709&r1=548708&r2=548709
==
--- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Tue Jun 19 05:34:33 
2007
@@ -606,24 +606,6 @@
 s->query_string = r->args;
 #endif
 
-/* Dump all connection param so we can trace what's going to
- * the remote tomcat
- */
-if (JK_IS_DEBUG_LEVEL(conf->log)) {
-jk_log(conf->log, JK_LOG_DEBUG,
-   "Service protocol=%s method=%s host=%s addr=%s name=%s port=%d 
auth=%s user=%s laddr=%s raddr=%s",
-   STRNULL_FOR_NULL(s->protocol),
-   STRNULL_FOR_NULL(s->method),
-   STRNULL_FOR_NULL(s->remote_host),
-   STRNULL_FOR_NULL(s->remote_addr),
-   STRNULL_FOR_NULL(s->server_name),
-   s->server_port,
-   STRNULL_FOR_NULL(s->auth_type),
-   STRNULL_FOR_NULL(s->remote_user),
-   STRNULL_FOR_NULL(r->connection->local_ip),
-   STRNULL_FOR_NULL(r->connection->remote_ip));
-}
-
 /*
  * The 2.2 servlet spec errata says the uri from
  * HttpServletRequest.getRequestURI() should remain encoded.
@@ -822,6 +804,26 @@
 }
 }
 s->uw_map = conf->uw_map;
+
+/* Dump all connection param so we can trace what's going to
+ * the remote tomcat
+ */
+if (JK_IS_DEBUG_LEVEL(conf->log)) {
+jk_log(conf->log, JK_LOG_DEBUG,
+   "Service protocol=%s method=%s host=%s addr=%s name=%s port=%d 
auth=%s user=%s laddr=%s raddr=%s uri=%s",
+   STRNULL_FOR_NULL(s->protocol),
+   STRNULL_FOR_NULL(s->method),
+   STRNULL_FOR_NULL(s->remote_host),
+   STRNULL_FOR

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

2007-06-19 Thread rjung
Author: rjung
Date: Tue Jun 19 09:36:22 2007
New Revision: 548791

URL: http://svn.apache.org/viewvc?view=rev&rev=548791
Log:
Fix Bugzilla 42608: Handle Content-length as unsigned 64Bit
to allow for huge up- and downloads.

This still needs intensive testing in combination with the
fixes of the jk connectors on the tomcat side!

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_ajp12_worker.c
tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c
tomcat/connectors/trunk/jk/native/common/jk_ajp_common.h
tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c
tomcat/connectors/trunk/jk/native/common/jk_service.h
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/apache-1.3/mod_jk.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c?view=diff&rev=548791&r1=548790&r2=548791
==
--- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Tue Jun 19 09:36:22 
2007
@@ -477,17 +477,17 @@
 }
 
 /* Return the content length associated with an Apache request structure */
-static int get_content_length(request_rec * r)
+static jk_uint64_t get_content_length(request_rec * r)
 {
 if (r->clength > 0) {
-return r->clength;
+return (jk_uint64_t)r->clength;
 }
 else {
 char *lenp = (char *)ap_table_get(r->headers_in, "Content-Length");
 
 if (lenp) {
-int rc = atoi(lenp);
-if (rc > 0) {
+jk_uint64_t rc = 0;
+if (sscanf(lenp, "%" JK_UINT64_T_FMT, &rc) > 0 && rc > 0) {
 return rc;
 }
 }

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=diff&rev=548791&r1=548790&r2=548791
==
--- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Tue Jun 19 09:36:22 
2007
@@ -515,17 +515,17 @@
 exit(1);
 }
 
-static int get_content_length(request_rec * r)
+static jk_uint64_t get_content_length(request_rec * r)
 {
 if (r->clength > 0) {
-return (int)r->clength;
+return (jk_uint64_t)r->clength;
 }
 else if (r->main == NULL || r->main == r) {
 char *lenp = (char *)apr_table_get(r->headers_in, "Content-Length");
 
 if (lenp) {
-int rc = atoi(lenp);
-if (rc > 0) {
+jk_uint64_t rc = 0;
+if (sscanf(lenp, "%" JK_UINT64_T_FMT, &rc) > 0 && rc > 0) {
 return rc;
 }
 }

Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp12_worker.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp12_worker.c?view=diff&rev=548791&r1=548790&r2=548791
==
--- tomcat/connectors/trunk/jk/native/common/jk_ajp12_worker.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_ajp12_worker.c Tue Jun 19 
09:36:22 2007
@@ -457,17 +457,20 @@
 
 if (s->content_length) {
 char buf[READ_BUF_SIZE];
-unsigned so_far = 0;
+jk_uint64_t so_far = 0;
 
 jk_log(l, JK_LOG_DEBUG,
"ajpv12_handle_request, sending the request body");
 
 while (so_far < s->content_length) {
 unsigned this_time = 0;
-unsigned to_read = s->content_length - so_far;
-if (to_read > READ_BUF_SIZE) {
+unsigned to_read;
+if (s->content_length > so_far + READ_BUF_SIZE) {
 to_read = READ_BUF_SIZE;
 }
+else {
+to_read = s->content_length - so_far;
+}
 
 if (!s->read(s, buf, to_read, &this_time)) {
 jk_log(l, JK_LOG_ERROR,
@@ -488,7 +491,7 @@
 }
 else if (this_time == 0) {
 jk_log(l, JK_LOG_ERROR,
-   "In ajpv12_handle_request, Error: short read. content 
length is %d, read %d",
+   "In ajpv12_handle_request, Error: short read. content 
length is %" JK_UINT64_T_FMT ", read %" JK_UINT64_T_FMT,
s->content_length, so_far);
 

svn commit: r549222 - /tomcat/connectors/trunk/jk/native/common/jk_global.h

2007-06-20 Thread rjung
Author: rjung
Date: Wed Jun 20 13:32:24 2007
New Revision: 549222

URL: http://svn.apache.org/viewvc?view=rev&rev=549222
Log:
Clean up constant ordering.

Modified:
tomcat/connectors/trunk/jk/native/common/jk_global.h

Modified: tomcat/connectors/trunk/jk/native/common/jk_global.h
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_global.h?view=diff&rev=549222&r1=549221&r2=549222
==
--- tomcat/connectors/trunk/jk/native/common/jk_global.h (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_global.h Wed Jun 20 13:32:24 
2007
@@ -237,8 +237,6 @@
 
 #define JK_OPT_FWDURIDEFAULTJK_OPT_FWDURIPROXY
 
-#define JK_OPT_FWDKEYSIZE   0x0200
-
 #define JK_OPT_FWDDIRS  0x0008
 /* Forward local instead remote address */
 #define JK_OPT_FWDLOCAL 0x0010
@@ -246,6 +244,7 @@
 #define JK_OPT_FLUSHEADER   0x0040
 #define JK_OPT_DISABLEREUSE 0x0080
 #define JK_OPT_FWDCERTCHAIN 0x0100
+#define JK_OPT_FWDKEYSIZE   0x0200
 
 /* Check for EBCDIC systems */
 



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



svn commit: r549224 - in /tomcat/connectors/trunk/jk: native/common/jk_global.h native/common/jk_shm.c native/common/jk_types.h.in native/common/jk_util.c native/configure.in native/scripts/build/jk_c

2007-06-20 Thread rjung
Author: rjung
Date: Wed Jun 20 13:39:05 2007
New Revision: 549224

URL: http://svn.apache.org/viewvc?view=rev&rev=549224
Log:
Auto-detect correct print format for pid_t.
This fixes at least compiler warnings on Solaris.

Added:
tomcat/connectors/trunk/jk/native/scripts/build/jk_common.m4   (with props)
Modified:
tomcat/connectors/trunk/jk/native/common/jk_global.h
tomcat/connectors/trunk/jk/native/common/jk_shm.c
tomcat/connectors/trunk/jk/native/common/jk_types.h.in
tomcat/connectors/trunk/jk/native/common/jk_util.c
tomcat/connectors/trunk/jk/native/configure.in
tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml

Modified: tomcat/connectors/trunk/jk/native/common/jk_global.h
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_global.h?view=diff&rev=549224&r1=549223&r2=549224
==
--- tomcat/connectors/trunk/jk/native/common/jk_global.h (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_global.h Wed Jun 20 13:39:05 
2007
@@ -293,6 +293,7 @@
 typedef unsigned __int64 jk_uint64_t;
 #define JK_UINT64_T_FMT "I64u"
 #define JK_UINT64_T_HEX_FMT "I64x"
+#define JK_PID_T_FMT "d"
 #elif defined(AS400) || defined(NETWARE)
 typedef unsigned int jk_uint32_t;
 #define JK_UINT32_T_FMT "u"
@@ -300,6 +301,7 @@
 typedef unsigned long long jk_uint64_t;
 #define JK_UINT64_T_FMT "llu"
 #define JK_UINT64_T_HEX_FMT "llx"
+#define JK_PID_T_FMT "d"
 #else
 #include "jk_types.h"
 #endif

Modified: tomcat/connectors/trunk/jk/native/common/jk_shm.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_shm.c?view=diff&rev=549224&r1=549223&r2=549224
==
--- tomcat/connectors/trunk/jk/native/common/jk_shm.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_shm.c Wed Jun 20 13:39:05 2007
@@ -348,7 +348,7 @@
 
 if (!jk_shmem.filename) {
 jk_shmem.filename = (char *)malloc(strlen(fname) + 32);
-sprintf(jk_shmem.filename, "%s.%d", fname, (int)getpid());
+sprintf(jk_shmem.filename, "%s.%" JK_PID_T_FMT, fname, getpid());
 }
 if (!attached) {
 size_t size;

Modified: tomcat/connectors/trunk/jk/native/common/jk_types.h.in
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_types.h.in?view=diff&rev=549224&r1=549223&r2=549224
==
--- tomcat/connectors/trunk/jk/native/common/jk_types.h.in (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_types.h.in Wed Jun 20 13:39:05 
2007
@@ -53,6 +53,9 @@
 /* And JK_UINT64_T_HEX_FMT */
 @uint64_t_hex_fmt@
 
+/* And JK_PID_T_FMT */
[EMAIL PROTECTED]@
+
 #ifdef __cplusplus
 }
 #endif  /* __cplusplus */

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=diff&rev=549224&r1=549223&r2=549224
==
--- tomcat/connectors/trunk/jk/native/common/jk_util.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_util.c Wed Jun 20 13:39:05 2007
@@ -491,7 +491,7 @@
 /* Performance is no issue, because with production log levels */
 /* we only call it often, if we have a lot of errors */
 rc = snprintf(&buf[used], usable_size - used,
- "[%04d:%04d] ", getpid(), jk_gettid());
+ "[%" JK_PID_T_FMT ":%04d] ", getpid(), 
jk_gettid());
 used += rc;
 if (rc < 0 || usable_size - used < 8) {
 return 0;

Modified: tomcat/connectors/trunk/jk/native/configure.in
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/configure.in?view=diff&rev=549224&r1=549223&r2=549224
==
--- tomcat/connectors/trunk/jk/native/configure.in (original)
+++ tomcat/connectors/trunk/jk/native/configure.in Wed Jun 20 13:39:05 2007
@@ -15,6 +15,11 @@
 
 AM_INIT_AUTOMAKE(${PACKAGE}, ${VERSION})
 
+dnl
+dnl Include our own M4 macros
+dnl
+sinclude(scripts/build/jk_common.m4)
+
 AC_PATH_PROG(TEST,test,$PATH)dnl
 AC_SUBST(TEST)
 
@@ -207,6 +212,30 @@
 AC_ERROR([could not detect a 64-bit integer type])
 fi
 
+JK_CHECK_SIZEOF_EXTENDED([#include ], pid_t, 8)
+
+if test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_short"; then
+pid_t_fmt='#define JK_PID_T_FMT "hd"'
+elif test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_int"; then
+pid_t_fmt='#define JK_PID_T_FMT "d

svn commit: r549225 - in /tomcat/connectors/trunk/jk/native: common/jk_ajp12_worker.c common/jk_connect.c common/jk_lb_worker.c nt_service/jk_nt_service.c

2007-06-20 Thread rjung
Author: rjung
Date: Wed Jun 20 13:40:44 2007
New Revision: 549225

URL: http://svn.apache.org/viewvc?view=rev&rev=549225
Log:
Fix a couple of compiler warnings
related to type conversion from chars to ints
for isspace(), isdigit() etc.

Modified:
tomcat/connectors/trunk/jk/native/common/jk_ajp12_worker.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/nt_service/jk_nt_service.c

Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp12_worker.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp12_worker.c?view=diff&rev=549225&r1=549224&r2=549225
==
--- tomcat/connectors/trunk/jk/native/common/jk_ajp12_worker.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_ajp12_worker.c Wed Jun 20 
13:40:44 2007
@@ -542,7 +542,7 @@
 }
 
 name = line;
-while (isspace(*name) && *name) {
+while (isspace((int)(*name)) && *name) {
 name++; /* Skip leading white chars */
 }
 if (!*name) {   /* Empty header name */
@@ -557,7 +557,7 @@
 }
 *value = '\0';
 value++;
-while (isspace(*value) && *value) {
+while (isspace((int)(*value)) && *value) {
 value++;/* Skip leading white chars */
 }
 if (!*value) {  /* Empty header value */

Modified: tomcat/connectors/trunk/jk/native/common/jk_connect.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_connect.c?view=diff&rev=549225&r1=549224&r2=549225
==
--- tomcat/connectors/trunk/jk/native/common/jk_connect.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_connect.c Wed Jun 20 13:40:44 
2007
@@ -257,7 +257,7 @@
 
 /* Check if we only have digits in the string */
 for (x = 0; host[x] != '\0'; x++) {
-if (!isdigit(host[x]) && host[x] != '.') {
+if (!isdigit((int)(host[x])) && host[x] != '.') {
 break;
 }
 }

Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c?view=diff&rev=549225&r1=549224&r2=549225
==
--- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c Wed Jun 20 13:40:44 
2007
@@ -347,9 +347,9 @@
  id_start; id_start = strstr(id_start + 1, name)) {
 if (id_start == s->headers_values[i] ||
 id_start[-1] == ';' ||
-id_start[-1] == ',' || isspace(id_start[-1])) {
+id_start[-1] == ',' || isspace((int)id_start[-1])) {
 id_start += strlen(name);
-while (*id_start && isspace(*id_start))
+while (*id_start && isspace((int)(*id_start)))
 ++id_start;
 if (*id_start == '=' && id_start[1]) {
 /*

Modified: tomcat/connectors/trunk/jk/native/nt_service/jk_nt_service.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/nt_service/jk_nt_service.c?view=diff&rev=549225&r1=549224&r2=549225
==
--- tomcat/connectors/trunk/jk/native/nt_service/jk_nt_service.c (original)
+++ tomcat/connectors/trunk/jk/native/nt_service/jk_nt_service.c Wed Jun 20 
13:40:44 2007
@@ -382,7 +382,7 @@
 if (dst >= szTrueName + sizeof(szTrueName) - 1) {
 break;
 }
-if (!isspace(*src) && *src != '/' && *src != '\\') {
+if (!isspace((int)(*src)) && *src != '/' && *src != '\\') {
 *(dst++) = *src;
 }
 }



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



svn commit: r549522 - in /tomcat/connectors/trunk/jk/native: apache-1.3/Makefile.netware apache-1.3/Makefile.vc apache-1.3/NWGNUmakefile.mak apache-2.0/Makefile.vc apache-2.0/NWGNUmakefile apache-2.0/

2007-06-21 Thread rjung
Author: rjung
Date: Thu Jun 21 08:53:44 2007
New Revision: 549522

URL: http://svn.apache.org/viewvc?view=rev&rev=549522
Log:
Add jk_url.[ch] to the Apache build files for the various non
Unix platforms.

Modified:
tomcat/connectors/trunk/jk/native/apache-1.3/Makefile.netware
tomcat/connectors/trunk/jk/native/apache-1.3/Makefile.vc
tomcat/connectors/trunk/jk/native/apache-1.3/NWGNUmakefile.mak
tomcat/connectors/trunk/jk/native/apache-2.0/Makefile.vc
tomcat/connectors/trunk/jk/native/apache-2.0/NWGNUmakefile
tomcat/connectors/trunk/jk/native/apache-2.0/bldjk.qclsrc
tomcat/connectors/trunk/jk/native/apache-2.0/bldjk54.qclsrc

Modified: tomcat/connectors/trunk/jk/native/apache-1.3/Makefile.netware
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-1.3/Makefile.netware?view=diff&rev=549522&r1=549521&r2=549522
==
--- tomcat/connectors/trunk/jk/native/apache-1.3/Makefile.netware (original)
+++ tomcat/connectors/trunk/jk/native/apache-1.3/Makefile.netware Thu Jun 21 
08:53:44 2007
@@ -152,6 +152,7 @@
$(OBJDIR)/jk_sockbuf.o \
$(OBJDIR)/jk_status.o \
$(OBJDIR)/jk_uri_worker_map.o \
+   $(OBJDIR)/jk_url.o \
$(OBJDIR)/jk_util.o \
$(OBJDIR)/jk_worker.o
 

Modified: tomcat/connectors/trunk/jk/native/apache-1.3/Makefile.vc
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-1.3/Makefile.vc?view=diff&rev=549522&r1=549521&r2=549522
==
--- tomcat/connectors/trunk/jk/native/apache-1.3/Makefile.vc (original)
+++ tomcat/connectors/trunk/jk/native/apache-1.3/Makefile.vc Thu Jun 21 
08:53:44 2007
@@ -41,6 +41,7 @@
[EMAIL PROTECTED] "$(INTDIR)\jk_sockbuf.obj"
[EMAIL PROTECTED] "$(INTDIR)\jk_status.obj"
[EMAIL PROTECTED] "$(INTDIR)\jk_uri_worker_map.obj"
+   [EMAIL PROTECTED] "$(INTDIR)\jk_url.obj"
[EMAIL PROTECTED] "$(INTDIR)\jk_util.obj"
[EMAIL PROTECTED] "$(INTDIR)\jk_worker.obj"
[EMAIL PROTECTED] "$(INTDIR)\mod_jk.obj"
@@ -79,6 +80,7 @@
"$(INTDIR)\jk_sockbuf.obj" \
"$(INTDIR)\jk_status.obj" \
"$(INTDIR)\jk_uri_worker_map.obj" \
+   "$(INTDIR)\jk_url.obj" \
"$(INTDIR)\jk_util.obj" \
"$(INTDIR)\jk_worker.obj" \
"$(INTDIR)\mod_jk.obj"
@@ -228,6 +230,12 @@
 SOURCE=..\common\jk_uri_worker_map.c
 
 "$(INTDIR)\jk_uri_worker_map.obj" : $(SOURCE) "$(INTDIR)"
+   $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\common\jk_url.c
+
+"$(INTDIR)\jk_url.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
 
 

Modified: tomcat/connectors/trunk/jk/native/apache-1.3/NWGNUmakefile.mak
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-1.3/NWGNUmakefile.mak?view=diff&rev=549522&r1=549521&r2=549522
==
--- tomcat/connectors/trunk/jk/native/apache-1.3/NWGNUmakefile.mak (original)
+++ tomcat/connectors/trunk/jk/native/apache-1.3/NWGNUmakefile.mak Thu Jun 21 
08:53:44 2007
@@ -197,6 +197,7 @@
$(OBJDIR)/jk_sockbuf.o \
$(OBJDIR)/jk_status.o \
$(OBJDIR)/jk_uri_worker_map.o \
+   $(OBJDIR)/jk_url.o \
$(OBJDIR)/jk_util.o \
$(OBJDIR)/jk_worker.o \
$(EOLIST)

Modified: tomcat/connectors/trunk/jk/native/apache-2.0/Makefile.vc
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-2.0/Makefile.vc?view=diff&rev=549522&r1=549521&r2=549522
==
--- tomcat/connectors/trunk/jk/native/apache-2.0/Makefile.vc (original)
+++ tomcat/connectors/trunk/jk/native/apache-2.0/Makefile.vc Thu Jun 21 
08:53:44 2007
@@ -44,6 +44,7 @@
[EMAIL PROTECTED] "$(INTDIR)\jk_sockbuf.obj"
[EMAIL PROTECTED] "$(INTDIR)\jk_status.obj"
[EMAIL PROTECTED] "$(INTDIR)\jk_uri_worker_map.obj"
+   [EMAIL PROTECTED] "$(INTDIR)\jk_url.obj"
[EMAIL PROTECTED] "$(INTDIR)\jk_util.obj"
[EMAIL PROTECTED] "$(INTDIR)\jk_worker.obj"
[EMAIL PROTECTED] "$(INTDIR)\mod_jk.obj"
@@ -82,6 +83,7 @@
"$(INTDIR)\jk_sockbuf.obj" \
"$(INTDIR)\jk_status.obj" \
"$(INTDIR)\jk_uri_worker_map.obj" \
+   "$(INTDIR)\jk_url.obj" \
"$(INTDIR)\jk_util.obj" \
"$(INTDIR)\jk_worker.obj" \
"$(INTDIR)\mod_jk.obj"
@@ -230,6 +232,12 @@
 SOURCE=..\common\jk_uri_worker_map.c
 
 "$(INTDIR)\jk_uri_worker_map.obj" : $(S

svn commit: r549841 - /tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c

2007-06-22 Thread rjung
Author: rjung
Date: Fri Jun 22 08:22:47 2007
New Revision: 549841

URL: http://svn.apache.org/viewvc?view=rev&rev=549841
Log:
Fix compiler waring.

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

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=diff&rev=549841&r1=549840&r2=549841
==
--- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Fri Jun 22 
08:22:47 2007
@@ -1377,7 +1377,7 @@
 if (ae->left_bytes_to_send > 0) {
 int len = AJP13_MAX_SEND_BODY_SZ;
 if (ae->left_bytes_to_send < (jk_uint64_t)AJP13_MAX_SEND_BODY_SZ) {
-len = ae->left_bytes_to_send;
+len = (int)ae->left_bytes_to_send;
 }
 if ((len = ajp_read_into_msg_buff(ae, s, op->post, len, l)) < 0) {
 /* the browser stop sending data, no need to recover */



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



svn commit: r549854 - in /tomcat/connectors/trunk/jk/native: apache-1.3/mod_jk.c apache-2.0/mod_jk.c

2007-06-22 Thread rjung
Author: rjung
Date: Fri Jun 22 08:52:47 2007
New Revision: 549854

URL: http://svn.apache.org/viewvc?view=rev&rev=549854
Log:
Make order of option processing a little more logic.

Modified:
tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c
tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c

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=diff&rev=549854&r1=549853&r2=549854
==
--- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Fri Jun 22 08:52:47 
2007
@@ -1723,10 +1723,7 @@
 return ap_pstrcat(cmd->pool, "JkOptions: Illegal option '-", w,
"': ForwardURI* options can not be disabled", 
NULL);
 
-if (!strcasecmp(w, "ForwardKeySize")) {
-opt = JK_OPT_FWDKEYSIZE;
-}
-else if (!strcasecmp(w, "ForwardURICompat")) {
+if (!strcasecmp(w, "ForwardURICompat")) {
 opt = JK_OPT_FWDURICOMPAT;
 mask = JK_OPT_FWDURIMASK;
 }
@@ -1759,6 +1756,9 @@
 }
 else if (!strcasecmp(w, "ForwardSSLCertChain")) {
 opt = JK_OPT_FWDCERTCHAIN;
+}
+else if (!strcasecmp(w, "ForwardKeySize")) {
+opt = JK_OPT_FWDKEYSIZE;
 }
 else
 return ap_pstrcat(cmd->pool, "JkOptions: Illegal option '", w,

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=diff&rev=549854&r1=549853&r2=549854
==
--- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Fri Jun 22 08:52:47 
2007
@@ -1754,10 +1754,7 @@
 return apr_pstrcat(cmd->pool, "JkOptions: Illegal option '-", w,
"': ForwardURI* options can not be disabled", 
NULL);
 
-if (!strcasecmp(w, "ForwardKeySize")) {
-opt = JK_OPT_FWDKEYSIZE;
-}
-else if (!strcasecmp(w, "ForwardURICompat")) {
+if (!strcasecmp(w, "ForwardURICompat")) {
 opt = JK_OPT_FWDURICOMPAT;
 mask = JK_OPT_FWDURIMASK;
 }
@@ -1790,6 +1787,9 @@
 }
 else if (!strcasecmp(w, "ForwardSSLCertChain")) {
 opt = JK_OPT_FWDCERTCHAIN;
+}
+else if (!strcasecmp(w, "ForwardKeySize")) {
+opt = JK_OPT_FWDKEYSIZE;
 }
 else
 return apr_pstrcat(cmd->pool, "JkOptions: Illegal option '", w,



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



svn commit: r549851 - /tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c

2007-06-22 Thread rjung
Author: rjung
Date: Fri Jun 22 08:45:10 2007
New Revision: 549851

URL: http://svn.apache.org/viewvc?view=rev&rev=549851
Log:
Revert r544137 (Mladen's unescape and normalization
patch for Apache).
We will enforce URL safety by reencoding using JFCs
copy from mod_proxy.
Apache and Netscape do decoding and normalization themselves,
so we don't need to do it a second time before matching
the forwarding rules.
We will use parts of this in a coming patch to optionally
reject URLs which might be malicious to bad backends.

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

Modified: tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c?view=diff&rev=549851&r1=549850&r2=549851
==
--- tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c Fri Jun 22 
08:45:10 2007
@@ -36,8 +36,6 @@
 #define JK_STRCMP   strcmp
 #define JK_STRNCMP  strncmp
 #endif
-#define BAD_REQUEST -1
-#define BAD_PATH-2
 
 
 static const char *uri_worker_map_source_type[] = {
@@ -49,116 +47,6 @@
 NULL
 };
 
-#define JK_ISXDIGIT(x) isxdigit((int)(unsigned char)((x)))
-
-static char x2c(const char *what)
-{
-register char digit;
-
-digit = ((what[0] >= 'A') ?
- ((what[0] & 0xdf) - 'A') + 10 : (what[0] - '0'));
-digit *= 16;
-digit += ((what[1] >= 'A') ?
-  ((what[1] & 0xdf) - 'A') + 10 : (what[1] - '0'));
-return (digit);
-}
-
-static int unescape_url(char *url)
-{
-register int x, y, badesc, badpath;
-
-badesc = 0;
-badpath = 0;
-for (x = 0, y = 0; url[y]; ++x, ++y) {
-if (url[y] != '%')
-url[x] = url[y];
-else {
-if (!JK_ISXDIGIT(url[y + 1]) || !JK_ISXDIGIT(url[y + 2])) {
-badesc = 1;
-url[x] = '%';
-}
-else {
-url[x] = x2c(&url[y + 1]);
-y += 2;
-if (url[x] == '/' || url[x] == '\0')
-badpath = 1;
-}
-}
-}
-url[x] = '\0';
-if (badesc)
-return BAD_REQUEST;
-else if (badpath)
-return BAD_PATH;
-else
-return 0;
-}
-
-static void normalize_url(char *name)
-{
-int l, w;
-
-/* Four paseses, as per RFC 1808 */
-/* 1. remove ./ path segments */
-
-for (l = 0, w = 0; name[l] != '\0';) {
-if (name[l] == '.' && name[l + 1] == '/'
-&& (l == 0 || name[l - 1] == '/'))
-l += 2;
-else
-name[w++] = name[l++];
-}
-
-/* 2. remove trailing . path, segment */
-if (w == 1 && name[0] == '.')
-w--;
-else if (w > 1 && name[w - 1] == '.' && name[w - 2] == '/')
-w--;
-name[w] = '\0';
-
-/* 3. remove all xx/../ segments. (including leading ../ and /../) */
-l = 0;
-
-while (name[l] != '\0') {
-if (name[l] == '.' && name[l + 1] == '.' && name[l + 2] == '/' &&
-(l == 0 || name[l - 1] == '/')) {
-register int m = l + 3, n;
-
-l = l - 2;
-if (l >= 0) {
-while (l >= 0 && name[l] != '/')
-l--;
-l++;
-}
-else
-l = 0;
-n = l;
-while ((name[n] = name[m]) != '\0') {
-n++;
-m++;
-}
-}
-else
-++l;
-}
-
-/* 4. remove trailing xx/.. segment. */
-if (l == 2 && name[0] == '.' && name[1] == '.')
-name[0] = '\0';
-else if (l > 2 && name[l - 1] == '.' && name[l - 2] == '.'
- && name[l - 3] == '/') {
-l = l - 4;
-if (l >= 0) {
-while (l >= 0 && name[l] != '/')
-l--;
-l++;
-}
-else
-l = 0;
-name[l] = '\0';
-}
-}
-
 
 /* Return the string representation of the uwr source */
 const char *uri_worker_map_get_source(uri_worker_record_t *uwr, jk_logger_t *l)
@@ -647,7 +535,6 @@
   const char *uri, jk_logger_t *l)
 {
 unsigned int i;
-int rc;
 const char *rv = NULL;
 char  url[JK_MAX_URI_LEN+1];
 
@@ -691,22 +578,6 @@
 url[i] = uri[i];
 }
 url[i] = '\0

svn commit: r549857 - in /tomcat/connectors/trunk/jk/native: apache-1.3/mod_jk.c apache-2.0/mod_jk.c common/jk_url.c common/jk_url.h iis/Makefile.amd64 iis/Makefile.ia64 iis/Makefile.x86 iis/isapi.dsp

2007-06-22 Thread rjung
Author: rjung
Date: Fri Jun 22 09:00:23 2007
New Revision: 549857

URL: http://svn.apache.org/viewvc?view=rev&rev=549857
Log:
Update jk_canonenc and add it to IIS and Netscape.

- Remove unnecessary parts from the Apache reencoding port.
  Those parts will become outdated and keeping them in the source
  suggests they are well maintained.
  Streamline jk_canonenc, in contrary to it's httpd origins,
  we only use it in the reverse proxy case.

- Change the contract for jk_canonenc to make it better suited to
  be used by all web servers:
  - the length parameter now gives the maximum length to use
for the encoded URL
  - the original URL needs to be '\0'-terminated.
  - We now set a return value, indicating if the new URL got to large

- Add proxy encoding to IIS (new default)
  and netscape (no choice).
- Add jk_url to the IIS build files

- Add forwarding debug logging to IIS and Netscape,
  to make checking the URL reencoding easier.

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_url.c
tomcat/connectors/trunk/jk/native/common/jk_url.h
tomcat/connectors/trunk/jk/native/iis/Makefile.amd64
tomcat/connectors/trunk/jk/native/iis/Makefile.ia64
tomcat/connectors/trunk/jk/native/iis/Makefile.x86
tomcat/connectors/trunk/jk/native/iis/isapi.dsp
tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c
tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c

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=diff&rev=549857&r1=549856&r2=549857
==
--- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Fri Jun 22 09:00:23 
2007
@@ -612,10 +612,9 @@
 break;
 
 case JK_OPT_FWDURIPROXY:
-size = strlen(r->uri);
-s->req_uri = ap_palloc(r->pool, size * 3 + 1);
-jk_canonenc(s->req_uri, r->uri, size, enc_path, 0,
-JK_PROXYREQ_REVERSE);
+size = 3 * strlen(r->uri) + 1;
+s->req_uri = ap_palloc(r->pool, size);
+jk_canonenc(r->uri, s->req_uri, size);
 break;
 
 case JK_OPT_FWDURIESCAPED:

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=diff&rev=549857&r1=549856&r2=549857
==
--- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Fri Jun 22 09:00:23 
2007
@@ -640,10 +640,9 @@
 break;
 
 case JK_OPT_FWDURIPROXY:
-size = strlen(r->uri);
-s->req_uri = apr_palloc(r->pool, size * 3 + 1);
-jk_canonenc(s->req_uri, r->uri, size, enc_path, 0, 
-JK_PROXYREQ_REVERSE);
+size = 3 * strlen(r->uri) + 1;
+s->req_uri = apr_palloc(r->pool, size);
+jk_canonenc(r->uri, s->req_uri, size);
 break;
 
 case JK_OPT_FWDURIESCAPED:

Modified: tomcat/connectors/trunk/jk/native/common/jk_url.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_url.c?view=diff&rev=549857&r1=549856&r2=549857
==
--- tomcat/connectors/trunk/jk/native/common/jk_url.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_url.c Fri Jun 22 09:00:23 2007
@@ -16,7 +16,7 @@
  */
 
 /***
- * Description: URL manupilation subroutines. (ported from mod_proxy). *
+ * Description: URL manipulation subroutines. (ported from mod_proxy). *
  * Version: $Revision: 531816 $*
  ***/
 
@@ -35,61 +35,6 @@
 #define JK_ISALNUM(x)  isalnum((int)(unsigned char)((x)))
 #endif
 
-/* already called in the knowledge that the characters are hex digits */
-static  int jk_hex2c(const char *x)
-{
-int i, ch;
-
-#if !CHARSET_EBCDIC
-ch = x[0];
-if (JK_ISDIGIT(ch)) {
-i = ch - '0';
-}
-else if (JK_ISUPPER(ch)) {
-i = ch - ('A' - 10);
-}
-else {
-i = ch - ('a' - 10);
-}
-i <<= 4;
-
-ch = x[1];
-if (JK_ISDIGIT(ch)) {
-i += ch - '0';
-}
-else if (JK_ISUPPER(ch)) {
-i += ch - ('A' - 10);
-}
-else {
-i += ch - ('a' - 10);
-}
-return i;
-#else /*CHARSET_EBCDIC*/
-/*
- * we ass

svn commit: r549889 - /tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c

2007-06-22 Thread rjung
Author: rjung
Date: Fri Jun 22 10:25:52 2007
New Revision: 549889

URL: http://svn.apache.org/viewvc?view=rev&rev=549889
Log:
Fix compilation errors for Netscape
related to new reject_unsafe feature.

Modified:
tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c

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=549889&r1=549888&r2=549889
==
--- tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c (original)
+++ tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c Fri Jun 22 
10:25:52 2007
@@ -30,10 +30,11 @@
 #include "jk_service.h"
 #include "jk_worker.h"
 #include "jk_shm.h"
+#include "jk_url.h"
 
 #define URI_PATTERN "path"
 #define DEFAULT_WORKER_NAME ("ajp13")
-#define REJECT_UNSAFE_TAG   ("reject_unsafe")
+#define REJECT_UNSAFE_TAG   "reject_unsafe"
 
 #define STRNULL_FOR_NULL(x) ((x) ? (x) : "(null)")
 
@@ -229,7 +230,7 @@
 char *log_level_str = pblock_findval(JK_LOG_LEVEL_TAG, pb);
 char *log_file = pblock_findval(JK_LOG_FILE_TAG, pb);
 char *shm_file = pblock_findval(JK_SHM_FILE_TAG, pb);
-char *reject_unsafe = pblock_findval(JK_REJECT_UNSAFE_TAG, pb);
+char *reject_unsafe = pblock_findval(REJECT_UNSAFE_TAG, pb);
 
 int rc = REQ_ABORTED;
 
@@ -384,6 +385,7 @@
jk_ws_service_t *s)
 {
 char *tmp;
+int size;
 int rc;
 
 s->route = NULL;



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



svn commit: r549885 - in /tomcat/connectors/trunk/jk: native/apache-1.3/ native/apache-2.0/ native/common/ native/iis/ native/netscape/ xdocs/miscellaneous/ xdocs/reference/ xdocs/webserver_howto/

2007-06-22 Thread rjung
Author: rjung
Date: Fri Jun 22 10:17:40 2007
New Revision: 549885

URL: http://svn.apache.org/viewvc?view=rev&rev=549885
Log:
New option RejectUnsafeURI (Apache),
resp. reject_unsafe (IIS, Netscape)

This will block all URLs, which contain percent signs '%'
or backslashes '\' after URL decoding.
Most web apps do not use such URLs. Using the option, one
can block several well known URL encoding attacks.
By default, this option is not set.
For Apache httpd one could also realize such a check with
mod_rewrite, which is more powerful. Our method works for all
supported web servers.

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_global.h
tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c
tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.h
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
tomcat/connectors/trunk/jk/xdocs/reference/apache.xml
tomcat/connectors/trunk/jk/xdocs/reference/iis.xml
tomcat/connectors/trunk/jk/xdocs/webserver_howto/apache.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=diff&rev=549885&r1=549884&r2=549885
==
--- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Fri Jun 22 10:17:40 
2007
@@ -1759,6 +1759,9 @@
 else if (!strcasecmp(w, "ForwardKeySize")) {
 opt = JK_OPT_FWDKEYSIZE;
 }
+else if (!strcasecmp(w, "RejectUnsafeURI")) {
+opt = JK_OPT_REJECTUNSAFE;
+}
 else
 return ap_pstrcat(cmd->pool, "JkOptions: Illegal option '", w,
   "'", NULL);
@@ -1857,7 +1860,6 @@
 
 /*
  * JkAutoMount specifies that the list of handled URLs must be
- * JkAutoMount specifies that the list of handled URLs must be
  * asked to the servlet engine (autoconf feature)
  */
 {"JkAutoMount", jk_automount_context, NULL, RSRC_CONF, TAKE12,
@@ -2531,10 +2533,15 @@

&jk_module);
 open_jk_log(srv, p);
 if (sconf) {
+sconf->options &= ~sconf->exclude_options;
 if (!uri_worker_map_alloc(&(sconf->uw_map),
   sconf->uri_to_context, sconf->log))
 jk_error_exit(APLOG_MARK, APLOG_EMERG, srv,
   p, "Memory error");
+if (sconf->options & JK_OPT_REJECTUNSAFE)
+sconf->uw_map->reject_unsafe = 1;
+else
+sconf->uw_map->reject_unsafe = 0;
 if (sconf->mount_file) {
 sconf->uw_map->fname = sconf->mount_file;
 sconf->uw_map->reload = sconf->mount_file_reload;
@@ -2547,7 +2554,6 @@
 ap_log_error(APLOG_MARK, APLOG_ERR, srv,
  "JkRequestLogFormat format array NULL");
 }
-sconf->options &= ~sconf->exclude_options;
 if (sconf->envvars_in_use) {
 int i;
 const array_header *arr;

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=diff&rev=549885&r1=549884&r2=549885
==
--- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Fri Jun 22 10:17:40 
2007
@@ -1790,6 +1790,9 @@
 else if (!strcasecmp(w, "ForwardKeySize")) {
 opt = JK_OPT_FWDKEYSIZE;
 }
+else if (!strcasecmp(w, "RejectUnsafeURI")) {
+opt = JK_OPT_REJECTUNSAFE;
+}
 else
 return apr_pstrcat(cmd->pool, "JkOptions: Illegal option '", w,
"'", NULL);
@@ -2825,10 +2828,15 @@
 if (open_jklog(srv, pconf))
 return HTTP_INTERNAL_SERVER_ERROR;
 if (sconf) {
+sconf->options &= ~sconf->exclude_options;
 if (!uri_worker_map_alloc(&(sconf->uw_map),
   sconf->uri_to_context, 
sconf->log))
 jk_error_exit(APLOG

svn commit: r549876 - in /tomcat/connectors/trunk/jk/xdocs: miscellaneous/changelog.xml reference/apache.xml reference/iis.xml webserver_howto/apache.xml

2007-06-22 Thread rjung
Author: rjung
Date: Fri Jun 22 09:52:35 2007
New Revision: 549876

URL: http://svn.apache.org/viewvc?view=rev&rev=549876
Log:
Update docs concerning URI forwarding encoding.
Also added some lines about auth_complete and a new
section for uri_select to the IIS docs.

Modified:
tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
tomcat/connectors/trunk/jk/xdocs/reference/apache.xml
tomcat/connectors/trunk/jk/xdocs/reference/iis.xml
tomcat/connectors/trunk/jk/xdocs/webserver_howto/apache.xml

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=549876&r1=549875&r2=549876
==
--- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Fri Jun 22 
09:52:35 2007
@@ -28,6 +28,17 @@
   
 
   
+  IIS: Document auth_complete and uri_select. (rjung)
+  
+  
+  Apache/IIS/Netscape: Change the default forwarding encoding to the new
+  proxy method. (jfclere, rjung)
+  
+  
+  Common: Optionally reencode URIs before forwarding to the backend.
+  Based on the URI reencoding done bei httpd mod_proxy. (jfclere, rjung)
+  
+  
   Common: auto-detect correct print format for pid_t.
   This fixes at least compiler warnings on Solaris. (rjung)
   

Modified: tomcat/connectors/trunk/jk/xdocs/reference/apache.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/reference/apache.xml?view=diff&rev=549876&r1=549875&r2=549876
==
--- tomcat/connectors/trunk/jk/xdocs/reference/apache.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/reference/apache.xml Fri Jun 22 09:52:35 
2007
@@ -222,8 +222,9 @@
 
 This directive can be used multiple times per virtual server.
 
-The default value is "ForwardURICompatUnparsed" since version 1.2.23.
-Until version 1.2.22 the default value was "ForwardURICompat".
+The default value is "ForwardURIProxy" since version 1.2.24.
+It was "ForwardURICompatUnparsed" in version 1.2.23 and
+"ForwardURICompat" until version 1.2.22.
 
 
 Adds a name and an optional default value of environment variable
@@ -429,11 +430,14 @@
 
 
 
-The three following options +ForwardURIxxx are mutually exclusive.
+The four following options +ForwardURIxxx are mutually exclusive.
 Exactly one of them is required, a negative sign prefix is not allowed with 
them.
-The default value is "ForwardURICompatUnparsed" since version 1.2.23.
-Until version 1.2.22 the default value was "ForwardURICompat".
+The default value is "ForwardURIProxy" since version 1.2.24.
+It was "ForwardURICompatUnparsed" in version 1.2.23 and
+"ForwardURICompat" until version 1.2.22.
 You can turn the default off by switching on one of the other two options.
+You should leave this at it's default value, unless you have a very good
+reason to change it.
 
 
 
@@ -450,8 +454,22 @@
 
 
 
+Using JkOptions ForwardURIProxy, the forwarded URI
+will be partially reencoded after processing inside Apache httpd and
+before forwarding to Tomcat. This will be compatible with local
+URL manipulation by mod_rewrite and with URL encoded session ids.
+
+
+  JkOptions +ForwardURIProxy
+
+
+
+
+
+
+
 Using JkOptions ForwardURICompatUnparsed, the forwarded URI
-will be unparsed. It's spec compliant and also the safest option.
+will be unparsed. It's spec compliant and secure.
 It will always forward the original request URI, so rewriting
 URIs with mod_rewrite and then forwarding the rewritten URI
 will not work.

Modified: tomcat/connectors/trunk/jk/xdocs/reference/iis.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/reference/iis.xml?view=diff&rev=549876&r1=549875&r2=549876
==
--- tomcat/connectors/trunk/jk/xdocs/reference/iis.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/reference/iis.xml Fri Jun 22 09:52:35 2007
@@ -99,7 +99,50 @@
 
 This directive has been added in version 1.2.21
 
-
+
+A DWORD value representing "0" or "1". This is needed because
+of minor incompatibilities with IIS 5.1.
+
+
+By default its value is 1, which means we use the SF_NOTIFY_AUTH_COMPLETE
+event. If you set this to 0, then we use SF_NOTIFY_PREPROC_HEADERS.
+This might be needed for IIS 5.1 when handling requests using the
+PUT HTTP method.
+
+This directive has been added in version 1.2.21
+
+
+A string value which influences, how URIs are decoded and reencoded
+between IIS and Tomcat. You should leave this at it's default value,
+unless you have a 

svn commit: r550203 - 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-06-24 Thread rjung
Author: rjung
Date: Sun Jun 24 03:33:27 2007
New Revision: 550203

URL: http://svn.apache.org/viewvc?view=rev&rev=550203
Log:
Common: Refactored and unified jk_map_read_prop* and jk_map_load_prop*
for all use cases.

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=diff&rev=550203&r1=550202&r2=550203
==
--- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Sun Jun 24 03:33:27 
2007
@@ -1822,7 +1822,8 @@
 (jk_server_conf_t *) ap_get_module_config(s->module_config,
   &jk_module);
 
-if (jk_map_read_property(conf->worker_properties, line, 1, conf->log) == 
JK_FALSE)
+if (jk_map_read_property(conf->worker_properties, line,
+ JK_MAP_HANDLE_DUPLICATES, conf->log) == JK_FALSE)
 return ap_pstrcat(cmd->temp_pool, "Invalid JkWorkerProperty ", line, 
NULL);
 
 return NULL;
@@ -2628,7 +2629,8 @@
 */
 
 if ((conf->worker_file != NULL) &&
-!jk_map_read_properties(init_map, conf->worker_file, NULL, 1, 
conf->log)) {
+!jk_map_read_properties(init_map, conf->worker_file, NULL,
+JK_MAP_HANDLE_DUPLICATES, conf->log)) {
 jk_error_exit(APLOG_MARK, APLOG_EMERG | APLOG_NOERRNO, s, p,
   "Error in reading worker properties from '%s'",
   conf->worker_file);

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=diff&rev=550203&r1=550202&r2=550203
==
--- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Sun Jun 24 03:33:27 
2007
@@ -1859,7 +1859,8 @@
 return err_string;
 }
 
-if (jk_map_read_property(conf->worker_properties, line, 1, conf->log) == 
JK_FALSE)
+if (jk_map_read_property(conf->worker_properties, line,
+ JK_MAP_HANDLE_DUPLICATES, conf->log) == JK_FALSE)
 return apr_pstrcat(cmd->temp_pool, "Invalid JkWorkerProperty ", line, 
NULL);
 
 return NULL;
@@ -2746,7 +2747,8 @@
 jk_set_worker_def_cache_size(mpm_threads);
 
 if ((conf->worker_file != NULL) &&
-!jk_map_read_properties(init_map, conf->worker_file, NULL, 1, 
conf->log)) {
+!jk_map_read_properties(init_map, conf->worker_file, NULL,
+JK_MAP_HANDLE_DUPLICATES, conf->log)) {
 ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
  "Error in reading worker properties from '%s'",
  conf->worker_file);

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=diff&rev=550203&r1=550202&r2=550203
==
--- tomcat/connectors/trunk/jk/native/common/jk_map.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_map.c Sun Jun 24 03:33:27 2007
@@ -395,7 +395,66 @@
 return rc;
 }
 
-int jk_map_read_property(jk_map_t *m, const char *str, int allow_duplicates, 
jk_logger_t *l)
+
+static int jk_map_validate_property(char *prp, jk_logger_t *l)
+{
+int off = (int)strlen(prp) - (int)JK_MAP_REFERENCE_SZ;
+/* check the worker properties */
+if (off <= 0 || strncmp(&prp[off], JK_MAP_REFERENCE, JK_MAP_REFERENCE_SZ) 
) {
+if (!jk_is_valid_property(prp)) {
+jk_log(l, JK_LOG_ERROR,
+   "The attribute '%s' is not supported - please check"
+   " the documentation for the supported attributes.",
+   prp);
+return JK_FALSE;
+}
+if (jk_is_deprecated_property(prp)) {
+jk_log(l, JK_LOG_WARNING,
+   "The attribute '%s' is d

svn commit: r550213 - in /tomcat/connectors/trunk/jk: native/apache-1.3/mod_jk.c native/apache-2.0/mod_jk.c native/common/jk_logger.h native/common/jk_util.c xdocs/miscellaneous/changelog.xml

2007-06-24 Thread rjung
Author: rjung
Date: Sun Jun 24 04:51:21 2007
New Revision: 550213

URL: http://svn.apache.org/viewvc?view=rev&rev=550213
Log:
Make writing log lines and line endings more atomic.
This should prevent corrupt log lines
and should also be a little more efficient,
since we spare a couple of I/Os.

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_logger.h
tomcat/connectors/trunk/jk/native/common/jk_util.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=diff&rev=550213&r1=550212&r2=550213
==
--- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Sun Jun 24 04:51:21 
2007
@@ -2381,29 +2381,23 @@
 return overrides;
 }
 
-static int JK_METHOD jk_log_to_file(jk_logger_t *l,
-int level, const char *what)
+static int JK_METHOD jk_log_to_file(jk_logger_t *l, int level,
+int used, char *what)
 {
 if (l &&
 (l->level <= level || level == JK_LOG_REQUEST_LEVEL) &&
- l->logger_private && what) {
+ l->logger_private && what && used > 0) {
 jk_file_logger_t *flp = l->logger_private;
 int log_fd = flp->log_fd;
-size_t sz = strlen(what);
-if (log_fd >= 0 && sz) {
-if (write(log_fd, what, sz) < 0 ) {
+if (log_fd >= 0) {
+#if defined(WIN32)
+what[used++] = '\r';
+#endif
+what[used++] = '\n';
+if (write(log_fd, what, used) < 0 ) {
 ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, NULL,
  "mod_jk: jk_log_to_file %s failed",
  what);
-}
-else {
-char c;
-#if defined(WIN32)
-c = '\r';
-write(log_fd, &c, 1);
-#endif
-c = '\n';
-write(log_fd, &c, 1);
 }
 }
 

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=diff&rev=550213&r1=550212&r2=550213
==
--- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Sun Jun 24 04:51:21 
2007
@@ -2512,43 +2512,40 @@
 return overrides;
 }
 
-static int JK_METHOD jk_log_to_file(jk_logger_t *l,
-int level, const char *what)
+static int JK_METHOD jk_log_to_file(jk_logger_t *l, int level,
+int used, char *what)
 {
 if (l &&
 (l->level <= level || level == JK_LOG_REQUEST_LEVEL) &&
-l->logger_private && what) {
-unsigned sz = strlen(what);
-apr_size_t wrote = sz;
-char error[256];
-if (sz) {
-apr_status_t status;
-jk_file_logger_t *p = l->logger_private;
-if (p->jklogfp) {
-apr_status_t rv;
-rv = apr_global_mutex_lock(jk_log_lock);
-if (rv != APR_SUCCESS) {
-ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL,
- "apr_global_mutex_lock(jk_log_lock) failed");
-/* XXX: Maybe this should be fatal? */
-}
-status = apr_file_write(p->jklogfp, what, &wrote);
-if (status != APR_SUCCESS) {
-apr_strerror(status, error, 254);
-ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
- "mod_jk: jk_log_to_file %s failed: %s",
- what, error);
-}
+l->logger_private && what && used > 0) {
+jk_file_logger_t *p = l->logger_private;
+if (p->jklogfp) {
+apr_status_t rv;
+apr_size_t wrote;
+rv = apr_global_mutex_lock(jk_log_lock);
+if (rv != APR_SUCCESS) {
+ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL,
+ "apr_global_mutex_lock(jk_log_lock) failed");
+/* XXX: Maybe this should be fatal? */
+}
 #if defined(WIN32)
-apr_file_putc('\r', p->jklogfp);
+what[used++] = '\r';
 #e

svn commit: r550221 - in /tomcat/connectors/trunk/jk: native/common/jk_ajp_common.c native/common/jk_ajp_common.h xdocs/miscellaneous/changelog.xml xdocs/reference/workers.xml

2007-06-24 Thread rjung
Author: rjung
Date: Sun Jun 24 06:10:07 2007
New Revision: 550221

URL: http://svn.apache.org/viewvc?view=rev&rev=550221
Log:
- Common: Add recovery options for recovering idempotent http methods
  HEAD and GET.
- Correct documentation for worker attributes retries and
  recovery_options.

Modified:
tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c
tomcat/connectors/trunk/jk/native/common/jk_ajp_common.h
tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
tomcat/connectors/trunk/jk/xdocs/reference/workers.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=diff&rev=550221&r1=550220&r2=550221
==
--- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Sun Jun 24 
06:10:07 2007
@@ -1604,6 +1604,20 @@
 op->recoverable = JK_FALSE;
 }
 
+/*
+ * We revert back to recoverable, if recovery_opts allow it 
for GET or HEAD
+ */
+if (op->recoverable == JK_FALSE) {
+if (p->worker->recovery_opts & RECOVER_ALWAYS_HTTP_HEAD) {
+if (!strcmp(s->method, "HEAD"))
+op->recoverable = JK_TRUE;
+}
+else if (p->worker->recovery_opts & 
RECOVER_ALWAYS_HTTP_GET) {
+if (!strcmp(s->method, "GET"))
+op->recoverable = JK_TRUE;
+}
+}
+
 JK_TRACE_EXIT(l);
 return JK_FALSE;
 }
@@ -1630,6 +1644,21 @@
  */
 if (p->worker->recovery_opts & RECOVER_ABORT_IF_TCGETREQUEST)
 op->recoverable = JK_FALSE;
+
+/*
+ * We revert back to recoverable, if recovery_opts allow it 
for GET or HEAD
+ */
+if (op->recoverable == JK_FALSE) {
+if (p->worker->recovery_opts & RECOVER_ALWAYS_HTTP_HEAD) {
+if (!strcmp(s->method, "HEAD"))
+op->recoverable = JK_TRUE;
+}
+else if (p->worker->recovery_opts & 
RECOVER_ALWAYS_HTTP_GET) {
+if (!strcmp(s->method, "GET"))
+op->recoverable = JK_TRUE;
+}
+}
+
 /*
  * we want to display the webservers error page, therefore
  * we return JK_FALSE
@@ -1662,6 +1691,20 @@
 if (p->worker->recovery_opts & RECOVER_ABORT_IF_TCSENDHEADER)
 op->recoverable = JK_FALSE;
 
+/*
+ * We revert back to recoverable, if recovery_opts allow it 
for GET or HEAD
+ */
+if (op->recoverable == JK_FALSE) {
+if (p->worker->recovery_opts & RECOVER_ALWAYS_HTTP_HEAD) {
+if (!strcmp(s->method, "HEAD"))
+op->recoverable = JK_TRUE;
+}
+else if (p->worker->recovery_opts & 
RECOVER_ALWAYS_HTTP_GET) {
+if (!strcmp(s->method, "GET"))
+op->recoverable = JK_TRUE;
+}
+}
+
 JK_TRACE_EXIT(l);
 return JK_FALSE;
 }
@@ -1832,7 +1875,7 @@
 err = ajp_send_request(e, s, l, p, op);
 if (err == JK_TRUE) {
 
-/* If we have the no recoverable error, it's probably because
+/* If we have an unrecoverable error, it's probably because
  * the sender (browser) stopped sending data before the end
  * (certainly in a big post)
  */
@@ -1908,7 +1951,7 @@
 }
 }
 else {
-/* if we can't get reply, check if no recover flag was set
+/* if we can't get reply, check if unrecoverable flag was set
  * if is_recoverable_error is cleared, we have started
  * receiving upload data and we must consider that
  * operation is no more recoverable

Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.h
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp_common.h?view=diff&rev=550221&r1=550220&r2=550221
==
--- tomcat/co

svn commit: r550239 - in /tomcat/connectors/trunk/jk/native/common: jk_map.c jk_map.h jk_worker.c

2007-06-24 Thread rjung
Author: rjung
Date: Sun Jun 24 07:51:44 2007
New Revision: 550239

URL: http://svn.apache.org/viewvc?view=rev&rev=550239
Log:
Fix for r550203.
Also added some more debugging for the workers.properties
parsing.

Modified:
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_worker.c

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=diff&rev=550239&r1=550238&r2=550239
==
--- tomcat/connectors/trunk/jk/native/common/jk_map.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_map.c Sun Jun 24 07:51:44 2007
@@ -418,7 +418,7 @@
 return JK_TRUE;
 }
 
-static int jk_map_handle_duplicates(jk_map_t *m, const char *prp, char *v,
+static int jk_map_handle_duplicates(jk_map_t *m, const char *prp, char **v,
 int treatment, jk_logger_t *l)
 {
 const char *oldv = jk_map_get_string(m, prp, NULL);
@@ -426,7 +426,7 @@
 if ((treatment == JK_MAP_HANDLE_DUPLICATES)
 && jk_is_unique_property(prp) == JK_FALSE) {
 char *tmpv = jk_pool_alloc(&m->p,
-   strlen(v) + strlen(oldv) + 3);
+   strlen(*v) + strlen(oldv) + 3);
 if (tmpv) {
 char sep = '*';
 if (jk_is_path_property(prp))
@@ -435,16 +435,20 @@
 sep = ' ';
 else if (jk_is_list_property(prp))
 sep = ',';
-sprintf(tmpv, "%s%c%s", oldv, sep, v);
+sprintf(tmpv, "%s%c%s", oldv, sep, *v);
 }
-v = tmpv;
+*v = tmpv;
+if (JK_IS_DEBUG_LEVEL(l))
+jk_log(l, JK_LOG_DEBUG,
+   "Concatenated value is: %s -> %s",
+   prp, *v);
 return JK_FALSE;
 }
 else {
 jk_log(l, JK_LOG_WARNING,
"Duplicate key '%s' detected - previous value '%s'"
" will be overwritten with '%s'.",
-   prp, oldv ? oldv : "(null)", v ? v : "(null)");
+   prp, oldv ? oldv : "(null)", v ? *v : "(null)");
 return JK_TRUE;
 }
 }
@@ -483,10 +487,14 @@
 if (jk_map_validate_property(prp, l) == JK_FALSE)
 return JK_FALSE;
 v = jk_map_replace_properties(m, v);
-if (jk_map_handle_duplicates(m, prp, v, treatment, l) == 
JK_TRUE)
+if (jk_map_handle_duplicates(m, prp, &v, treatment, l) == 
JK_TRUE)
 v = jk_pool_strdup(&m->p, v);
 }
 if (v) {
+if (JK_IS_DEBUG_LEVEL(l))
+jk_log(l, JK_LOG_DEBUG,
+   "Adding property '%s' with value '%s' to map.",
+   prp, v);
 jk_map_put(m, prp, v, NULL);
 }
 else {
@@ -564,6 +572,21 @@
 }
 
 return NULL;
+}
+
+void jk_map_dump(jk_map_t *m, jk_logger_t *l)
+{
+if (m) {
+if (JK_IS_DEBUG_LEVEL(l)) {
+int s = jk_map_size(m);
+int i;
+for (i=0;i '%s'",
+   jk_map_name_at(m, i), jk_map_value_at(m, i));
+}
+}
+}
 }
 
 static void trim_prp_comment(char *prp)

Modified: tomcat/connectors/trunk/jk/native/common/jk_map.h
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_map.h?view=diff&rev=550239&r1=550238&r2=550239
==
--- tomcat/connectors/trunk/jk/native/common/jk_map.h (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_map.h Sun Jun 24 07:51:44 2007
@@ -80,6 +80,8 @@
 
 void *jk_map_value_at(jk_map_t *m, int idex);
 
+void jk_map_dump(jk_map_t *m, jk_logger_t *l);
+
 /**
  *  Replace $(property) in value.
  *

Modified: tomcat/connectors/trunk/jk/native/common/jk_worker.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_worker.c?view=diff&rev=550239&r1=550238&r2=550239
==
--- tomcat/connectors/trunk/jk/native/common/jk_worker.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_worker.c Sun Jun 24 07:51:44 
2007
@@ -62,6 +62,7 @@
 return JK_FALSE;
 }
 
+jk_map_dump(init_data, l);
 if (!jk_get_worker_list(init_data, &(we->worker_list),
 &we->num_of_workers)) {
 JK_TRACE_EXIT(l);



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



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

2007-06-24 Thread rjung
Author: rjung
Date: Sun Jun 24 07:56:17 2007
New Revision: 550241

URL: http://svn.apache.org/viewvc?view=rev&rev=550241
Log:
Renamed runtime states. No new states have been added to code.
All states have a major state (OK or ERR) and a substate.
Changed the name N/A to OK/IDLE.
Also added docs about the meaning of the states to the status worker
page in the reference guide.

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

Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c?view=diff&rev=550241&r1=550240&r2=550241
==
--- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c Sun Jun 24 07:56:17 
2007
@@ -60,7 +60,7 @@
 };
 
 static const char *lb_state_type[] = {
-JK_LB_STATE_TEXT_NA,
+JK_LB_STATE_TEXT_IDLE,
 JK_LB_STATE_TEXT_OK,
 JK_LB_STATE_TEXT_RECOVER,
 JK_LB_STATE_TEXT_BUSY,
@@ -190,8 +190,8 @@
 {
 if (!v)
 return JK_LB_STATE_DEF;
-else if  (*v == 'n' || *v == 'N' || *v == '0')
-return JK_LB_STATE_NA;
+else if  (*v == 'i' || *v == 'I' || *v == 'n' || *v == 'N' || *v == '0')
+return JK_LB_STATE_IDLE;
 else if  (*v == 'o' || *v == 'O' || *v == '1')
 return JK_LB_STATE_OK;
 else if  (*v == 'r' || *v == 'R' || *v == '2')
@@ -454,7 +454,7 @@
 non_error++;
 if (w->s->state == JK_LB_STATE_OK &&
 w->s->elected == w->s->elected_snapshot)
-w->s->state = JK_LB_STATE_NA;
+w->s->state = JK_LB_STATE_IDLE;
 }
 w->s->elected_snapshot = w->s->elected;
 }
@@ -1258,7 +1258,7 @@
 strncpy(p->lb_workers[i].s->redirect, s, JK_SHM_STR_SIZ);
 
 p->lb_workers[i].s->lb_value = 0;
-p->lb_workers[i].s->state = JK_LB_STATE_NA;
+p->lb_workers[i].s->state = JK_LB_STATE_IDLE;
 p->lb_workers[i].s->error_time = 0;
 p->lb_workers[i].s->activation =
 jk_get_worker_activation(props, worker_names[i]);

Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h?view=diff&rev=550241&r1=550240&r2=550241
==
--- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h Sun Jun 24 07:56:17 
2007
@@ -57,23 +57,23 @@
 #define JK_LB_LOCK_TEXT_OPTIMISTIC ("Optimistic")
 #define JK_LB_LOCK_TEXT_PESSIMISTIC("Pessimistic")
 #define JK_LB_LOCK_TEXT_DEF(JK_LB_LOCK_TEXT_OPTIMISTIC)
-#define JK_LB_STATE_NA (0)
+#define JK_LB_STATE_IDLE   (0)
 #define JK_LB_STATE_OK (1)
 #define JK_LB_STATE_RECOVER(2)
 #define JK_LB_STATE_BUSY   (3)
 #define JK_LB_STATE_ERROR  (4)
 #define JK_LB_STATE_FORCE  (5)
 #define JK_LB_STATE_PROBE  (6)
-#define JK_LB_STATE_DEF(JK_LB_STATE_NA)
-#define JK_LB_STATE_TEXT_NA("N/A")
+#define JK_LB_STATE_DEF(JK_LB_STATE_IDLE)
+#define JK_LB_STATE_TEXT_IDLE  ("OK/IDLE")
 #define JK_LB_STATE_TEXT_OK("OK")
-#define JK_LB_STATE_TEXT_RECOVER   ("REC")
-#define JK_LB_STATE_TEXT_BUSY  ("BSY")
+#define JK_LB_STATE_TEXT_RECOVER   ("ERR/REC")
+#define JK_LB_STATE_TEXT_BUSY  ("OK/BUSY")
 #define JK_LB_STATE_TEXT_ERROR ("ERR")
-#define JK_LB_STATE_TEXT_FORCE ("FRC")
-#define JK_LB_STATE_TEXT_PROBE ("PRB")
+#define JK_LB_STATE_TEXT_FORCE ("ERR/FRC")
+#define JK_LB_STATE_TEXT_PROBE ("ERR/PRB")
 #define JK_LB_STATE_TEXT_MAX   (JK_LB_STATE_PROBE)
-#define JK_LB_STATE_TEXT_DEF   (JK_LB_STATE_TEXT_NA)
+#define JK_LB_STATE_TEXT_DEF   (JK_LB_STATE_TEXT_IDLE)
 #define JK_LB_ACTIVATION_ACTIVE(0)
 #define JK_LB_ACTIVATION_DISABLED  (1)
 #define JK_LB_ACTIVATION_STOPPED   (2)

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

svn commit: r550245 - in /tomcat/connectors/trunk/jk: jkstatus/src/share/org/apache/jk/status/ jkstatus/test/src/share/org/apache/jk/status/ xdocs/miscellaneous/

2007-06-24 Thread rjung
Author: rjung
Date: Sun Jun 24 08:05:54 2007
New Revision: 550245

URL: http://svn.apache.org/viewvc?view=rev&rev=550245
Log:
JkStatus: Added OK/IDLE as the successor of N/A.

Modified:

tomcat/connectors/trunk/jk/jkstatus/src/share/org/apache/jk/status/JkStatusParser.java

tomcat/connectors/trunk/jk/jkstatus/src/share/org/apache/jk/status/JkStatusTask.java

tomcat/connectors/trunk/jk/jkstatus/test/src/share/org/apache/jk/status/JkStatusParserTest.java
tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml

Modified: 
tomcat/connectors/trunk/jk/jkstatus/src/share/org/apache/jk/status/JkStatusParser.java
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/jkstatus/src/share/org/apache/jk/status/JkStatusParser.java?view=diff&rev=550245&r1=550244&r2=550245
==
--- 
tomcat/connectors/trunk/jk/jkstatus/src/share/org/apache/jk/status/JkStatusParser.java
 (original)
+++ 
tomcat/connectors/trunk/jk/jkstatus/src/share/org/apache/jk/status/JkStatusParser.java
 Sun Jun 24 08:05:54 2007
@@ -127,6 +127,11 @@
  *
  *
  * 
+ * 
+ * mod_jk 1.2.24 runtime state N/A changed to OK/IDLE:
+ * 
+ *state="OK/IDLE"
+ * 
  * @author Peter Rossbach
  * @version $Revision$ $Date$
  * @since 5.5.10

Modified: 
tomcat/connectors/trunk/jk/jkstatus/src/share/org/apache/jk/status/JkStatusTask.java
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/jkstatus/src/share/org/apache/jk/status/JkStatusTask.java?view=diff&rev=550245&r1=550244&r2=550245
==
--- 
tomcat/connectors/trunk/jk/jkstatus/src/share/org/apache/jk/status/JkStatusTask.java
 (original)
+++ 
tomcat/connectors/trunk/jk/jkstatus/src/share/org/apache/jk/status/JkStatusTask.java
 Sun Jun 24 08:05:54 2007
@@ -258,7 +258,10 @@
 + " status=" + member.getStatus()
 + " host=" + member.getAddress());
 }
-if (member.getState() != null && 
!("OK".equals(member.getState()) || "N/A".equals(member.getState())) ){
+if (member.getState() != null &&
+!("OK".equals(member.getState()) ||
+  "N/A".equals(member.getState()) ||
+  "OK/IDLE".equals(member.getState())) ){
 error.append(" worker name=" + member.getName()
 + " state=" + member.getState()
 + " host=" + member.getAddress());

Modified: 
tomcat/connectors/trunk/jk/jkstatus/test/src/share/org/apache/jk/status/JkStatusParserTest.java
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/jkstatus/test/src/share/org/apache/jk/status/JkStatusParserTest.java?view=diff&rev=550245&r1=550244&r2=550245
==
--- 
tomcat/connectors/trunk/jk/jkstatus/test/src/share/org/apache/jk/status/JkStatusParserTest.java
 (original)
+++ 
tomcat/connectors/trunk/jk/jkstatus/test/src/share/org/apache/jk/status/JkStatusParserTest.java
 Sun Jun 24 08:05:54 2007
@@ -36,8 +36,8 @@
  +   ""
  +   ""
  +   ""
- +   ""
- +   ""
+ +   ""
+ +   ""
  +   ""
  +   ""
  +   ""
@@ -59,4 +59,4 @@
 assertEquals(4,balancer.getBalancerMappings().size());
}
 
-}
\ No newline at end of file
+}

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=550245&r1=550244&r2=550245
==
--- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Sun Jun 24 
08:05:54 2007
@@ -28,6 +28,9 @@
   
 
   
+  JkStatus: Added OK/IDLE as the successor of N/A. (rjung)
+  
+  
   Status worker: Renamed runtime states. All states have a major
   state (OK or ERR) and a substate. Changed the name N/A to OK/IDLE.
   Added docs about the meaning of the states to the status worker



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



svn commit: r550272 - in /tomcat/connectors/trunk/jk: native/common/ xdocs/miscellaneous/ xdocs/reference/

2007-06-24 Thread rjung
Author: rjung
Date: Sun Jun 24 11:33:33 2007
New Revision: 550272

URL: http://svn.apache.org/viewvc?view=rev&rev=550272
Log:
New load balancer attribute max_reply_timeouts, to make lb tolerant against
occasional long running requests. The counter will be decayed during
lb maintenance.
Also adjusted docs to make reply_timeout explanation more correct.

Modified:
tomcat/connectors/trunk/jk/native/common/jk_ajp13.h
tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c
tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c
tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h
tomcat/connectors/trunk/jk/native/common/jk_shm.h
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_ajp13.h
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp13.h?view=diff&rev=550272&r1=550271&r2=550272
==
--- tomcat/connectors/trunk/jk/native/common/jk_ajp13.h (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_ajp13.h Sun Jun 24 11:33:33 2007
@@ -45,6 +45,7 @@
 #define JK_CLIENT_RD_ERROR  (-6)
 #define JK_CLIENT_WR_ERROR  (-7)
 #define JK_STATUS_ERROR (-8)
+#define JK_REPLY_TIMEOUT(-9)
 
 #define AJP13_MAX_SEND_BODY_SZ  (DEF_BUFFER_SZ - 6)
 #define AJP13_DEF_TIMEOUT   (0) /* Idle timout for pooled connections 
*/

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=diff&rev=550272&r1=550271&r2=550272
==
--- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Sun Jun 24 
11:33:33 2007
@@ -1587,7 +1587,7 @@
 while (1) {
 int rc = 0;
 
-/* If we set a reply timeout, check it something is available */
+/* If we set a reply timeout, check if something is available */
 if (p->worker->reply_timeout > 0) {
 if (ajp_is_input_event(p, p->worker->reply_timeout, l) ==
 JK_FALSE) {
@@ -1619,7 +1619,7 @@
 }
 
 JK_TRACE_EXIT(l);
-return JK_FALSE;
+return JK_REPLY_TIMEOUT;
 }
 }
 
@@ -1810,7 +1810,8 @@
  jk_ws_service_t *s,
  jk_logger_t *l, int *is_error)
 {
-int i, err;
+int i;
+int err = JK_TRUE;
 ajp_operation_t oper;
 ajp_operation_t *op = &oper;
 ajp_endpoint_t *p;
@@ -1963,6 +1964,10 @@
"without recovery in send loop attempt=%d",
p->worker->name, i);
 JK_TRACE_EXIT(l);
+if (err == JK_REPLY_TIMEOUT) {
+*is_error = JK_HTTP_GATEWAY_TIME_OUT;
+return JK_REPLY_TIMEOUT;
+}
 return JK_FALSE;
 }
 jk_log(l, JK_LOG_INFO,
@@ -2022,6 +2027,10 @@
p->worker->name);
 
 JK_TRACE_EXIT(l);
+if (err == JK_REPLY_TIMEOUT) {
+*is_error = JK_HTTP_GATEWAY_TIME_OUT;
+return JK_REPLY_TIMEOUT;
+}
 return JK_FALSE;
 }
 

Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c?view=diff&rev=550272&r1=550271&r2=550272
==
--- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c Sun Jun 24 11:33:33 
2007
@@ -273,6 +273,7 @@
 p->sticky_session = p->s->sticky_session;
 p->sticky_session_force = p->s->sticky_session_force;
 p->recover_wait_time = p->s->recover_wait_time;
+p->max_reply_timeouts = p->s->max_reply_timeouts;
 p->retries = p->s->retries;
 p->lbmethod = p->s->lbmethod;
 p->lblock = p->s->lblock;
@@ -290,6 +291,7 @@
 p->s->sticky_session = p->sticky_session;
 p->s->sticky_session_force = p->sticky_session_force;
 p->s->recover_wait_time = p->recover_wait_time;
+p->s->max_reply_timeouts = p->max_reply_timeouts;
 p->s->retries = p->retries;
 p->s->lbmethod = p->lbmethod;
 p->s->lbl

svn commit: r550273 - in /tomcat/connectors/trunk/jk: jkstatus/src/share/org/apache/jk/status/JkStatusUpdateLoadbalancerTask.java xdocs/miscellaneous/changelog.xml

2007-06-24 Thread rjung
Author: rjung
Date: Sun Jun 24 11:37:53 2007
New Revision: 550273

URL: http://svn.apache.org/viewvc?view=rev&rev=550273
Log:
Added manipulation of max_reply_timeouts to jkstatus.

Modified:

tomcat/connectors/trunk/jk/jkstatus/src/share/org/apache/jk/status/JkStatusUpdateLoadbalancerTask.java
tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml

Modified: 
tomcat/connectors/trunk/jk/jkstatus/src/share/org/apache/jk/status/JkStatusUpdateLoadbalancerTask.java
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/jkstatus/src/share/org/apache/jk/status/JkStatusUpdateLoadbalancerTask.java?view=diff&rev=550273&r1=550272&r2=550273
==
--- 
tomcat/connectors/trunk/jk/jkstatus/src/share/org/apache/jk/status/JkStatusUpdateLoadbalancerTask.java
 (original)
+++ 
tomcat/connectors/trunk/jk/jkstatus/src/share/org/apache/jk/status/JkStatusUpdateLoadbalancerTask.java
 Sun Jun 24 11:37:53 2007
@@ -28,7 +28,7 @@
  * 
  * 
  * @author Peter Rossbach
- * @version $Revision:$
+ * @version $Revision$
  * @since mod_jk 1.2.20
  */
 public class JkStatusUpdateLoadbalancerTask extends AbstractJkStatusTask {
@@ -51,6 +51,7 @@

 protected int lockCode = -1;
 protected String lock;
+protected int maxReplyTimeouts = -1;
 
 /**
  * Return descriptive information about this implementation and the
@@ -199,9 +200,23 @@
}
 
/**
+* @return the maxReplyTimeouts
+*/
+   public int getMaxReplyTimeouts() {
+   return maxReplyTimeouts;
+   }
+
+   /**
+* @param maxReplyTimeouts the maxReplyTimeouts to set
+*/
+   public void setMaxReplyTimeouts(int maxReplyTimeouts) {
+   this.maxReplyTimeouts = maxReplyTimeouts;
+   }
+
+   /**
  * Create JkStatus worker update link
  * 
- * 
http://localhost/jkstatus?cmd=update&mime=txt&w=loadbalancer&lm=1&ll=1&lr=2<=60&ls=true&lf=false
+ * 
http://localhost/jkstatus?cmd=update&mime=txt&w=loadbalancer&lm=1&ll=1&lr=2<=60&ls=true&lf=false&lx=0
  * 
  *
  * 
@@ -215,6 +230,7 @@
  * lt: recover wait timeout
  * ls: sticky session
  * lf: force sticky session
+ * lx: max reply timeouts
  * 
  * 
  * lm=1 or Requests
@@ -268,6 +284,10 @@
sb.append("&ll=");
sb.append(lock);
}
+   if (maxReplyTimeouts >= 0) {
+   sb.append("&lx=");
+   sb.append(maxReplyTimeouts);
+   }
 
 } catch (UnsupportedEncodingException e) {
 throw new BuildException("Invalid 'charset' attribute: "
@@ -284,4 +304,4 @@
 throw new BuildException("Must specify 'loadbalancer' attribute");
 }
 }
-}
\ No newline at end of file
+}

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=550273&r1=550272&r2=550273
==
--- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Sun Jun 24 
11:37:53 2007
@@ -28,6 +28,9 @@
   
 
   
+  JkStatus: Added manipulation of max_reply_timeouts. (rjung)
+  
+  
   LB, Status: Add feature max_reply_timeouts, to make lb tolerant against
   occasional long running requests. (rjung)
   



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



svn commit: r550275 - in /tomcat/connectors/trunk/jk: native/common/jk_mt.h native/common/jk_util.c xdocs/miscellaneous/changelog.xml

2007-06-24 Thread rjung
Author: rjung
Date: Sun Jun 24 12:00:08 2007
New Revision: 550275

URL: http://svn.apache.org/viewvc?view=rev&rev=550275
Log:
Handle LWP IDs as 32 Bit unsigned.
Try to make it work, although pthread IDs are opaque.
Code basically borrowed from APR.

Modified:
tomcat/connectors/trunk/jk/native/common/jk_mt.h
tomcat/connectors/trunk/jk/native/common/jk_util.c
tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml

Modified: tomcat/connectors/trunk/jk/native/common/jk_mt.h
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_mt.h?view=diff&rev=550275&r1=550274&r2=550275
==
--- tomcat/connectors/trunk/jk/native/common/jk_mt.h (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_mt.h Sun Jun 24 12:00:08 2007
@@ -28,7 +28,7 @@
 
 
 #if defined(WIN32)
-#define jk_gettid()((int)GetCurrentThreadId())
+#define jk_gettid()((jk_uint32_t)GetCurrentThreadId())
 #elif defined(NETWARE) && !defined(__NOVELL_LIBC__)
 #define getpid()   ((int)GetThreadGroupID())
 #endif
@@ -71,7 +71,7 @@
 #define JK_LEAVE_CS(x, rc)\
 if(pthread_mutex_unlock(x)) rc = JK_FALSE; else rc = JK_TRUE
 
-int jk_gettid(void);
+jk_uint32_t jk_gettid(void);
 #endif /* WIN32 */
 
 #else /* !_MT_CODE */

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=diff&rev=550275&r1=550274&r2=550275
==
--- tomcat/connectors/trunk/jk/native/common/jk_util.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_util.c Sun Jun 24 12:00:08 2007
@@ -499,7 +499,7 @@
 /* Performance is no issue, because with production log levels */
 /* we only call it often, if we have a lot of errors */
 rc = snprintf(&buf[used], usable_size - used,
- "[%" JK_PID_T_FMT ":%04d] ", getpid(), 
jk_gettid());
+ "[%" JK_PID_T_FMT ":%" JK_UINT32_T_FMT "] ", 
getpid(), jk_gettid());
 used += rc;
 if (rc < 0 || usable_size - used < 8) {
 return 0;
@@ -1697,17 +1697,27 @@
 }
 
 #ifdef _MT_CODE_PTHREAD
-int jk_gettid()
+jk_uint32_t jk_gettid()
 {
-pthread_t t = pthread_self();
+union {
+pthread_t tid;
+jk_uint64_t alignme;
+} u;
+u.tid = pthread_self();
 #ifdef AS400
 /* OS400 use 64 bits ThreadId, get only low 32 bits for now */
 pthread_id_np_t   tid;
-pthread_getunique_np(&t, &tid);
-return ((int)(tid.intId.lo & 0x));
+pthread_getunique_np(&(u.tid), &tid);
+return ((jk_uint32_t)(tid.intId.lo & 0x));
 #else
-int tid = ((int)t) & 0x;
-return tid;
+switch(sizeof(pthread_t)) {
+case sizeof(jk_uint32_t):
+return *(jk_uint32_t *)&u.tid;
+case sizeof(jk_uint64_t):
+return (*(jk_uint64_t *)&u.tid) & 0x;
+default:
+return 0;
+}
 #endif /* AS400 */
 }
 #endif
@@ -1815,4 +1825,3 @@
 }
 
 #endif
-

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=550275&r1=550274&r2=550275
==
--- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Sun Jun 24 
12:00:08 2007
@@ -28,6 +28,10 @@
   
 
   
+  Logging: handle LWP IDs as 32 Bit unsigned. Try to make
+  it work, although pthread IDs are opaque. (rjung)
+  
+  
   JkStatus: Added manipulation of max_reply_timeouts. (rjung)
   
   



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



svn commit: r550277 - /tomcat/connectors/trunk/jk/native/common/portable.h.sample

2007-06-24 Thread rjung
Author: rjung
Date: Sun Jun 24 12:40:31 2007
New Revision: 550277

URL: http://svn.apache.org/viewvc?view=rev&rev=550277
Log:
Small addition for r549224.

Modified:
tomcat/connectors/trunk/jk/native/common/portable.h.sample

Modified: tomcat/connectors/trunk/jk/native/common/portable.h.sample
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/portable.h.sample?view=diff&rev=550277&r1=550276&r2=550277
==
--- tomcat/connectors/trunk/jk/native/common/portable.h.sample (original)
+++ tomcat/connectors/trunk/jk/native/common/portable.h.sample Sun Jun 24 
12:40:31 2007
@@ -80,6 +80,9 @@
 /* The size of `long long', as computed by sizeof. */
 #define SIZEOF_LONG_LONG 8
 
+/* The size of pid_t */
+#define SIZEOF_PID_T 4
+
 /* The size of `short', as computed by sizeof. */
 #define SIZEOF_SHORT 2
 



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



svn commit: r550530 - /tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c

2007-06-25 Thread rjung
Author: rjung
Date: Mon Jun 25 09:04:31 2007
New Revision: 550530

URL: http://svn.apache.org/viewvc?view=rev&rev=550530
Log:
Fix comparison between signed and unsigned type.
Uncritical here, because value of this config parameter
won't be negative or very large.

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

Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c?view=diff&rev=550530&r1=550529&r2=550530
==
--- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c Mon Jun 25 09:04:31 
2007
@@ -1094,7 +1094,7 @@
 rec->s->reply_timeouts++;
 }
 if (service_stat != JK_REPLY_TIMEOUT ||
-rec->s->reply_timeouts > 
p->worker->s->max_reply_timeouts) {
+rec->s->reply_timeouts > 
(unsigned)p->worker->s->max_reply_timeouts) {
 
 /*
 * Service failed !!!



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



svn commit: r552231 - /tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c

2007-06-30 Thread rjung
Author: rjung
Date: Sat Jun 30 19:28:32 2007
New Revision: 552231

URL: http://svn.apache.org/viewvc?view=rev&rev=552231
Log:
Minimize synchronized code path.

Modified:
tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c

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=diff&rev=552231&r1=552230&r2=552231
==
--- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Sat Jun 30 19:28:32 
2007
@@ -2522,17 +2522,17 @@
 if (p->jklogfp) {
 apr_status_t rv;
 apr_size_t wrote;
+#if defined(WIN32)
+what[used++] = '\r';
+#endif
+what[used++] = '\n';
+wrote = used;
 rv = apr_global_mutex_lock(jk_log_lock);
 if (rv != APR_SUCCESS) {
 ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL,
  "apr_global_mutex_lock(jk_log_lock) failed");
 /* XXX: Maybe this should be fatal? */
 }
-#if defined(WIN32)
-what[used++] = '\r';
-#endif
-what[used++] = '\n';
-wrote = used;
 rv = apr_file_write(p->jklogfp, what, &wrote);
 if (rv != APR_SUCCESS) {
 char error[256];



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



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

2007-06-30 Thread rjung
Author: rjung
Date: Sat Jun 30 19:40:02 2007
New Revision: 552233

URL: http://svn.apache.org/viewvc?view=rev&rev=552233
Log:
Fix a deadlock in the load balancer.
jk_shm_lock for multi-threaded MPMs on *nix uses two locks,
a pthread mutex for thread locking in the local process and
a fcntl for cross process locking. On Solaris the fcntl will
sporadically return with EDEADLK (although there is none!).
We still need to call jk_shm_unlock in this case,
so that we unlock the posix mutex.

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

Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c?view=diff&rev=552233&r1=552232&r2=552233
==
--- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c Sat Jun 30 19:40:02 
2007
@@ -766,8 +766,6 @@
jk_log(l, JK_LOG_ERROR,
   "locking failed (errno=%d)",
   errno);
-JK_TRACE_EXIT(l);
-return NULL;
 }
 if (sessionid) {
 char *session = sessionid;

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=552233&r1=552232&r2=552233
==
--- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Sat Jun 30 
19:40:02 2007
@@ -27,6 +27,10 @@
   
   
 
+  
+  Load Balancer: Fix a deadlock in lb worker, which was exposed on Solaris
+  for threaded Apache MPMs. (rjung)
+  
   
   Logging: handle LWP IDs as 32 Bit unsigned. Try to make
   it work, although pthread IDs are opaque. (rjung)



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



svn commit: r552601 - /tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c

2007-07-02 Thread rjung
Author: rjung
Date: Mon Jul  2 14:44:40 2007
New Revision: 552601

URL: http://svn.apache.org/viewvc?view=rev&rev=552601
Log:
The lock line has been moved in r552292, so we should
also move the result check for the locking.

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

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=diff&rev=552601&r1=552600&r2=552601
==
--- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Mon Jul  2 
14:44:40 2007
@@ -723,11 +723,11 @@
 jk_sock_t sock;
 
 JK_ENTER_CS(&aw->cs, rc);
-sock = ae->sd;
-/* Mark existing endpoint socket as closed */
-ae->sd = JK_INVALID_SOCKET;
 if (rc) {
 unsigned int i;
+sock = ae->sd;
+/* Mark existing endpoint socket as closed */
+ae->sd = JK_INVALID_SOCKET;
 for (i = 0; i < aw->ep_cache_sz; i++) {
 /* Find cache slot with usable socket */
 if (aw->ep_cache[i] && IS_VALID_SOCKET(aw->ep_cache[i]->sd)) {



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



svn commit: r552603 - /tomcat/connectors/trunk/jk/native/common/jk_ajp12_worker.c

2007-07-02 Thread rjung
Author: rjung
Date: Mon Jul  2 14:54:47 2007
New Revision: 552603

URL: http://svn.apache.org/viewvc?view=rev&rev=552603
Log:
Since we are now moving to doing orderly shutdown in all
regular cases, we should also do it for AJP12.

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

Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp12_worker.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp12_worker.c?view=diff&rev=552603&r1=552602&r2=552603
==
--- tomcat/connectors/trunk/jk/native/common/jk_ajp12_worker.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_ajp12_worker.c Mon Jul  2 
14:54:47 2007
@@ -141,7 +141,7 @@
 if (e && *e && (*e)->endpoint_private) {
 ajp12_endpoint_t *p = (*e)->endpoint_private;
 if (IS_VALID_SOCKET(p->sd)) {
-jk_close_socket(p->sd);
+jk_shutdown_socket(p->sd);
 }
 free(p);
 *e = NULL;



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



svn commit: r554553 - in /tomcat/container/tc5.5.x: modules/cluster/src/share/org/apache/catalina/cluster/session/mbeans-descriptors.xml webapps/docs/changelog.xml

2007-07-09 Thread rjung
Author: rjung
Date: Mon Jul  9 00:58:09 2007
New Revision: 554553

URL: http://svn.apache.org/viewvc?view=rev&rev=554553
Log:
Fix typo in new MBean attribute which lead to errors
in the manager webapp JMXProxy output.

Modified:

tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/session/mbeans-descriptors.xml
tomcat/container/tc5.5.x/webapps/docs/changelog.xml

Modified: 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/session/mbeans-descriptors.xml
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/session/mbeans-descriptors.xml?view=diff&rev=554553&r1=554552&r2=554553
==
--- 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/session/mbeans-descriptors.xml
 (original)
+++ 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/session/mbeans-descriptors.xml
 Mon Jul  9 00:58:09 2007
@@ -260,8 +260,8 @@
   description="Auto expire tolerance interval for backup sessions 
(default 300 sec)"
  type="int" />
  
- 
 
 http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?view=diff&rev=554553&r1=554552&r2=554553
==
--- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Mon Jul  9 00:58:09 2007
@@ -60,6 +60,9 @@
   

  
+Fix typo in new MBean attribute which lead to errors in the manager 
webapp JMXProxy output. (rjung)
+  
+ 
 42689: No way to timeout new connect attempts for 
replication sockets. 
 Patch by Casey Lucas (pero)
   



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



svn commit: r554561 - in /tomcat/container/branches/tc5.0.x/webapps: docs/changelog.xml manager/WEB-INF/classes/org/apache/catalina/manager/JMXProxyServlet.java

2007-07-09 Thread rjung
Author: rjung
Date: Mon Jul  9 01:43:45 2007
New Revision: 554561

URL: http://svn.apache.org/viewvc?view=rev&rev=554561
Log:
BZ 39813: Correct handling of new line characters in JMX attributes.
Patch provided by R Bramley. Ported from tc5.5.x r415029. 

Modified:
tomcat/container/branches/tc5.0.x/webapps/docs/changelog.xml

tomcat/container/branches/tc5.0.x/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/JMXProxyServlet.java

Modified: tomcat/container/branches/tc5.0.x/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/container/branches/tc5.0.x/webapps/docs/changelog.xml?view=diff&rev=554561&r1=554560&r2=554561
==
--- tomcat/container/branches/tc5.0.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/branches/tc5.0.x/webapps/docs/changelog.xml Mon Jul  9 
01:43:45 2007
@@ -76,6 +76,10 @@
   
 
   
+39813: Correct handling of new line characters in JMX
+attributes. Patch provided by R Bramley. Ported from tc5.5.x r415029. 
(markt,rjung)
+  
+  
 Fixed struts-config.xml for Admin webapp after move to Struts v1.2. 
(amyroh)
   
   

Modified: 
tomcat/container/branches/tc5.0.x/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/JMXProxyServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/branches/tc5.0.x/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/JMXProxyServlet.java?view=diff&rev=554561&r1=554560&r2=554561
==
--- 
tomcat/container/branches/tc5.0.x/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/JMXProxyServlet.java
 (original)
+++ 
tomcat/container/branches/tc5.0.x/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/JMXProxyServlet.java
 Mon Jul  9 01:43:45 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 1999,2004 The Apache Software Foundation.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  * 
  *  http://www.apache.org/licenses/LICENSE-2.0
  * 
@@ -81,7 +82,6 @@
 response.setContentType("text/plain");
 
 PrintWriter writer = response.getWriter();
-String qryString= request.getQueryString();
 
 if( mBeanServer==null ) {
 writer.println("Error - No mbean server");
@@ -190,7 +190,7 @@
 int prev=0;
 StringBuffer sb=new StringBuffer();
 while( idx >= 0 ) {
-appendHead(sb, value, prev, idx-1);
+appendHead(sb, value, prev, idx);
 
 sb.append( "\\n\n ");
 prev=idx+1;
@@ -203,6 +203,8 @@
 }
 
 private void appendHead( StringBuffer sb, String value, int start, int 
end) {
+if (end < 1) return;
+
 int pos=start;
 while( end-pos > 78 ) {
 sb.append( value.substring(pos, pos+78));



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



svn commit: r554562 - in /tomcat/tc6.0.x/trunk: java/org/apache/catalina/manager/JMXProxyServlet.java java/org/apache/catalina/users/mbeans-descriptors.xml webapps/docs/changelog.xml

2007-07-09 Thread rjung
Author: rjung
Date: Mon Jul  9 01:44:50 2007
New Revision: 554562

URL: http://svn.apache.org/viewvc?view=rev&rev=554562
Log:
BZ 39813: Correct handling of new line characters in JMX attributes.
Patch provided by R Bramley. Ported from tc5.5.x r415029.

Modified:
tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/JMXProxyServlet.java
tomcat/tc6.0.x/trunk/java/org/apache/catalina/users/mbeans-descriptors.xml
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/JMXProxyServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/JMXProxyServlet.java?view=diff&rev=554562&r1=554561&r2=554562
==
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/JMXProxyServlet.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/JMXProxyServlet.java 
Mon Jul  9 01:44:50 2007
@@ -79,7 +79,6 @@
 response.setContentType("text/plain");
 
 PrintWriter writer = response.getWriter();
-String qryString= request.getQueryString();
 
 if( mBeanServer==null ) {
 writer.println("Error - No mbean server");
@@ -113,7 +112,8 @@
 try {
 ObjectName oname = new ObjectName(onameStr);
 Object value = mBeanServer.getAttribute(oname, att);
-writer.println("OK - Attribute get '" + onameStr + "' - " + att + 
"= " + value.toString() );
+writer.println("OK - Attribute get '" + onameStr + "' - " + att
++ "= " + escape(value.toString()));
 } catch (Exception ex) {
 writer.println("Error - " + ex.toString());
 }
@@ -203,7 +203,7 @@
 int prev=0;
 StringBuffer sb=new StringBuffer();
 while( idx >= 0 ) {
-appendHead(sb, value, prev, idx-1);
+appendHead(sb, value, prev, idx);
 
 sb.append( "\\n\n ");
 prev=idx+1;
@@ -216,6 +216,8 @@
 }
 
 private void appendHead( StringBuffer sb, String value, int start, int 
end) {
+if (end < 1) return;
+
 int pos=start;
 while( end-pos > 78 ) {
 sb.append( value.substring(pos, pos+78));

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/users/mbeans-descriptors.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/users/mbeans-descriptors.xml?view=diff&rev=554562&r1=554561&r2=554562
==
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/users/mbeans-descriptors.xml 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/users/mbeans-descriptors.xml 
Mon Jul  9 01:44:50 2007
@@ -136,10 +136,6 @@
 group="UserDatabase"
  type="org.apache.catalina.users.MemoryUserDatabase">
 
-
-
 http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?view=diff&rev=554562&r1=554561&r2=554562
==
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Mon Jul  9 01:44:50 2007
@@ -101,7 +101,11 @@
   
 
   
- 42459: Tomcat Web Application Manager table error (rjung)
+39813: Correct handling of new line characters in JMX
+attributes. Patch provided by R Bramley. Ported from tc5.5.x r415029. 
(markt,rjung)
+  
+  
+ 42459: Fix Tomcat Web Application Manager table error. 
(rjung)
   
   
 Fix XSS security vulnerabilities (CVE-2007-2449) in the examples.



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



svn commit: r554563 - in /tomcat/trunk: java/org/apache/catalina/manager/JMXProxyServlet.java webapps/docs/changelog.xml

2007-07-09 Thread rjung
Author: rjung
Date: Mon Jul  9 01:45:22 2007
New Revision: 554563

URL: http://svn.apache.org/viewvc?view=rev&rev=554563
Log:
BZ 39813: Correct handling of new line characters in JMX attributes.
Patch provided by R Bramley. Ported from tc5.5.x r415029.

Modified:
tomcat/trunk/java/org/apache/catalina/manager/JMXProxyServlet.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/manager/JMXProxyServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/manager/JMXProxyServlet.java?view=diff&rev=554563&r1=554562&r2=554563
==
--- tomcat/trunk/java/org/apache/catalina/manager/JMXProxyServlet.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/manager/JMXProxyServlet.java Mon Jul  
9 01:45:22 2007
@@ -79,7 +79,6 @@
 response.setContentType("text/plain");
 
 PrintWriter writer = response.getWriter();
-String qryString= request.getQueryString();
 
 if( mBeanServer==null ) {
 writer.println("Error - No mbean server");
@@ -113,7 +112,8 @@
 try {
 ObjectName oname = new ObjectName(onameStr);
 Object value = mBeanServer.getAttribute(oname, att);
-writer.println("OK - Attribute get '" + onameStr + "' - " + att + 
"= " + value.toString() );
+writer.println("OK - Attribute get '" + onameStr + "' - " + att
++ "= " + escape(value.toString()));
 } catch (Exception ex) {
 writer.println("Error - " + ex.toString());
 }
@@ -203,7 +203,7 @@
 int prev=0;
 StringBuffer sb=new StringBuffer();
 while( idx >= 0 ) {
-appendHead(sb, value, prev, idx-1);
+appendHead(sb, value, prev, idx);
 
 sb.append( "\\n\n ");
 prev=idx+1;
@@ -216,6 +216,8 @@
 }
 
 private void appendHead( StringBuffer sb, String value, int start, int 
end) {
+if (end < 1) return;
+
 int pos=start;
 while( end-pos > 78 ) {
 sb.append( value.substring(pos, pos+78));

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?view=diff&rev=554563&r1=554562&r2=554563
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Mon Jul  9 01:45:22 2007
@@ -39,7 +39,11 @@
   
 
   
- 42459: Tomcat Web Application Manager table error (rjung)
+39813: Correct handling of new line characters in JMX
+attributes. Patch provided by R Bramley. Ported from tc5.5.x r415029. 
(markt,rjung)
+  
+  
+ 42459: Fix Tomcat Web Application Manager table error. 
(rjung)
   
 
   



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



svn commit: r554568 - in /tomcat/container/tc5.5.x/webapps: docs/changelog.xml manager/WEB-INF/classes/org/apache/catalina/manager/JMXProxyServlet.java

2007-07-09 Thread rjung
Author: rjung
Date: Mon Jul  9 01:57:31 2007
New Revision: 554568

URL: http://svn.apache.org/viewvc?view=rev&rev=554568
Log:
Don't write error on System.out, use log() instead.

Modified:
tomcat/container/tc5.5.x/webapps/docs/changelog.xml

tomcat/container/tc5.5.x/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/JMXProxyServlet.java

Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?view=diff&rev=554568&r1=554567&r2=554568
==
--- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Mon Jul  9 01:57:31 2007
@@ -52,6 +52,9 @@
   
 
   
+Don't write error on System.out, use log() instead. (rjung)
+  
+  
 Fix XSS security vulnerabilities (CVE-2007-2449) in the examples.
 Reported by Toshiharu Sugiyama. (markt)
   

Modified: 
tomcat/container/tc5.5.x/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/JMXProxyServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/JMXProxyServlet.java?view=diff&rev=554568&r1=554567&r2=554568
==
--- 
tomcat/container/tc5.5.x/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/JMXProxyServlet.java
 (original)
+++ 
tomcat/container/tc5.5.x/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/JMXProxyServlet.java
 Mon Jul  9 01:57:31 2007
@@ -175,8 +175,8 @@
 try {
 value=mBeanServer.getAttribute(oname, attName);
 } catch( Throwable t) {
-System.out.println("Error getting attribute " + oname +
-" " + attName + " " + t.toString());
+log("Error getting attribute " + oname +
+" " + attName + " " + t.toString());
 continue;
 }
 if( value==null ) continue;
@@ -216,7 +216,7 @@
 
 private void appendHead( StringBuffer sb, String value, int start, int 
end) {
 if (end < 1) return;
-
+
 int pos=start;
 while( end-pos > 78 ) {
 sb.append( value.substring(pos, pos+78));



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



svn commit: r554569 - in /tomcat/container/branches/tc5.0.x/webapps: docs/changelog.xml manager/WEB-INF/classes/org/apache/catalina/manager/JMXProxyServlet.java

2007-07-09 Thread rjung
Author: rjung
Date: Mon Jul  9 01:58:24 2007
New Revision: 554569

URL: http://svn.apache.org/viewvc?view=rev&rev=554569
Log:
Don't write error on System.out, use log() instead.

Modified:
tomcat/container/branches/tc5.0.x/webapps/docs/changelog.xml

tomcat/container/branches/tc5.0.x/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/JMXProxyServlet.java

Modified: tomcat/container/branches/tc5.0.x/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/container/branches/tc5.0.x/webapps/docs/changelog.xml?view=diff&rev=554569&r1=554568&r2=554569
==
--- tomcat/container/branches/tc5.0.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/branches/tc5.0.x/webapps/docs/changelog.xml Mon Jul  9 
01:58:24 2007
@@ -76,6 +76,9 @@
   
 
   
+Don't write error on System.out, use log() instead. (rjung)
+  
+  
 39813: Correct handling of new line characters in JMX
 attributes. Patch provided by R Bramley. Ported from tc5.5.x r415029. 
(markt,rjung)
   

Modified: 
tomcat/container/branches/tc5.0.x/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/JMXProxyServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/branches/tc5.0.x/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/JMXProxyServlet.java?view=diff&rev=554569&r1=554568&r2=554569
==
--- 
tomcat/container/branches/tc5.0.x/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/JMXProxyServlet.java
 (original)
+++ 
tomcat/container/branches/tc5.0.x/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/JMXProxyServlet.java
 Mon Jul  9 01:58:24 2007
@@ -163,8 +163,8 @@
 try {
 value=mBeanServer.getAttribute(oname, attName);
 } catch( Throwable t) {
-System.out.println("Error getting attribute " + oname +
-" " + attName + " " + t.toString());
+log("Error getting attribute " + oname +
+" " + attName + " " + t.toString());
 continue;
 }
 if( value==null ) continue;



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



svn commit: r554570 - in /tomcat/tc6.0.x/trunk: java/org/apache/catalina/manager/JMXProxyServlet.java webapps/docs/changelog.xml

2007-07-09 Thread rjung
Author: rjung
Date: Mon Jul  9 01:59:02 2007
New Revision: 554570

URL: http://svn.apache.org/viewvc?view=rev&rev=554570
Log:
Don't write error on System.out, use log() instead.

Modified:
tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/JMXProxyServlet.java
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/JMXProxyServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/JMXProxyServlet.java?view=diff&rev=554570&r1=554569&r2=554570
==
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/JMXProxyServlet.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/JMXProxyServlet.java 
Mon Jul  9 01:59:02 2007
@@ -176,8 +176,8 @@
 try {
 value=mBeanServer.getAttribute(oname, attName);
 } catch( Throwable t) {
-System.out.println("Error getting attribute " + oname +
-" " + attName + " " + t.toString());
+log("Error getting attribute " + oname +
+" " + attName + " " + t.toString());
 continue;
 }
 if( value==null ) continue;

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=diff&rev=554570&r1=554569&r2=554570
==
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Mon Jul  9 01:59:02 2007
@@ -101,6 +101,9 @@
   
 
   
+Don't write error on System.out, use log() instead. (rjung)
+  
+  
 39813: Correct handling of new line characters in JMX
 attributes. Patch provided by R Bramley. Ported from tc5.5.x r415029. 
(markt,rjung)
   



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



svn commit: r554571 - in /tomcat/trunk: java/org/apache/catalina/manager/JMXProxyServlet.java webapps/docs/changelog.xml

2007-07-09 Thread rjung
Author: rjung
Date: Mon Jul  9 01:59:33 2007
New Revision: 554571

URL: http://svn.apache.org/viewvc?view=rev&rev=554571
Log:
Don't write error on System.out, use log() instead.

Modified:
tomcat/trunk/java/org/apache/catalina/manager/JMXProxyServlet.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/manager/JMXProxyServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/manager/JMXProxyServlet.java?view=diff&rev=554571&r1=554570&r2=554571
==
--- tomcat/trunk/java/org/apache/catalina/manager/JMXProxyServlet.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/manager/JMXProxyServlet.java Mon Jul  
9 01:59:33 2007
@@ -176,8 +176,8 @@
 try {
 value=mBeanServer.getAttribute(oname, attName);
 } catch( Throwable t) {
-System.out.println("Error getting attribute " + oname +
-" " + attName + " " + t.toString());
+log("Error getting attribute " + oname +
+" " + attName + " " + t.toString());
 continue;
 }
 if( value==null ) continue;

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?view=diff&rev=554571&r1=554570&r2=554571
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Mon Jul  9 01:59:33 2007
@@ -39,6 +39,9 @@
   
 
   
+Don't write error on System.out, use log() instead. (rjung)
+  
+  
 39813: Correct handling of new line characters in JMX
 attributes. Patch provided by R Bramley. Ported from tc5.5.x r415029. 
(markt,rjung)
   



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



svn commit: r554575 - in /tomcat/container/tc5.5.x: catalina/src/share/org/apache/catalina/users/mbeans-descriptors.xml webapps/docs/changelog.xml

2007-07-09 Thread rjung
Author: rjung
Date: Mon Jul  9 02:04:32 2007
New Revision: 554575

URL: http://svn.apache.org/viewvc?view=rev&rev=554575
Log:
Remove invalid attribute "encoding" of MBean MemoryUserDatabase,
which lead to errors in the manager webapp JMXProxy output.

Modified:

tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/users/mbeans-descriptors.xml
tomcat/container/tc5.5.x/webapps/docs/changelog.xml

Modified: 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/users/mbeans-descriptors.xml
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/users/mbeans-descriptors.xml?view=diff&rev=554575&r1=554574&r2=554575
==
--- 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/users/mbeans-descriptors.xml
 (original)
+++ 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/users/mbeans-descriptors.xml
 Mon Jul  9 02:04:32 2007
@@ -136,10 +136,6 @@
 group="UserDatabase"
  type="org.apache.catalina.users.MemoryUserDatabase">
 
-
-
 http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?view=diff&rev=554575&r1=554574&r2=554575
==
--- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Mon Jul  9 02:04:32 2007
@@ -18,6 +18,10 @@
   
 
   
+Remove invalid attribute "encoding" of MBean MemoryUserDatabase,
+    which lead to errors in the manager webapp JMXProxy output. (rjung)
+  
+  
 Fix XSS security vulnerability (CVE-2007-2450) in the Manager and Host
 Manager. Reported by Daiki Fukumori. (markt)
   



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



svn commit: r554576 - in /tomcat/container/branches/tc5.0.x: catalina/src/share/org/apache/catalina/users/mbeans-descriptors.xml webapps/docs/changelog.xml

2007-07-09 Thread rjung
Author: rjung
Date: Mon Jul  9 02:05:11 2007
New Revision: 554576

URL: http://svn.apache.org/viewvc?view=rev&rev=554576
Log:
Remove invalid attribute "encoding" of MBean MemoryUserDatabase,
which lead to errors in the manager webapp JMXProxy output.

Modified:

tomcat/container/branches/tc5.0.x/catalina/src/share/org/apache/catalina/users/mbeans-descriptors.xml
tomcat/container/branches/tc5.0.x/webapps/docs/changelog.xml

Modified: 
tomcat/container/branches/tc5.0.x/catalina/src/share/org/apache/catalina/users/mbeans-descriptors.xml
URL: 
http://svn.apache.org/viewvc/tomcat/container/branches/tc5.0.x/catalina/src/share/org/apache/catalina/users/mbeans-descriptors.xml?view=diff&rev=554576&r1=554575&r2=554576
==
--- 
tomcat/container/branches/tc5.0.x/catalina/src/share/org/apache/catalina/users/mbeans-descriptors.xml
 (original)
+++ 
tomcat/container/branches/tc5.0.x/catalina/src/share/org/apache/catalina/users/mbeans-descriptors.xml
 Mon Jul  9 02:05:11 2007
@@ -136,10 +136,6 @@
 group="UserDatabase"
  type="org.apache.catalina.users.MemoryUserDatabase">
 
-
-
 http://svn.apache.org/viewvc/tomcat/container/branches/tc5.0.x/webapps/docs/changelog.xml?view=diff&rev=554576&r1=554575&r2=554576
==
--- tomcat/container/branches/tc5.0.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/branches/tc5.0.x/webapps/docs/changelog.xml Mon Jul  9 
02:05:11 2007
@@ -44,6 +44,10 @@
   
 
   
+Remove invalid attribute "encoding" of MBean MemoryUserDatabase,
+    which lead to errors in the manager webapp JMXProxy output. (rjung)
+  
+  
 32502: Memory leak in DigestAuthenticator. (yoavs)
   
   



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



svn commit: r554577 - in /tomcat/trunk: java/org/apache/catalina/users/mbeans-descriptors.xml webapps/docs/changelog.xml

2007-07-09 Thread rjung
Author: rjung
Date: Mon Jul  9 02:05:54 2007
New Revision: 554577

URL: http://svn.apache.org/viewvc?view=rev&rev=554577
Log:
Remove invalid attribute "encoding" of MBean MemoryUserDatabase,
which lead to errors in the manager webapp JMXProxy output.

Modified:
tomcat/trunk/java/org/apache/catalina/users/mbeans-descriptors.xml
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/users/mbeans-descriptors.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/users/mbeans-descriptors.xml?view=diff&rev=554577&r1=554576&r2=554577
==
--- tomcat/trunk/java/org/apache/catalina/users/mbeans-descriptors.xml 
(original)
+++ tomcat/trunk/java/org/apache/catalina/users/mbeans-descriptors.xml Mon Jul  
9 02:05:54 2007
@@ -136,10 +136,6 @@
 group="UserDatabase"
  type="org.apache.catalina.users.MemoryUserDatabase">
 
-
-
 http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?view=diff&rev=554577&r1=554576&r2=554577
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Mon Jul  9 02:05:54 2007
@@ -18,6 +18,10 @@
   
 
   
+ Remove invalid attribute "encoding" of MBean MemoryUserDatabase,
+ which lead to errors in the manager webapp JMXProxy output. (rjung)
+  
+  
  42449:
  JNDIRealm does not catch NullPointerException for Sun's
  LDAP provider (See bug for details) (funkman)



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



svn commit: r554578 - /tomcat/tc6.0.x/trunk/java/org/apache/catalina/users/mbeans-descriptors.xml

2007-07-09 Thread rjung
Author: rjung
Date: Mon Jul  9 02:09:01 2007
New Revision: 554578

URL: http://svn.apache.org/viewvc?view=rev&rev=554578
Log:
Undo unintetional commit from r554562. Will come next as separate commit.

Modified:
tomcat/tc6.0.x/trunk/java/org/apache/catalina/users/mbeans-descriptors.xml

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/users/mbeans-descriptors.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/users/mbeans-descriptors.xml?view=diff&rev=554578&r1=554577&r2=554578
==
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/users/mbeans-descriptors.xml 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/users/mbeans-descriptors.xml 
Mon Jul  9 02:09:01 2007
@@ -136,6 +136,10 @@
 group="UserDatabase"
  type="org.apache.catalina.users.MemoryUserDatabase">
 
+
+
 

svn commit: r554579 - in /tomcat/tc6.0.x/trunk: java/org/apache/catalina/users/mbeans-descriptors.xml webapps/docs/changelog.xml

2007-07-09 Thread rjung
Author: rjung
Date: Mon Jul  9 02:09:50 2007
New Revision: 554579

URL: http://svn.apache.org/viewvc?view=rev&rev=554579
Log:
Remove invalid attribute "encoding" of MBean MemoryUserDatabase,
which lead to errors in the manager webapp JMXProxy output.

Modified:
tomcat/tc6.0.x/trunk/java/org/apache/catalina/users/mbeans-descriptors.xml
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/users/mbeans-descriptors.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/users/mbeans-descriptors.xml?view=diff&rev=554579&r1=554578&r2=554579
==
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/users/mbeans-descriptors.xml 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/users/mbeans-descriptors.xml 
Mon Jul  9 02:09:50 2007
@@ -136,10 +136,6 @@
 group="UserDatabase"
  type="org.apache.catalina.users.MemoryUserDatabase">
 
-
-
 http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?view=diff&rev=554579&r1=554578&r2=554579
==
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Mon Jul  9 02:09:50 2007
@@ -18,6 +18,10 @@
   
 
   
+Remove invalid attribute "encoding" of MBean MemoryUserDatabase,
+    which lead to errors in the manager webapp JMXProxy output. (rjung)
+  
+  
 33774 Retry JNDI authentiction on 
ServiceUnavailableException
 as at least one provider throws this after an idle connection has been
 closed. (markt)



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



svn commit: r554584 - /tomcat/connectors/trunk/util/java/org/apache/tomcat/util/threads/ThreadPool.java

2007-07-09 Thread rjung
Author: rjung
Date: Mon Jul  9 02:46:40 2007
New Revision: 554584

URL: http://svn.apache.org/viewvc?view=rev&rev=554584
Log:
Separate sequence increment from getter in ThreadPool to avoid
misleading increments during monitoring via JMX.

Modified:

tomcat/connectors/trunk/util/java/org/apache/tomcat/util/threads/ThreadPool.java

Modified: 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/threads/ThreadPool.java
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/threads/ThreadPool.java?view=diff&rev=554584&r1=554583&r2=554584
==
--- 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/threads/ThreadPool.java
 (original)
+++ 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/threads/ThreadPool.java
 Mon Jul  9 02:46:40 2007
@@ -259,6 +259,10 @@
 }
 
 public int getSequence() {
+return sequence;
+}
+
+public int incSequence() {
 return sequence++;
 }
 
@@ -637,7 +641,7 @@
 this.p = p;
 t = new ThreadWithAttributes(p, this);
 t.setDaemon(true);
-t.setName(p.getName() + "-Processor" + p.getSequence());
+t.setName(p.getName() + "-Processor" + p.incSequence());
 t.setPriority(p.getThreadPriority());
 p.addThread( t, this );
noThData=true;



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



svn commit: r554585 - /tomcat/container/tc5.5.x/webapps/docs/changelog.xml

2007-07-09 Thread rjung
Author: rjung
Date: Mon Jul  9 02:47:22 2007
New Revision: 554585

URL: http://svn.apache.org/viewvc?view=rev&rev=554585
Log:
Separate sequence increment from getter in ThreadPool to avoid
misleading increments during monitoring via JMX.

Modified:
tomcat/container/tc5.5.x/webapps/docs/changelog.xml

Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?view=diff&rev=554585&r1=554584&r2=554585
==
--- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Mon Jul  9 02:47:22 2007
@@ -63,6 +63,14 @@
 Reported by Toshiharu Sugiyama. (markt)
   
 
+  
+  
+
+  
+Separate sequence increment from getter in ThreadPool to avoid
+misleading increments during monitoring via JMX. (rjung)
+  
+

   




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



svn commit: r554586 - /tomcat/container/branches/tc5.0.x/webapps/docs/changelog.xml

2007-07-09 Thread rjung
Author: rjung
Date: Mon Jul  9 02:47:44 2007
New Revision: 554586

URL: http://svn.apache.org/viewvc?view=rev&rev=554586
Log:
Separate sequence increment from getter in ThreadPool to avoid
misleading increments during monitoring via JMX.

Modified:
tomcat/container/branches/tc5.0.x/webapps/docs/changelog.xml

Modified: tomcat/container/branches/tc5.0.x/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/container/branches/tc5.0.x/webapps/docs/changelog.xml?view=diff&rev=554586&r1=554585&r2=554586
==
--- tomcat/container/branches/tc5.0.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/branches/tc5.0.x/webapps/docs/changelog.xml Mon Jul  9 
02:47:44 2007
@@ -62,6 +62,10 @@
 
   
 
+  
+Separate sequence increment from getter in ThreadPool to avoid
+misleading increments during monitoring via JMX. (rjung)
+  
   
 36742: Add DEBUG-level warning message to 
InternalInputBuffer, as suggested by
 Greg Steuck. (yoavs)



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



svn commit: r554587 - in /tomcat/tc6.0.x/trunk: java/org/apache/tomcat/util/threads/ThreadPool.java webapps/docs/changelog.xml

2007-07-09 Thread rjung
Author: rjung
Date: Mon Jul  9 02:48:48 2007
New Revision: 554587

URL: http://svn.apache.org/viewvc?view=rev&rev=554587
Log:
Separate sequence increment from getter in ThreadPool to avoid
misleading increments during monitoring via JMX.

Modified:
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/threads/ThreadPool.java
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/threads/ThreadPool.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/threads/ThreadPool.java?view=diff&rev=554587&r1=554586&r2=554587
==
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/threads/ThreadPool.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/threads/ThreadPool.java 
Mon Jul  9 02:48:48 2007
@@ -260,6 +260,10 @@
 }
 
 public int getSequence() {
+return sequence;
+}
+
+public int incSequence() {
 return sequence++;
 }
 
@@ -638,7 +642,7 @@
 this.p = p;
 t = new ThreadWithAttributes(p, this);
 t.setDaemon(true);
-t.setName(p.getName() + "-Processor" + p.getSequence());
+t.setName(p.getName() + "-Processor" + p.incSequence());
 t.setPriority(p.getThreadPriority());
 p.addThread( t, this );
noThData=true;

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=diff&rev=554587&r1=554586&r2=554587
==
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Mon Jul  9 02:48:48 2007
@@ -98,6 +98,10 @@
   
 
   
+Separate sequence increment from getter in ThreadPool to avoid
+misleading increments during monitoring via JMX. (rjung)
+  
+  
 Add back missing socketBuffer attribute in the java.io HTTP connector 
(remm)
   
 



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



svn commit: r554588 - in /tomcat/trunk: java/org/apache/tomcat/util/threads/ThreadPool.java webapps/docs/changelog.xml

2007-07-09 Thread rjung
Author: rjung
Date: Mon Jul  9 02:49:18 2007
New Revision: 554588

URL: http://svn.apache.org/viewvc?view=rev&rev=554588
Log:
Separate sequence increment from getter in ThreadPool to avoid
misleading increments during monitoring via JMX.

Modified:
tomcat/trunk/java/org/apache/tomcat/util/threads/ThreadPool.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/tomcat/util/threads/ThreadPool.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/threads/ThreadPool.java?view=diff&rev=554588&r1=554587&r2=554588
==
--- tomcat/trunk/java/org/apache/tomcat/util/threads/ThreadPool.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/threads/ThreadPool.java Mon Jul  9 
02:49:18 2007
@@ -260,6 +260,10 @@
 }
 
 public int getSequence() {
+return sequence;
+}
+
+public int incSequence() {
 return sequence++;
 }
 
@@ -638,7 +642,7 @@
 this.p = p;
 t = new ThreadWithAttributes(p, this);
 t.setDaemon(true);
-t.setName(p.getName() + "-Processor" + p.getSequence());
+t.setName(p.getName() + "-Processor" + p.incSequence());
 t.setPriority(p.getThreadPriority());
 p.addThread( t, this );
noThData=true;

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?view=diff&rev=554588&r1=554587&r2=554588
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Mon Jul  9 02:49:18 2007
@@ -40,6 +40,14 @@
   
 
   
+  
+
+  
+Separate sequence increment from getter in ThreadPool to avoid
+misleading increments during monitoring via JMX. (rjung)
+  
+
+  
   
 
   



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



svn commit: r556429 - in /tomcat/container/tc5.5.x/webapps/docs: changelog.xml logging.xml

2007-07-15 Thread rjung
Author: rjung
Date: Sun Jul 15 10:02:07 2007
New Revision: 556429

URL: http://svn.apache.org/viewvc?view=rev&rev=556429
Log:
Correct j.u.l log levels in JULI docs.

Modified:
tomcat/container/tc5.5.x/webapps/docs/changelog.xml
tomcat/container/tc5.5.x/webapps/docs/logging.xml

Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?view=diff&rev=556429&r1=556428&r2=556429
==
--- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Sun Jul 15 10:02:07 2007
@@ -15,6 +15,13 @@
 
 
 
+  
+
+  
+Correct j.u.l log levels in JULI docs. (rjung)
+  
+
+  
   
 
   

Modified: tomcat/container/tc5.5.x/webapps/docs/logging.xml
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/docs/logging.xml?view=diff&rev=556429&r1=556428&r2=556429
==
--- tomcat/container/tc5.5.x/webapps/docs/logging.xml (original)
+++ tomcat/container/tc5.5.x/webapps/docs/logging.xml Sun Jul 15 10:02:07 2007
@@ -160,8 +160,8 @@
   
   
 The default logging.properties specifies a ConsoleHandler for routing 
logging to stdout and
-also a FileHandler. A handler's log level threshold can be set using 
SEVERE, CONFIG, INFO, 
-WARN, FINE, FINEST or ALL. The logging.properties shipped with JDK is set 
to INFO. You
+also a FileHandler. A handler's log level threshold can be set using 
SEVERE, WARNING, INFO,
+CONFIG, FINE, FINER, FINEST or ALL. The logging.properties shipped with 
JDK is set to INFO. You
 can also target specific packages to collect logging from and specify a 
level. Here is how
 you would set debugging from Tomcat. You would need to ensure the 
ConsoleHandler's level is also
 set to collect this threshold, so FINEST or ALL should be set. Please 
refer to Sun's java.util.logging



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



svn commit: r556430 - in /tomcat/tc6.0.x/trunk/webapps/docs: changelog.xml logging.xml

2007-07-15 Thread rjung
Author: rjung
Date: Sun Jul 15 10:02:56 2007
New Revision: 556430

URL: http://svn.apache.org/viewvc?view=rev&rev=556430
Log:
Correct j.u.l log levels in JULI docs.

Modified:
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
tomcat/tc6.0.x/trunk/webapps/docs/logging.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=diff&rev=556430&r1=556429&r2=556430
==
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Sun Jul 15 10:02:56 2007
@@ -15,6 +15,13 @@
 
 
 
+  
+
+  
+Correct j.u.l log levels in JULI docs. (rjung)
+  
+
+  
   
 
   

Modified: tomcat/tc6.0.x/trunk/webapps/docs/logging.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/logging.xml?view=diff&rev=556430&r1=556429&r2=556430
==
--- tomcat/tc6.0.x/trunk/webapps/docs/logging.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/logging.xml Sun Jul 15 10:02:56 2007
@@ -171,8 +171,8 @@
   
   
 The default logging.properties specifies a ConsoleHandler for routing 
logging to stdout and
-also a FileHandler. A handler's log level threshold can be set using 
SEVERE, CONFIG, INFO, 
-WARN, FINE, FINEST or ALL. The logging.properties shipped with JDK is set 
to INFO. You
+also a FileHandler. A handler's log level threshold can be set using 
SEVERE, WARNING, INFO,
+CONFIG, FINE, FINER, FINEST or ALL. The logging.properties shipped with 
JDK is set to INFO. You
 can also target specific packages to collect logging from and specify a 
level. Here is how
 you would set debugging from Tomcat. You would need to ensure the 
ConsoleHandler's level is also
 set to collect this threshold, so FINEST or ALL should be set. Please 
refer to Sun's java.util.logging



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



svn commit: r556431 - in /tomcat/trunk/webapps/docs: changelog.xml logging.xml

2007-07-15 Thread rjung
Author: rjung
Date: Sun Jul 15 10:03:25 2007
New Revision: 556431

URL: http://svn.apache.org/viewvc?view=rev&rev=556431
Log:
Correct j.u.l log levels in JULI docs.

Modified:
tomcat/trunk/webapps/docs/changelog.xml
tomcat/trunk/webapps/docs/logging.xml

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?view=diff&rev=556431&r1=556430&r2=556431
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Sun Jul 15 10:03:25 2007
@@ -15,6 +15,13 @@
 
 
 
+  
+
+  
+Correct j.u.l log levels in JULI docs. (rjung)
+  
+
+  
   
 
   

Modified: tomcat/trunk/webapps/docs/logging.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/logging.xml?view=diff&rev=556431&r1=556430&r2=556431
==
--- tomcat/trunk/webapps/docs/logging.xml (original)
+++ tomcat/trunk/webapps/docs/logging.xml Sun Jul 15 10:03:25 2007
@@ -171,8 +171,8 @@
   
   
 The default logging.properties specifies a ConsoleHandler for routing 
logging to stdout and
-also a FileHandler. A handler's log level threshold can be set using 
SEVERE, CONFIG, INFO, 
-WARN, FINE, FINEST or ALL. The logging.properties shipped with JDK is set 
to INFO. You
+also a FileHandler. A handler's log level threshold can be set using 
SEVERE, WARNING, INFO,
+CONFIG, FINE, FINER, FINEST or ALL. The logging.properties shipped with 
JDK is set to INFO. You
 can also target specific packages to collect logging from and specify a 
level. Here is how
 you would set debugging from Tomcat. You would need to ensure the 
ConsoleHandler's level is also
 set to collect this threshold, so FINEST or ALL should be set. Please 
refer to Sun's java.util.logging



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



svn commit: r556916 - in /tomcat/connectors/trunk/jk: native/apache-1.3/mod_jk.c xdocs/miscellaneous/changelog.xml

2007-07-17 Thread rjung
Author: rjung
Date: Tue Jul 17 05:57:23 2007
New Revision: 556916

URL: http://svn.apache.org/viewvc?view=rev&rev=556916
Log:
BZ42849 (Apache httpd 1.3): Abort startup of Apache httpd 1.3 in case
mod_jk initialization failed. We already do the same
for Apache httpd 2.x.

Modified:
tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.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=diff&rev=556916&r1=556915&r2=556916
==
--- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Tue Jul 17 05:57:23 
2007
@@ -2651,9 +2651,9 @@
 return;
 }
 else {
-ap_log_error(APLOG_MARK, APLOG_ERR, s,
- "Error in creating the workers."
- " Please consult your mod_jk log file '%s'.", 
conf->log_file);
+jk_error_exit(APLOG_MARK, APLOG_EMERG | APLOG_NOERRNO, s, p,
+  "Error in creating the workers."
+  " Please consult your mod_jk log file '%s'.", 
conf->log_file);
 }
 
 }

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=556916&r1=556915&r2=556916
==
--- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Tue Jul 17 
05:57:23 2007
@@ -28,10 +28,15 @@
   
 
   
+42849: Abort startup of Apache httpd 1.3 in case
+mod_jk initialization failed. We already do the same
+for Apache httpd 2.x. (rjung)
+  
+  
 42849: 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
+can get to Apache Httpd where we refuse to start the server
 in case of fatal initialization errors. (mturk)
   
   



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



svn commit: r558522 - in /tomcat/trunk: bin/catalina.bat bin/catalina.sh webapps/docs/changelog.xml

2007-07-22 Thread rjung
Author: rjung
Date: Sun Jul 22 11:29:59 2007
New Revision: 558522

URL: http://svn.apache.org/viewvc?view=rev&rev=558522
Log:
BZ 42951: Port r454193 (BZ 36976) from TC 5.5.x:
Don't use CATALINA_OPTS when stopping Tomcat.

Modified:
tomcat/trunk/bin/catalina.bat
tomcat/trunk/bin/catalina.sh
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/bin/catalina.bat
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/bin/catalina.bat?view=diff&rev=558522&r1=558521&r2=558522
==
--- tomcat/trunk/bin/catalina.bat (original)
+++ tomcat/trunk/bin/catalina.bat Sun Jul 22 11:29:59 2007
@@ -12,7 +12,7 @@
 rem   the same directory that CATALINA_HOME points to.
 rem
 rem   CATALINA_OPTS   (Optional) Java runtime options used when the "start",
-rem   "stop", or "run" command is executed.
+rem   or "run" command is executed.
 rem
 rem   CATALINA_TMPDIR (Optional) Directory path location of temporary directory
 rem   the JVM should use (java.io.tmpdir).  Defaults to
@@ -188,6 +188,7 @@
 :doStop
 shift
 set ACTION=stop
+set CATALINA_OPTS=
 goto execCmd
 
 :doVersion

Modified: tomcat/trunk/bin/catalina.sh
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/bin/catalina.sh?view=diff&rev=558522&r1=558521&r2=558522
==
--- tomcat/trunk/bin/catalina.sh (original)
+++ tomcat/trunk/bin/catalina.sh Sun Jul 22 11:29:59 2007
@@ -11,7 +11,7 @@
 #   the same directory that CATALINA_HOME points to.
 #
 #   CATALINA_OPTS   (Optional) Java runtime options used when the "start",
-#   "stop", or "run" command is executed.
+#   or "run" command is executed.
 #
 #   CATALINA_TMPDIR (Optional) Directory path location of temporary directory
 #   the JVM should use (java.io.tmpdir).  Defaults to
@@ -292,7 +292,7 @@
 FORCE=1
   fi
 
-  "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \
+  "$_RUNJAVA" $JAVA_OPTS \
 -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
 -Dcatalina.base="$CATALINA_BASE" \
 -Dcatalina.home="$CATALINA_HOME" \

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?view=diff&rev=558522&r1=558521&r2=558522
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Sun Jul 22 11:29:59 2007
@@ -10,10 +10,25 @@
 Remy Maucherat
 Yoav Shapira
 Filip Hanik
+Rainer Jung
 Changelog
   
 
 
+
+  
+
+  
+ 42951: Don't use CATALINA_OPTS when stopping Tomcat. This
+ allows options for starting and stopping to be set on JAVA_OPTS and
+ options for starting only to be set on CATALINA_OPTS. Without this
+ fix, some startup options (eg the port for remote JMX) would cause
+ stop to fail. Based on a fix suggested by Michael Vorburger.
+ Port of r454193 (36976) from Tomcat 5.5.x. (markt,rjung)
+  
+
+  
+
 
   
 



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



svn commit: r558523 - in /tomcat/tc6.0.x/trunk: bin/catalina.bat bin/catalina.sh webapps/docs/changelog.xml

2007-07-22 Thread rjung
Author: rjung
Date: Sun Jul 22 11:31:13 2007
New Revision: 558523

URL: http://svn.apache.org/viewvc?view=rev&rev=558523
Log:
BZ 42951: Port r454193 (BZ 36976) from TC 5.5.x:
Don't use CATALINA_OPTS when stopping Tomcat.

Modified:
tomcat/tc6.0.x/trunk/bin/catalina.bat
tomcat/tc6.0.x/trunk/bin/catalina.sh
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc6.0.x/trunk/bin/catalina.bat
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/bin/catalina.bat?view=diff&rev=558523&r1=558522&r2=558523
==
--- tomcat/tc6.0.x/trunk/bin/catalina.bat (original)
+++ tomcat/tc6.0.x/trunk/bin/catalina.bat Sun Jul 22 11:31:13 2007
@@ -12,7 +12,7 @@
 rem   the same directory that CATALINA_HOME points to.
 rem
 rem   CATALINA_OPTS   (Optional) Java runtime options used when the "start",
-rem   "stop", or "run" command is executed.
+rem   or "run" command is executed.
 rem
 rem   CATALINA_TMPDIR (Optional) Directory path location of temporary directory
 rem   the JVM should use (java.io.tmpdir).  Defaults to
@@ -188,6 +188,7 @@
 :doStop
 shift
 set ACTION=stop
+set CATALINA_OPTS=
 goto execCmd
 
 :doVersion

Modified: tomcat/tc6.0.x/trunk/bin/catalina.sh
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/bin/catalina.sh?view=diff&rev=558523&r1=558522&r2=558523
==
--- tomcat/tc6.0.x/trunk/bin/catalina.sh (original)
+++ tomcat/tc6.0.x/trunk/bin/catalina.sh Sun Jul 22 11:31:13 2007
@@ -11,7 +11,7 @@
 #   the same directory that CATALINA_HOME points to.
 #
 #   CATALINA_OPTS   (Optional) Java runtime options used when the "start",
-#   "stop", or "run" command is executed.
+#   or "run" command is executed.
 #
 #   CATALINA_TMPDIR (Optional) Directory path location of temporary directory
 #   the JVM should use (java.io.tmpdir).  Defaults to
@@ -292,7 +292,7 @@
 FORCE=1
   fi
 
-  "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \
+  "$_RUNJAVA" $JAVA_OPTS \
 -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
 -Dcatalina.base="$CATALINA_BASE" \
 -Dcatalina.home="$CATALINA_HOME" \

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=diff&rev=558523&r1=558522&r2=558523
==
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Sun Jul 22 11:31:13 2007
@@ -10,10 +10,25 @@
 Remy Maucherat
 Yoav Shapira
 Filip Hanik
+Rainer Jung
 Changelog
   
 
 
+
+  
+
+  
+ 42951: Don't use CATALINA_OPTS when stopping Tomcat. This
+ allows options for starting and stopping to be set on JAVA_OPTS and
+ options for starting only to be set on CATALINA_OPTS. Without this
+ fix, some startup options (eg the port for remote JMX) would cause
+ stop to fail. Based on a fix suggested by Michael Vorburger.
+ Port of r454193 (36976) from Tomcat 5.5.x. (markt,rjung)
+  
+
+  
+
 
   
 



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



svn commit: r558525 - in /tomcat/container/branches/tc5.0.x: catalina/src/bin/catalina.50.bat catalina/src/bin/catalina.50.sh catalina/src/bin/catalina.bat catalina/src/bin/catalina.sh webapps/docs/ch

2007-07-22 Thread rjung
Author: rjung
Date: Sun Jul 22 11:37:58 2007
New Revision: 558525

URL: http://svn.apache.org/viewvc?view=rev&rev=558525
Log:
Backport r454193 (BZ 36976): Don't use CATALINA_OPTS when stopping.
Backport r385888 (BZ 38761): Handle relative symlinks.
Backport r393867 (BZ 38194): Error message for -force with empty CATALINA_PID.
Backport r394120 (BZ 37848): Only echo if we have a TTY.

Modified:
tomcat/container/branches/tc5.0.x/catalina/src/bin/catalina.50.bat
tomcat/container/branches/tc5.0.x/catalina/src/bin/catalina.50.sh
tomcat/container/branches/tc5.0.x/catalina/src/bin/catalina.bat
tomcat/container/branches/tc5.0.x/catalina/src/bin/catalina.sh
tomcat/container/branches/tc5.0.x/webapps/docs/changelog.xml

Modified: tomcat/container/branches/tc5.0.x/catalina/src/bin/catalina.50.bat
URL: 
http://svn.apache.org/viewvc/tomcat/container/branches/tc5.0.x/catalina/src/bin/catalina.50.bat?view=diff&rev=558525&r1=558524&r2=558525
==
--- tomcat/container/branches/tc5.0.x/catalina/src/bin/catalina.50.bat 
(original)
+++ tomcat/container/branches/tc5.0.x/catalina/src/bin/catalina.50.bat Sun Jul 
22 11:37:58 2007
@@ -12,7 +12,7 @@
 rem   the same directory that CATALINA_HOME points to.
 rem
 rem   CATALINA_OPTS   (Optional) Java runtime options used when the "start",
-rem   "stop", or "run" command is executed.
+rem   or "run" command is executed.
 rem
 rem   CATALINA_TMPDIR (Optional) Directory path location of temporary directory
 rem   the JVM should use (java.io.tmpdir).  Defaults to
@@ -156,6 +156,7 @@
 :doStop
 shift
 set ACTION=stop
+set CATALINA_OPTS=
 goto execCmd
 
 :doVersion

Modified: tomcat/container/branches/tc5.0.x/catalina/src/bin/catalina.50.sh
URL: 
http://svn.apache.org/viewvc/tomcat/container/branches/tc5.0.x/catalina/src/bin/catalina.50.sh?view=diff&rev=558525&r1=558524&r2=558525
==
--- tomcat/container/branches/tc5.0.x/catalina/src/bin/catalina.50.sh (original)
+++ tomcat/container/branches/tc5.0.x/catalina/src/bin/catalina.50.sh Sun Jul 
22 11:37:58 2007
@@ -11,7 +11,7 @@
 #   the same directory that CATALINA_HOME points to.
 #
 #   CATALINA_OPTS   (Optional) Java runtime options used when the "start",
-#   "stop", or "run" command is executed.
+#   or "run" command is executed.
 #
 #   CATALINA_TMPDIR (Optional) Directory path location of temporary directory
 #   the JVM should use (java.io.tmpdir).  Defaults to
@@ -52,7 +52,7 @@
 while [ -h "$PRG" ]; do
   ls=`ls -ld "$PRG"`
   link=`expr "$ls" : '.*-> \(.*\)$'`
-  if expr "$link" : '.*/.*' > /dev/null; then
+  if expr "$link" : '/.*' > /dev/null; then
 PRG="$link"
   else
 PRG=`dirname "$PRG"`/"$link"
@@ -115,6 +115,12 @@
   CATALINA_TMPDIR="$CATALINA_BASE"/temp
 fi
 
+# Bugzilla 37848: When no TTY is available, don't output to console
+have_tty=0
+if [ "`tty`" != "not a tty" ]; then
+have_tty=1
+fi
+
 # For Cygwin, switch paths to Windows format before running java
 if $cygwin; then
   JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"`
@@ -128,10 +134,13 @@
 
 # - Execute The Requested Command -
 
-echo "Using CATALINA_BASE:   $CATALINA_BASE"
-echo "Using CATALINA_HOME:   $CATALINA_HOME"
-echo "Using CATALINA_TMPDIR: $CATALINA_TMPDIR"
-echo "Using JAVA_HOME:   $JAVA_HOME"
+# Bugzilla 37848: only output this if we have a TTY
+if [ $have_tty -eq 1 ]; then
+  echo "Using CATALINA_BASE:   $CATALINA_BASE"
+  echo "Using CATALINA_HOME:   $CATALINA_HOME"
+  echo "Using CATALINA_TMPDIR: $CATALINA_TMPDIR"
+  echo "Using JAVA_HOME:   $JAVA_HOME"
+fi
 
 if [ "$1" = "jpda" ] ; then
   if [ -z "$JPDA_TRANSPORT" ]; then
@@ -243,7 +252,7 @@
 FORCE=1
   fi
 
-  "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \
+  "$_RUNJAVA" $JAVA_OPTS \
 -classpath "$CLASSPATH" \
 -Dcatalina.base="$CATALINA_BASE" \
 -Dcatalina.home="$CATALINA_HOME" \
@@ -254,6 +263,8 @@
 if [ ! -z "$CATALINA_PID" ]; then
echo "Killing: `cat $CATALINA_PID`"
kill -9 `cat $CATALINA_PID`
+else
+   echo "Kill failed: \$CATALINA_PID not set"
 fi
   fi
 

Modified: tomcat/container/branches/tc5.0.x/catalina/src/bin/catalina.bat
URL: 
http://svn.apache.org/viewvc/tomcat/container/branches/tc5.0.x/catalina/src/bin/catalina.bat?vie

svn commit: r559168 - in /tomcat/connectors/trunk/jk/native: apache-1.3/mod_jk.c apache-2.0/mod_jk.c

2007-07-24 Thread rjung
Author: rjung
Date: Tue Jul 24 12:30:04 2007
New Revision: 559168

URL: http://svn.apache.org/viewvc?view=rev&rev=559168
Log:
Fix message typo.

Modified:
tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c
tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c

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=diff&rev=559168&r1=559167&r2=559168
==
--- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Tue Jul 24 12:30:04 
2007
@@ -1908,7 +1908,7 @@
 {"JkLogLevel", jk_set_log_level, NULL, RSRC_CONF, TAKE1,
  "The mod_jk module log level, can be debug, info, request, error, or 
emerg"},
 {"JkLogStampFormat", jk_set_log_fmt, NULL, RSRC_CONF, TAKE1,
- "The mod_jk module log format, follow strftime synthax"},
+ "The mod_jk module log format, follow strftime syntax"},
 {"JkRequestLogFormat", jk_set_request_log_format, NULL, RSRC_CONF, TAKE1,
  "The mod_jk module request log format string"},
 

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=diff&rev=559168&r1=559167&r2=559168
==
--- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Tue Jul 24 12:30:04 
2007
@@ -1949,7 +1949,7 @@
   "The Tomcat module log level, can be debug, "
   "info, error or emerg"),
 AP_INIT_TAKE1("JkLogStampFormat", jk_set_log_fmt, NULL, RSRC_CONF,
-  "The Tomcat module log format, follow strftime synthax"),
+  "The Tomcat module log format, follow strftime syntax"),
 AP_INIT_TAKE1("JkRequestLogFormat", jk_set_request_log_format, NULL,
   RSRC_CONF,
   "The mod_jk module request log format string"),



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



svn commit: r559196 - /tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c

2007-07-24 Thread rjung
Author: rjung
Date: Tue Jul 24 13:31:42 2007
New Revision: 559196

URL: http://svn.apache.org/viewvc?view=rev&rev=559196
Log:
Fix compiler warning.
We only need to close the socket, if we've got one.

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

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=diff&rev=559196&r1=559195&r2=559196
==
--- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Tue Jul 24 
13:31:42 2007
@@ -740,10 +740,10 @@
 }
 }
 JK_LEAVE_CS(&aw->cs, rc);
+/* Close previous socket */
+if (IS_VALID_SOCKET(sock))
+jk_shutdown_socket(sock);
 }
-/* Close previous socket */
-if (IS_VALID_SOCKET(sock))
-jk_shutdown_socket(sock);
 }
 
 /*



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



svn commit: r559197 - in /tomcat/connectors/trunk/jk/native/common: jk_ajp12_worker.c jk_ajp_common.c jk_jni_worker.c jk_lb_worker.c jk_status.c

2007-07-24 Thread rjung
Author: rjung
Date: Tue Jul 24 13:39:09 2007
New Revision: 559197

URL: http://svn.apache.org/viewvc?view=rev&rev=559197
Log:
Small changes to the service method of the various workers.
Make them a little more consistent:
- always set is_error
- don't TRACE_EXIT to early
- no longer using is_recoverable_error instead of is_error
  in jni worker

Modified:
tomcat/connectors/trunk/jk/native/common/jk_ajp12_worker.c
tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c
tomcat/connectors/trunk/jk/native/common/jk_jni_worker.c
tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c
tomcat/connectors/trunk/jk/native/common/jk_status.c

Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp12_worker.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp12_worker.c?view=diff&rev=559197&r1=559196&r2=559197
==
--- tomcat/connectors/trunk/jk/native/common/jk_ajp12_worker.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_ajp12_worker.c Tue Jul 24 
13:39:09 2007
@@ -88,7 +88,7 @@
  jk_ws_service_t *s,
  jk_logger_t *l, int *is_error)
 {
-ajp12_endpoint_t *p = e->endpoint_private;
+ajp12_endpoint_t *p;
 unsigned int attempt;
 int rc = -1;
 /*
@@ -97,14 +97,19 @@
 
 JK_TRACE_ENTER(l);
 
-if (is_error)
-*is_error = JK_HTTP_SERVER_ERROR;
 if (!e || !e->endpoint_private || !s || !is_error) {
 JK_LOG_NULL_PARAMS(l);
+if (is_error)
+*is_error = JK_HTTP_SERVER_ERROR;
 JK_TRACE_EXIT(l);
 return JK_FALSE;
 }
 
+p = e->endpoint_private;
+
+/* Set returned error to OK */
+*is_error = JK_HTTP_OK;
+
 for (attempt = 0; attempt < p->worker->connect_retry_attempts;
  attempt++) {
 p->sd =
@@ -130,6 +135,7 @@
 }
 jk_log(l, JK_LOG_ERROR, "In jk_endpoint_t::service, Error sd = %d",
p->sd);
+*is_error = JK_HTTP_SERVER_ERROR;
 
 JK_TRACE_EXIT(l);
 return JK_FALSE;

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=diff&rev=559197&r1=559196&r2=559197
==
--- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Tue Jul 24 
13:39:09 2007
@@ -1833,15 +1833,19 @@
 
 JK_TRACE_ENTER(l);
 
-if (is_error)
-*is_error = JK_HTTP_SERVER_ERROR;
 if (!e || !e->endpoint_private || !s || !is_error) {
 JK_LOG_NULL_PARAMS(l);
+if (is_error)
+*is_error = JK_HTTP_SERVER_ERROR;
 JK_TRACE_EXIT(l);
 return JK_FALSE;
 }
 
 p = e->endpoint_private;
+
+/* Set returned error to OK */
+*is_error = JK_HTTP_OK;
+
 op->request = jk_b_new(&(p->pool));
 if (!op->request) {
 *is_error = JK_HTTP_SERVER_ERROR;
@@ -2017,11 +2021,12 @@
"(%s) receiving reply from tomcat failed "
"without recovery in send loop attempt=%d",
p->worker->name, i);
-JK_TRACE_EXIT(l);
 if (err == JK_REPLY_TIMEOUT) {
 *is_error = JK_HTTP_GATEWAY_TIME_OUT;
+JK_TRACE_EXIT(l);
 return JK_REPLY_TIMEOUT;
 }
+JK_TRACE_EXIT(l);
 return JK_FALSE;
 }
 jk_log(l, JK_LOG_INFO,
@@ -2080,11 +2085,13 @@
"or is listening on the wrong port",
p->worker->name);
 
-JK_TRACE_EXIT(l);
 if (err == JK_REPLY_TIMEOUT) {
 *is_error = JK_HTTP_GATEWAY_TIME_OUT;
+JK_TRACE_EXIT(l);
 return JK_REPLY_TIMEOUT;
 }
+
+JK_TRACE_EXIT(l);
 return JK_FALSE;
 }
 

Modified: tomcat/connectors/trunk/jk/native/common/jk_jni_worker.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_jni_worker.c?view=diff&rev=559197&r1=559196&r2=559197
==
--- tomcat/connectors/trunk/jk/native/common/jk_jni_worker.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_jni_worker.c Tue Jul 24 
13:39:09 2007
@@ -250,29 +250,31 @@
 
 static int JK_METHOD service(jk_endpoint_t *e,
  jk_ws_service_t *s,
- jk_logger_t *l, int *is_recoverable_error)
+ jk_logger_t *l, int *is_error)
 {
 jni_endpoint_t *p;
 jint rc;
 
 JK_TRACE_ENTER(l);
 
-if (is_recoverable_error)
-*is_r

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

2007-07-24 Thread rjung
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
==
--

svn commit: r559205 - /tomcat/connectors/trunk/jk/native/common/jk_util.c

2007-07-24 Thread rjung
Author: rjung
Date: Tue Jul 24 14:01:14 2007
New Revision: 559205

URL: http://svn.apache.org/viewvc?view=rev&rev=559205
Log:
Minor reorg of log line building.
Drop fixed 8 bytes length for log level strings, because
the variing length of correct thread ids breaks
alignment of log messages anyways.

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

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=diff&rev=559205&r1=559204&r2=559205
==
--- tomcat/connectors/trunk/jk/native/common/jk_util.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_util.c Tue Jul 24 14:01:14 2007
@@ -286,12 +286,11 @@
 MAINTAIN_PROPERTY_NAME
 };
 
-/* All entries need to have fixed length 8 chars! */
 static const char *jk_level_verbs[] = {
 "[" JK_LOG_TRACE_VERB "] ",
 "[" JK_LOG_DEBUG_VERB "] ",
-"[" JK_LOG_INFO_VERB "]  ",
-"[" JK_LOG_WARN_VERB "]  ",
+"[" JK_LOG_INFO_VERB "] ",
+"[" JK_LOG_WARN_VERB "] ",
 "[" JK_LOG_ERROR_VERB "] ",
 "[" JK_LOG_EMERG_VERB "] ",
 NULL
@@ -493,31 +492,51 @@
 #endif
 used = set_time_str(buf, usable_size, l->log_fmt);
 
-if (line) {
+if (line) { /* line==0 only used for request log item */
 /* Log [pid:threadid] for all levels except REQUEST. */
 /* This information helps to correlate lines from different logs. 
*/
 /* Performance is no issue, because with production log levels */
 /* we only call it often, if we have a lot of errors */
-rc = snprintf(&buf[used], usable_size - used,
- "[%" JK_PID_T_FMT ":%" JK_UINT32_T_FMT "] ", 
getpid(), jk_gettid());
+rc = snprintf(buf + used, usable_size - used,
+  "[%" JK_PID_T_FMT ":%" JK_UINT32_T_FMT "] ", 
getpid(), jk_gettid());
 used += rc;
-if (rc < 0 || usable_size - used < 8) {
+if (rc < 0 ) {
 return 0;
 }
-strcat(buf, jk_level_verbs[level]);
-used += 8;
+
+rc = (int)strlen(jk_level_verbs[level]);
+if (usable_size - used >= rc) {
+strncpy(buf + used, jk_level_verbs[level], rc);
+used += rc;
+}
+else {
+return 0;   /* [V] not sure what to return... */
+}
 
 if (funcname) {
-rc = (int)strlen(funcname) + 2;
-if (usable_size - used >= rc) {
-strcat(buf, funcname);
-strcat(buf, "::");
+rc = (int)strlen(funcname);
+if (usable_size - used >= rc + 2) {
+strncpy(buf + used, funcname, rc);
 used += rc;
+strncpy(buf + used, "::", 2);
+used += 2;
+}
+else {
+return 0;   /* [V] not sure what to return... */
 }
 }
 
-rc = snprintf(&buf[used], usable_size - used,
- "%s (%d): ", f, line);
+rc = (int)strlen(f);
+if (usable_size - used >= rc) {
+strncpy(buf + used, f, rc);
+used += rc;
+}
+else {
+return 0;   /* [V] not sure what to return... */
+}
+
+rc = snprintf(buf + used, usable_size - used,
+  " (%d): ", line);
 used += rc;
 if (rc < 0 || usable_size - used < 0) {
 return 0;   /* [V] not sure what to return... */



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



svn commit: r559232 - /tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml

2007-07-24 Thread rjung
Author: rjung
Date: Tue Jul 24 14:54:41 2007
New Revision: 559232

URL: http://svn.apache.org/viewvc?view=rev&rev=559232
Log:
Fix entity name in xml changelog.

Modified:
tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml

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=559232&r1=559231&r2=559232
==
--- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Tue Jul 24 
14:54:41 2007
@@ -28,7 +28,7 @@
   
 
   
-  IIS & Sun: Log service failures also, if return code is negative. (rjung)
+  IIS & Sun: Log service failures also, if return code is negative. 
(rjung)
   
   
 42849: Abort startup of Apache httpd 1.3 in case



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



svn commit: r559234 - in /tomcat/connectors/trunk/jk: native/apache-1.3/mod_jk.c native/apache-2.0/mod_jk.c native/common/jk_logger.h native/common/jk_util.c native/common/jk_util.h xdocs/miscellaneou

2007-07-24 Thread rjung
Author: rjung
Date: Tue Jul 24 14:56:33 2007
New Revision: 559234

URL: http://svn.apache.org/viewvc?view=rev&rev=559234
Log:
Apache: add milliseconds (%Q) and microseconds (%q) as possible
JkLogStampFormat conversion specifiers. This does not use strftime(),
but needs gettimeofday().

Also add milliseconds to the default timestamp format,
if we have gettimeofday().

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_logger.h
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/apache.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=diff&rev=559234&r1=559233&r2=559234
==
--- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Tue Jul 24 14:56:33 
2007
@@ -2496,12 +2496,14 @@
 if (jkl && flp) {
 jkl->log = jk_log_to_file;
 jkl->level = conf->log_level;
-jkl->log_fmt = conf->stamp_format_string;
+jk_set_time_fmt(jkl, conf->stamp_format_string);
 jkl->logger_private = flp;
 flp->log_fd = conf->log_fd;
 conf->log = jkl;
 if (main_log == NULL)
 main_log = conf->log;
+jk_log(conf->log, JK_LOG_DEBUG, "log time stamp format is '%s'",
+   conf->log->log_fmt);
 return;
 }
 

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=diff&rev=559234&r1=559233&r2=559234
==
--- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Tue Jul 24 14:56:33 
2007
@@ -2637,7 +2637,7 @@
 if (jkl && flp) {
 jkl->log = jk_log_to_file;
 jkl->level = conf->log_level;
-jkl->log_fmt = conf->stamp_format_string;
+jk_set_time_fmt(jkl, conf->stamp_format_string);
 jkl->logger_private = flp;
 flp->jklogfp = conf->jklogfp;
 conf->log = jkl;
@@ -2649,6 +2649,8 @@
 /* Also should we pass pointer (ie: main_log) or handle 
(*main_log) ? */
 apr_pool_cleanup_register(p, &main_log, jklog_cleanup, 
jklog_cleanup);
 }
+jk_log(conf->log, JK_LOG_DEBUG, "log time stamp format is '%s'",
+   conf->log->log_fmt);
 
 return 0;
 }

Modified: tomcat/connectors/trunk/jk/native/common/jk_logger.h
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_logger.h?view=diff&rev=559234&r1=559233&r2=559234
==
--- tomcat/connectors/trunk/jk/native/common/jk_logger.h (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_logger.h Tue Jul 24 14:56:33 
2007
@@ -36,7 +36,12 @@
 {
 void *logger_private;
 int level;
-const char *log_fmt;
+const char *log_fmt; /* the configured timestamp format for logging */
+const char *log_fmt_subsec; /* like log_fmt, but milli/micro seconds
+   marker replaced, because strftie() doesn't 
handle those */
+int log_fmt_type; /* do we want milli or microseconds */
+int log_fmt_offset; /* at which position shoukd they occur */
+int log_fmt_size; /* how long is this format string */
 
 int (JK_METHOD * log) (jk_logger_t *l, int level, int used, char *what);
 

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=diff&rev=559234&r1=559233&r2=559234
==
--- tomcat/connectors/trunk/jk/native/common/jk_util.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_util.c Tue Jul 24 14:56:33 2007
@@ -127,9 +127,16 @@
  * [Mon Mar 26 19:44:48 2001] [jk_uri_worker_map.c (155)]: Into 
jk_uri_worker_map_t::uri_worker_map_alloc
  * log format used by apache in error.log
  */
-#ifndef JK_TIME_FORMAT
-#define JK_TIME_FORMAT "[%a %b %d %H:%M:%S %Y] "
-#endif
+#define JK_STRFTIME_MILLI "%Q"
+#define JK_STRFTIME_MICRO "%q"
+#define JK_PATTERN_MILLI "XXX"
+#define JK_PATTERN_MICRO "XX"
+#define JK_TIME_FORMAT_NONE  "[%a %b %d %H:%M:%S %Y] "

svn commit: r559264 - in /tomcat/connectors/trunk/jk/native/common: jk_logger.h jk_util.c jk_util.h

2007-07-24 Thread rjung
Author: rjung
Date: Tue Jul 24 17:05:02 2007
New Revision: 559264

URL: http://svn.apache.org/viewvc?view=rev&rev=559264
Log:
Minor optimization of new millisecond/microsecond
logging. Timestamps restricted to 64 Bytes, less
copying.

Modified:
tomcat/connectors/trunk/jk/native/common/jk_logger.h
tomcat/connectors/trunk/jk/native/common/jk_util.c
tomcat/connectors/trunk/jk/native/common/jk_util.h

Modified: tomcat/connectors/trunk/jk/native/common/jk_logger.h
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_logger.h?view=diff&rev=559264&r1=559263&r2=559264
==
--- tomcat/connectors/trunk/jk/native/common/jk_logger.h (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_logger.h Tue Jul 24 17:05:02 
2007
@@ -36,12 +36,11 @@
 {
 void *logger_private;
 int level;
-const char *log_fmt; /* the configured timestamp format for logging */
-const char *log_fmt_subsec; /* like log_fmt, but milli/micro seconds
-   marker replaced, because strftie() doesn't 
handle those */
-int log_fmt_type; /* do we want milli or microseconds */
-int log_fmt_offset; /* at which position shoukd they occur */
-int log_fmt_size; /* how long is this format string */
+char *log_fmt;/* the configured timestamp format for logging */
+char *log_fmt_subsec; /* like log_fmt, but milli/micro seconds
+ marker replaced, because strftime() doesn't 
handle those */
+char *log_fmt_offset; /* at which position should we insert */
+int log_fmt_type; /* do we want milli or microseconds */
 
 int (JK_METHOD * log) (jk_logger_t *l, int level, int used, char *what);
 

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=diff&rev=559264&r1=559263&r2=559264
==
--- tomcat/connectors/trunk/jk/native/common/jk_util.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_util.c Tue Jul 24 17:05:02 2007
@@ -113,7 +113,6 @@
 #define TOMCAT50_BRIDGE_NAME("tomcat5")
 
 #define HUGE_BUFFER_SIZE (8*1024)
-#define LOG_LINE_SIZE(1024)
 
 #define MAKE_WORKER_PARAM(P) \
 strcpy(buf, "worker.");  \
@@ -127,16 +126,17 @@
  * [Mon Mar 26 19:44:48 2001] [jk_uri_worker_map.c (155)]: Into 
jk_uri_worker_map_t::uri_worker_map_alloc
  * log format used by apache in error.log
  */
-#define JK_STRFTIME_MILLI "%Q"
-#define JK_STRFTIME_MICRO "%q"
-#define JK_PATTERN_MILLI "XXX"
-#define JK_PATTERN_MICRO "XX"
-#define JK_TIME_FORMAT_NONE  "[%a %b %d %H:%M:%S %Y] "
-#define JK_TIME_FORMAT_MILLI "[%a %b %d %H:%M:%S." JK_STRFTIME_MILLI " %Y] "
-#define JK_TIME_FORMAT_MICRO "[%a %b %d %H:%M:%S." JK_STRFTIME_MICRO " %Y] "
-#define JK_TIME_SUBSEC_NONE  (0)
-#define JK_TIME_SUBSEC_MILLI (1)
-#define JK_TIME_SUBSEC_MICRO (2)
+#define JK_TIME_CONV_MILLI"%Q"
+#define JK_TIME_CONV_MICRO"%q"
+#define JK_TIME_PATTERN_MILLI "000"
+#define JK_TIME_PATTERN_MICRO "00"
+#define JK_TIME_FORMAT_NONE   "[%a %b %d %H:%M:%S %Y] "
+#define JK_TIME_FORMAT_MILLI  "[%a %b %d %H:%M:%S." JK_TIME_CONV_MILLI " %Y] "
+#define JK_TIME_FORMAT_MICRO  "[%a %b %d %H:%M:%S." JK_TIME_CONV_MICRO " %Y] "
+#define JK_TIME_SUBSEC_NONE   (0)
+#define JK_TIME_SUBSEC_MILLI  (1)
+#define JK_TIME_SUBSEC_MICRO  (2)
+#define JK_TIME_MAX_SIZE  (64)
 
 /* Visual C++ Toolkit 2003 support */
 #if defined (_MSC_VER) && (_MSC_VER == 1310)
@@ -350,11 +350,11 @@
 #endif
 }
 
-void jk_set_time_fmt(jk_logger_t *l, const char *jk_log_fmt)
+void jk_set_time_fmt(jk_logger_t *l, char *jk_log_fmt)
 {
 if (l) {
 char *s;
-char log_fmt_safe[LOG_LINE_SIZE];
+char log_fmt_safe[JK_TIME_MAX_SIZE];
 char *fmt;
 
 if (!jk_log_fmt) {
@@ -365,43 +365,40 @@
 #endif
 }
 l->log_fmt_type = JK_TIME_SUBSEC_NONE;
-l->log_fmt_offset = 0;
-l->log_fmt_size = 0;
+l->log_fmt_offset = NULL;
 l->log_fmt_subsec = jk_log_fmt;
 l->log_fmt = jk_log_fmt;
 
-fmt = (char *)malloc(LOG_LINE_SIZE + strlen(JK_PATTERN_MICRO));
+fmt = (char *)malloc(JK_TIME_MAX_SIZE + strlen(JK_TIME_PATTERN_MICRO));
 if ( fmt ) {
-strncpy(log_fmt_safe, jk_log_fmt, LOG_LINE_SIZE);
-if ( (s = strstr(log_fmt_safe, JK_STRFTIME_MILLI)) ) {
+strncpy(log_fmt_safe, jk_log_fmt, JK_TIME_MAX_SIZE);
+if ( (s = strstr(log_fmt_safe, JK_TIME_CONV_MILLI)) ) {
 int offset = s - log_fmt_safe;

svn commit: r559265 - /tomcat/connectors/trunk/jk/xdocs/reference/apache.xml

2007-07-24 Thread rjung
Author: rjung
Date: Tue Jul 24 17:14:15 2007
New Revision: 559265

URL: http://svn.apache.org/viewvc?view=rev&rev=559265
Log:
Minor docs update to milliseconds/microseconds logging.

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

Modified: tomcat/connectors/trunk/jk/xdocs/reference/apache.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/reference/apache.xml?view=diff&rev=559265&r1=559264&r2=559265
==
--- tomcat/connectors/trunk/jk/xdocs/reference/apache.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/reference/apache.xml Tue Jul 24 17:14:15 
2007
@@ -170,13 +170,17 @@
 The default value is info.
 
 
-The Tomcat Connector module date log format, follow an
+The Tomcat Connector module date log format, using an
 extended strftime syntax.
 This format will be used for the time stamps in the JkLogFile.
-Besides the usual strftime conversion specifications,
-you can also use %Q for adding milliseconds to the log and
-%q for microseconds. This will only work with mod_jk minimum
-version 1.2.24 on platforms with a gettimeofday() function.
+The maximum length of the format is 63 characters.
+
+Starting with version 1.2.24 of mod_jk you can also use %Q
+for adding milliseconds to the log and %q for microseconds. 
+These conversion specifiers are an extension to strftime.
+They will only work on platforms with a gettimeofday() function.
+You can use %Q and %q only once in the pattern and also not both
+together in the same pattern.
 
 The default value is "[%a %b %d %H:%M:%S %Y] " and beginning
 with version 1.2.24 on platforms with a gettimeofday()



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



svn commit: r559348 - in /tomcat/connectors/trunk/jk/native/common: jk_logger.h jk_util.c jk_util.h

2007-07-25 Thread rjung
Author: rjung
Date: Wed Jul 25 01:17:35 2007
New Revision: 559348

URL: http://svn.apache.org/viewvc?view=rev&rev=559348
Log:
Revert some optimizations from r559264.
Those were not thread safe.
Kept renaming constants and smaller buffer.

Modified:
tomcat/connectors/trunk/jk/native/common/jk_logger.h
tomcat/connectors/trunk/jk/native/common/jk_util.c
tomcat/connectors/trunk/jk/native/common/jk_util.h

Modified: tomcat/connectors/trunk/jk/native/common/jk_logger.h
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_logger.h?view=diff&rev=559348&r1=559347&r2=559348
==
--- tomcat/connectors/trunk/jk/native/common/jk_logger.h (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_logger.h Wed Jul 25 01:17:35 
2007
@@ -36,11 +36,12 @@
 {
 void *logger_private;
 int level;
-char *log_fmt;/* the configured timestamp format for logging */
-char *log_fmt_subsec; /* like log_fmt, but milli/micro seconds
- marker replaced, because strftime() doesn't 
handle those */
-char *log_fmt_offset; /* at which position should we insert */
-int log_fmt_type; /* do we want milli or microseconds */
+const char *log_fmt;/* the configured timestamp format for logging 
*/
+const char *log_fmt_subsec; /* like log_fmt, but milli/micro seconds
+   marker replaced, because strftime() doesn't 
handle those */
+int log_fmt_offset; /* at which position should we insert */
+int log_fmt_type;   /* do we want milli or microseconds */
+int log_fmt_size;   /* how long is this format string */
 
 int (JK_METHOD * log) (jk_logger_t *l, int level, int used, char *what);
 

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=diff&rev=559348&r1=559347&r2=559348
==
--- tomcat/connectors/trunk/jk/native/common/jk_util.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_util.c Wed Jul 25 01:17:35 2007
@@ -350,7 +350,7 @@
 #endif
 }
 
-void jk_set_time_fmt(jk_logger_t *l, char *jk_log_fmt)
+void jk_set_time_fmt(jk_logger_t *l, const char *jk_log_fmt)
 {
 if (l) {
 char *s;
@@ -365,7 +365,8 @@
 #endif
 }
 l->log_fmt_type = JK_TIME_SUBSEC_NONE;
-l->log_fmt_offset = NULL;
+l->log_fmt_offset = 0;
+l->log_fmt_size = 0;
 l->log_fmt_subsec = jk_log_fmt;
 l->log_fmt = jk_log_fmt;
 
@@ -377,7 +378,7 @@
 int len = strlen(JK_TIME_PATTERN_MILLI);
 
 l->log_fmt_type = JK_TIME_SUBSEC_MILLI;
-l->log_fmt_offset = fmt + offset;
+l->log_fmt_offset = offset;
 strncpy(fmt, log_fmt_safe, offset);
 strncpy(fmt + offset, JK_TIME_PATTERN_MILLI, len);
 strncpy(fmt + offset + len,
@@ -385,13 +386,14 @@
 JK_TIME_MAX_SIZE - offset - len);
 fmt[JK_TIME_MAX_SIZE-1] = '\0';
 l->log_fmt_subsec = fmt;
+l->log_fmt_size = strlen(fmt);
 }
 else if ( (s = strstr(log_fmt_safe, JK_TIME_CONV_MICRO)) ) {
 int offset = s - log_fmt_safe;
 int len = strlen(JK_TIME_PATTERN_MICRO);
 
 l->log_fmt_type = JK_TIME_SUBSEC_MICRO;
-l->log_fmt_offset = fmt + offset;
+l->log_fmt_offset = offset;
 strncpy(fmt, log_fmt_safe, offset);
 strncpy(fmt + offset, JK_TIME_PATTERN_MICRO, len);
 strncpy(fmt + offset + len,
@@ -399,6 +401,7 @@
 JK_TIME_MAX_SIZE - offset - len);
 fmt[JK_TIME_MAX_SIZE-1] = '\0';
 l->log_fmt_subsec = fmt;
+l->log_fmt_size = strlen(fmt);
 }
 }
 }
@@ -409,11 +412,14 @@
 time_t t;
 struct tm *tms;
 int done;
+char log_fmt[JK_TIME_MAX_SIZE];
 
 if ( !l || !l->log_fmt ) {
 return 0;
 }
 
+log_fmt[0] = '\0';
+
 #ifndef NO_GETTIMEOFDAY
 if ( l->log_fmt_type != JK_TIME_SUBSEC_NONE ) {
 struct timeval tv;
@@ -421,13 +427,14 @@
 if ( rc == 0 ) {
 char subsec[7];
 t = tv.tv_sec;
+strncpy(log_fmt, l->log_fmt_subsec, l->log_fmt_size + 1);
 if ( l->log_fmt_type == JK_TIME_SUBSEC_MILLI ) {
 sprintf(subsec, "%03d", (int)(tv.tv_usec/1000));
-strncpy(l->log_fmt_offset, subsec, 3);
+strncpy(log_fmt + l->log_fmt_offset, subsec, 3);
 }
 else if ( l->lo

svn commit: r559349 - /tomcat/connectors/trunk/jk/native/common/jk_util.c

2007-07-25 Thread rjung
Author: rjung
Date: Wed Jul 25 01:22:03 2007
New Revision: 559349

URL: http://svn.apache.org/viewvc?view=rev&rev=559349
Log:
Fix syntax error is iSeries specific part.

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

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=diff&rev=559349&r1=559348&r2=559349
==
--- tomcat/connectors/trunk/jk/native/common/jk_util.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_util.c Wed Jul 25 01:22:03 2007
@@ -1825,10 +1825,13 @@
 pthread_t tid;
 jk_uint64_t alignme;
 } u;
-u.tid = pthread_self();
 #ifdef AS400
-/* OS400 use 64 bits ThreadId, get only low 32 bits for now */
+/* OS400 use 64 bits ThreadId */
 pthread_id_np_t   tid;
+#endif /* AS400 */
+u.tid = pthread_self();
+#ifdef AS400
+/* Get only low 32 bits for now */
 pthread_getunique_np(&(u.tid), &tid);
 return ((jk_uint32_t)(tid.intId.lo & 0x));
 #else



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



svn commit: r559352 - /tomcat/site/trunk/xdocs/download-connectors.xml

2007-07-25 Thread rjung
Author: rjung
Date: Wed Jul 25 01:30:59 2007
New Revision: 559352

URL: http://svn.apache.org/viewvc?view=rev&rev=559352
Log:
Add note about the platform specific archives on download page.

Modified:
tomcat/site/trunk/xdocs/download-connectors.xml

Modified: tomcat/site/trunk/xdocs/download-connectors.xml
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/download-connectors.xml?view=diff&rev=559352&r1=559351&r2=559352
==
--- tomcat/site/trunk/xdocs/download-connectors.xml (original)
+++ tomcat/site/trunk/xdocs/download-connectors.xml Wed Jul 25 01:30:59 2007
@@ -29,13 +29,13 @@
 JK 1.2 (WARNING: Important vulnerabilities in previous 
versions) 
 
 
-Source
-JK
 1.2.23 Source Release tar.gz
+Source (Please choose the 
correct format for your platform)
+JK
 1.2.23 Source Release tar.gz (e.g. Unix, Linux, Mac OS)
 [http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.23/tomcat-connectors-1.2.23-src.tar.gz.asc";>pgp]
 
 
 
-JK
 1.2.23 Source Release zip
+JK
 1.2.23 Source Release zip (e.g. Windows)
 [http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.23/tomcat-connectors-1.2.23-src.zip.asc";>pgp]
 
 



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



svn commit: r559354 - /tomcat/site/trunk/docs/download-connectors.html

2007-07-25 Thread rjung
Author: rjung
Date: Wed Jul 25 01:36:44 2007
New Revision: 559354

URL: http://svn.apache.org/viewvc?view=rev&rev=559354
Log:
Apply platform specific archive info from download xml to html.

Modified:
tomcat/site/trunk/docs/download-connectors.html

Modified: tomcat/site/trunk/docs/download-connectors.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/download-connectors.html?view=diff&rev=559354&r1=559353&r2=559354
==
--- tomcat/site/trunk/docs/download-connectors.html (original)
+++ tomcat/site/trunk/docs/download-connectors.html Wed Jul 25 01:36:44 2007
@@ -232,11 +232,11 @@
 
 
 
-Source
+Source (Please choose the correct format for your 
platform)
 
 
 
-JK
 1.2.23 Source Release tar.gz
+JK
 1.2.23 Source Release tar.gz (e.g. Unix, Linux, Mac OS)
 
 
 [http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.23/tomcat-connectors-1.2.23-src.tar.gz.asc";>pgp]
@@ -244,7 +244,7 @@
 
 
 
-JK
 1.2.23 Source Release zip
+JK
 1.2.23 Source Release zip (e.g. Windows)
 
 
 [http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.23/tomcat-connectors-1.2.23-src.zip.asc";>pgp]



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



svn commit: r559373 - in /tomcat/site/trunk: docs/download-connectors.html xdocs/download-connectors.xml

2007-07-25 Thread rjung
Author: rjung
Date: Wed Jul 25 02:36:27 2007
New Revision: 559373

URL: http://svn.apache.org/viewvc?view=rev&rev=559373
Log:
Reformat download page changes a little.

Modified:
tomcat/site/trunk/docs/download-connectors.html
tomcat/site/trunk/xdocs/download-connectors.xml

Modified: tomcat/site/trunk/docs/download-connectors.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/download-connectors.html?view=diff&rev=559373&r1=559372&r2=559373
==
--- tomcat/site/trunk/docs/download-connectors.html (original)
+++ tomcat/site/trunk/docs/download-connectors.html Wed Jul 25 02:36:27 2007
@@ -232,11 +232,11 @@
 
 
 
-Source (Please choose the correct format for your 
platform)
+Source (please choose the correct format for your 
platform)
 
 
 
-JK
 1.2.23 Source Release tar.gz (e.g. Unix, Linux, Mac OS)
+JK
 1.2.23 Source Release tar.gz (e.g. Unix, Linux, Mac OS)
 
 
 [http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.23/tomcat-connectors-1.2.23-src.tar.gz.asc";>pgp]
@@ -244,7 +244,7 @@
 
 
 
-JK
 1.2.23 Source Release zip (e.g. Windows)
+JK
 1.2.23 Source Release zip (e.g. Windows)
 
 
 [http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.23/tomcat-connectors-1.2.23-src.zip.asc";>pgp]

Modified: tomcat/site/trunk/xdocs/download-connectors.xml
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/download-connectors.xml?view=diff&rev=559373&r1=559372&r2=559373
==
--- tomcat/site/trunk/xdocs/download-connectors.xml (original)
+++ tomcat/site/trunk/xdocs/download-connectors.xml Wed Jul 25 02:36:27 2007
@@ -29,13 +29,13 @@
 JK 1.2 (WARNING: Important vulnerabilities in previous 
versions) 
 
 
-Source (Please choose the 
correct format for your platform)
-JK
 1.2.23 Source Release tar.gz (e.g. Unix, Linux, Mac OS)
+Source (please choose the 
correct format for your platform)
+JK
 1.2.23 Source Release tar.gz (e.g. Unix, Linux, Mac OS)
 [http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.23/tomcat-connectors-1.2.23-src.tar.gz.asc";>pgp]
 
 
 
-JK
 1.2.23 Source Release zip (e.g. Windows)
+JK
 1.2.23 Source Release zip (e.g. Windows)
 [http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.23/tomcat-connectors-1.2.23-src.zip.asc";>pgp]
 
 



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



svn commit: r559389 - /tomcat/connectors/trunk/jk/native/common/jk_global.h

2007-07-25 Thread rjung
Author: rjung
Date: Wed Jul 25 03:38:33 2007
New Revision: 559389

URL: http://svn.apache.org/viewvc?view=rev&rev=559389
Log:
Add some comments to easy understanding of
nested preprocessor ifs.

Modified:
tomcat/connectors/trunk/jk/native/common/jk_global.h

Modified: tomcat/connectors/trunk/jk/native/common/jk_global.h
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_global.h?view=diff&rev=559389&r1=559388&r2=559389
==
--- tomcat/connectors/trunk/jk/native/common/jk_global.h (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_global.h Wed Jul 25 03:38:33 
2007
@@ -57,8 +57,8 @@
 #define _CRT_SECURE_NO_DEPRECATE
 #endif
 #pragma warning(disable: 4996)
-#endif
-#endif
+#endif /* defined(_MSC_VER) && _MSC_VER >= 1400 */
+#endif /* defined(WIN32) */
 
 #include "jk_version.h"
 
@@ -116,10 +116,10 @@
 #include 
 #include 
 #include 
-#endif
+#endif /* _WINDOWS_ */
 #include 
 #include 
-#else
+#else /* WIN32 */
 #include 
 #if defined(NETWARE) && defined(__NOVELL_LIBC__)
 #include "novsock2.h"
@@ -143,11 +143,11 @@
 #if !defined(HPUX11) && !defined(AS400)
 #include 
 #endif
-#endif
+#endif /* NETWARE */
 
 #include 
 #include 
-#endif
+#endif /* WIN32 */
 
 #ifdef __cplusplus
 extern "C"
@@ -192,7 +192,7 @@
 #ifndef strcasecmp
 #define strcasecmp stricmp
 #endif
-#else
+#else /* defined(WIN32) || defined(NETWARE) */
 #define JK_METHOD
 #define C_LEVEL_TRY_START
 #define C_LEVEL_TRY_END
@@ -201,7 +201,7 @@
 #define PATH_SEPERATOR  (':')
 #define FILE_SEPERATOR  ('/')
 #define PATH_ENV_VARIABLE   ("LD_LIBRARY_PATH")
-#endif
+#endif /* defined(WIN32) || defined(NETWARE) */
 
 /* HTTP Error codes
  */
@@ -325,7 +325,7 @@
 #define snprintf _snprintf
 #define vsnprintf _vsnprintf
 #endif
-#endif
+#endif /* WIN32" */
 
 /* Use apr snprintf() and vsnprintf() when needed */
 #if defined(HAVE_APR)



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



svn commit: r559390 - /tomcat/connectors/trunk/jk/native/common/jk_util.c

2007-07-25 Thread rjung
Author: rjung
Date: Wed Jul 25 03:39:31 2007
New Revision: 559390

URL: http://svn.apache.org/viewvc?view=rev&rev=559390
Log:
Fix compilation error under windows
caused by the complex gettimeofday() macro.

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

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=diff&rev=559390&r1=559389&r2=559390
==
--- tomcat/connectors/trunk/jk/native/common/jk_util.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_util.c Wed Jul 25 03:39:31 2007
@@ -423,7 +423,11 @@
 #ifndef NO_GETTIMEOFDAY
 if ( l->log_fmt_type != JK_TIME_SUBSEC_NONE ) {
 struct timeval tv;
-int rc = gettimeofday(&tv, NULL);
+int rc;
+
+/* Don't concat the next line with the previous one, */
+/* because gettimeofday() is a macro for WIN32 */
+rc = gettimeofday(&tv, NULL);
 if ( rc == 0 ) {
 char subsec[7];
 t = tv.tv_sec;



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



svn commit: r559402 - /tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c

2007-07-25 Thread rjung
Author: rjung
Date: Wed Jul 25 04:25:55 2007
New Revision: 559402

URL: http://svn.apache.org/viewvc?view=rev&rev=559402
Log:
Fix r559202 for netscape.
Rename variable "recover" to "is_error".

Modified:
tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c

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=559402&r1=559401&r2=559402
==
--- tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c (original)
+++ tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c Wed Jul 25 
04:25:55 2007
@@ -370,9 +370,9 @@
 if (init_ws_service(&private_data, &s)) {
 jk_endpoint_t *e = NULL;
 if (worker->get_endpoint(worker, &e, logger)) {
-int recover = JK_FALSE;
+int is_error = JK_HTTP_SERVER_ERROR;
 int result;
-if ((result = e->service(e, &s, logger, &recover)) > 0) {
+if ((result = e->service(e, &s, logger, &is_error)) > 0) {
 rc = REQ_PROCEED;
 if (JK_IS_DEBUG_LEVEL(logger))
 jk_log(logger, JK_LOG_DEBUG,



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



svn commit: r559462 - in /tomcat/connectors/trunk/jk/xdocs: ./ ajp/ generic_howto/ miscellaneous/ news/ reference/ webserver_howto/

2007-07-25 Thread rjung
Author: rjung
Date: Wed Jul 25 07:06:20 2007
New Revision: 559462

URL: http://svn.apache.org/viewvc?view=rev&rev=559462
Log:
Add a HowTo about the various timeouts.

Added:
tomcat/connectors/trunk/jk/xdocs/generic_howto/timeouts.xml   (with props)
Modified:
tomcat/connectors/trunk/jk/xdocs/ajp/project.xml
tomcat/connectors/trunk/jk/xdocs/generic_howto/loadbalancers.xml
tomcat/connectors/trunk/jk/xdocs/generic_howto/project.xml
tomcat/connectors/trunk/jk/xdocs/index.xml
tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
tomcat/connectors/trunk/jk/xdocs/miscellaneous/project.xml
tomcat/connectors/trunk/jk/xdocs/news/project.xml
tomcat/connectors/trunk/jk/xdocs/project.xml
tomcat/connectors/trunk/jk/xdocs/reference/project.xml
tomcat/connectors/trunk/jk/xdocs/webserver_howto/project.xml

Modified: tomcat/connectors/trunk/jk/xdocs/ajp/project.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/ajp/project.xml?view=diff&rev=559462&r1=559461&r2=559462
==
--- tomcat/connectors/trunk/jk/xdocs/ajp/project.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/ajp/project.xml Wed Jul 25 07:06:20 2007
@@ -24,6 +24,7 @@
 
 
 
+
 
 
 

Modified: tomcat/connectors/trunk/jk/xdocs/generic_howto/loadbalancers.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/generic_howto/loadbalancers.xml?view=diff&rev=559462&r1=559461&r2=559462
==
--- tomcat/connectors/trunk/jk/xdocs/generic_howto/loadbalancers.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/generic_howto/loadbalancers.xml Wed Jul 25 
07:06:20 2007
@@ -23,7 +23,7 @@
 
 
 LoadBalancer HowTo
-Mladen Tur
+Mladen Turk
 $Date$
 
 

Modified: tomcat/connectors/trunk/jk/xdocs/generic_howto/project.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/generic_howto/project.xml?view=diff&rev=559462&r1=559461&r2=559462
==
--- tomcat/connectors/trunk/jk/xdocs/generic_howto/project.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/generic_howto/project.xml Wed Jul 25 
07:06:20 2007
@@ -24,6 +24,7 @@
 
 
 
+
 
 
 

Added: tomcat/connectors/trunk/jk/xdocs/generic_howto/timeouts.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/generic_howto/timeouts.xml?view=auto&rev=559462
==
--- tomcat/connectors/trunk/jk/xdocs/generic_howto/timeouts.xml (added)
+++ tomcat/connectors/trunk/jk/xdocs/generic_howto/timeouts.xml Wed Jul 25 
07:06:20 2007
@@ -0,0 +1,250 @@
+
+
+]>
+
+
+  &project;
+
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+ 
+   http://www.apache.org/licenses/LICENSE-2.0
+ 
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+
+Timeouts HowTo
+Rainer Jung
+$Date$
+
+
+ 
+
+Setting communication timeouts is very important to improve the
+communication process. They help to detect problems and stabilize
+a distributed system. JK uses several different timeout values, which
+can be individually configured. This HowTo explains their use and gives
+hints how to find appropriate values.
+
+All timeouts are configured in the workers.properties file.
+For a complete reference of all worker configuration
+items, please consult the worker reference.
+This page assumes, that you are using at least version 1.2.16 of JK.
+Dependencies on newer versions will be mentioned where necessary.
+
+
+Do not set timeouts to extreme values. Very small timeouts will likely
+be counterproductive.
+
+
+Long Garbage Collection pauses on the backend do not make a good
+fit with some timeouts. Try to optimize your Java memory and GC settings.
+
+
+
+
+
+
+
+CPing/CPong is our notion for using small test packets to check the
+status of backend connections. JK can use such test packets directly after 
establishing
+a new backend connection and also directly before each request gets send to a 
backend.
+The waiting time for a CPong answer to a CPing can be configured.
+
+
+The test p

svn commit: r559478 - /tomcat/connectors/trunk/jk/native/common/jk_util.c

2007-07-25 Thread rjung
Author: rjung
Date: Wed Jul 25 07:33:07 2007
New Revision: 559478

URL: http://svn.apache.org/viewvc?view=rev&rev=559478
Log:
Another round: fix compilation error under windows
caused by the complex gettimeofday() macro.

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

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=diff&rev=559478&r1=559477&r2=559478
==
--- tomcat/connectors/trunk/jk/native/common/jk_util.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_util.c Wed Jul 25 07:33:07 2007
@@ -423,11 +423,13 @@
 #ifndef NO_GETTIMEOFDAY
 if ( l->log_fmt_type != JK_TIME_SUBSEC_NONE ) {
 struct timeval tv;
-int rc;
+int rc = 0;
 
-/* Don't concat the next line with the previous one, */
-/* because gettimeofday() is a macro for WIN32 */
+#ifdef WIN32
+gettimeofday(&tv, NULL);
+#else
 rc = gettimeofday(&tv, NULL);
+#endif
 if ( rc == 0 ) {
 char subsec[7];
 t = tv.tv_sec;



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



svn commit: r559480 - /tomcat/connectors/trunk/jk/native/common/jk_util.h

2007-07-25 Thread rjung
Author: rjung
Date: Wed Jul 25 07:43:01 2007
New Revision: 559480

URL: http://svn.apache.org/viewvc?view=rev&rev=559480
Log:
Fix comment typo.

Modified:
tomcat/connectors/trunk/jk/native/common/jk_util.h

Modified: tomcat/connectors/trunk/jk/native/common/jk_util.h
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_util.h?view=diff&rev=559480&r1=559479&r2=559480
==
--- tomcat/connectors/trunk/jk/native/common/jk_util.h (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_util.h Wed Jul 25 07:43:01 2007
@@ -229,7 +229,7 @@
 #endif
 
 /* i5/OS V5R4 need ASCII-EBCDIC conversion before stat() call */
-/* added a stat() mapper function, jk_map, for such purpose */
+/* added a stat() mapper function, jk_stat, for such purpose */
 
 int jk_stat(const char *f, struct stat * statbuf);
 



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



svn commit: r559517 - /tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml

2007-07-25 Thread rjung
Author: rjung
Date: Wed Jul 25 09:37:25 2007
New Revision: 559517

URL: http://svn.apache.org/viewvc?view=rev&rev=559517
Log:
Adding missing change items to changelog.

Modified:
tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml

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=559517&r1=559516&r2=559517
==
--- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Wed Jul 25 
09:37:25 2007
@@ -137,6 +137,20 @@
   is set during for configure. (rjung)
   
   
+  Use snprintf/vsnprintf from ap_snprintf.c for platforms other
+  than Windows, which might lack snprintf/vsnprintf implementations
+  when NOT build for Apache httpd 2.x/APR (e.g. Sub Web Server)
+  or without using configure. (fuankg)
+  
+  
+  Imported ap_snprintf() from Apache 1.3. (fuankg)
+  
+  
+  Add jk_stat() and jk_file_exists() as wrapper functions.
+  i5/OS V5R4 expects filename in ASCII for fopen but requires them
+  in EBCDIC for stat(). (hgomez)
+  
+  
   i5/OS (AS/400) V5R4 port where Apache 2.0 modules should now use UTF8. 
(hgomez)
   
   



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



svn commit: r559524 - /tomcat/connectors/trunk/jk/xdocs/reference/workers.xml

2007-07-25 Thread rjung
Author: rjung
Date: Wed Jul 25 10:07:55 2007
New Revision: 559524

URL: http://svn.apache.org/viewvc?view=rev&rev=559524
Log:
Fix docs about default connection pool size for IIS
and non-Apache.

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

Modified: tomcat/connectors/trunk/jk/xdocs/reference/workers.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/reference/workers.xml?view=diff&rev=559524&r1=559523&r2=559524
==
--- tomcat/connectors/trunk/jk/xdocs/reference/workers.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/reference/workers.xml Wed Jul 25 10:07:55 
2007
@@ -160,7 +160,8 @@
 should reflect the number of threads per child process. JK will discover
 the number of threads per child process on Apache 2 web server with worker-mpm 
and set
 its default value to match the ThreadsPerChild Apache directive. For IIS the 
default
-value is 10. For other web servers than Apache or IIS this value has to be set 
manually.
+value is 250. For other web servers than Apache or IIS the default value is 1
+and you should adjust it manually.
 
 Do not use connection_pool_size with values higher then 1 on Apache 
2.x prefork or Apache 1.3.x!
 



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



svn commit: r559745 - /tomcat/connectors/trunk/jk/tools/jkrelease.sh

2007-07-26 Thread rjung
Author: rjung
Date: Thu Jul 26 01:25:24 2007
New Revision: 559745

URL: http://svn.apache.org/viewvc?view=rev&rev=559745
Log:
Small improvements to release script:
- move variables to top of script
- add signature validation
- add timestamp to result file name
  when using local directory as source
- use functions for recurring steps

Modified:
tomcat/connectors/trunk/jk/tools/jkrelease.sh

Modified: tomcat/connectors/trunk/jk/tools/jkrelease.sh
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/tools/jkrelease.sh?view=diff&rev=559745&r1=559744&r2=559745
==
--- tomcat/connectors/trunk/jk/tools/jkrelease.sh (original)
+++ tomcat/connectors/trunk/jk/tools/jkrelease.sh Thu Jul 26 01:25:24 2007
@@ -10,6 +10,22 @@
 # gpg
 # And any one of: w3m, elinks, links (links2)
 
+SVNROOT="http://svn.apache.org/repos/asf";
+SVNPROJ="tomcat/connectors"
+JK_CVST="tomcat-connectors"
+
+JK_OWNER="root"
+JK_GROUP="bin"
+
+COPY_TOP="KEYS LICENSE NOTICE"
+COPY_JK="BUILD.txt native jkstatus support tools xdocs"
+COPY_BUILD="docs"
+COPY_CONF="uriworkermap.properties workers.properties 
workers.properties.minimal"
+
+ NO CHANGE BELOW THIS LINE ##
+
+ FUNCTIONS ##
+
 usage() {
 echo "Usage:: $0 -t VERSION [-b BRANCH | -T | -d DIR]"
 echo "-t: version to package"
@@ -18,6 +34,29 @@
 echo "-d: package from local directory"
 }
 
+copy_files() {
+src=$1
+target=$2
+list="$3"
+
+mkdir -p $target
+for item in $list
+do
+echo "Copying $item from $src ..."
+cp -pr $src/$item $target/
+done
+}
+
+sign_and_verify() {
+item=$1
+echo "Signing $item..."
+gpg -ba $item
+echo "Verifying signature for $item..."
+gpg --verify $item.asc
+}
+
+ MAIN ##
+
 conflict=0
 while getopts :t:b:d:T c
 do
@@ -61,19 +100,6 @@
 fi
 fi
 
-SVNROOT="http://svn.apache.org/repos/asf";
-SVNPROJ="tomcat/connectors"
-JK_CVST="tomcat-connectors"
-
-JK_OWNER="root"
-JK_GROUP="bin"
-
-COPY_TOP="KEYS LICENSE NOTICE"
-COPY_JK="BUILD.txt native jkstatus support tools xdocs"
-COPY_CONF="uriworkermap.properties workers.properties 
workers.properties.minimal"
-
- NO CHANGE BELOW THIS LINE ##
-
 if [ -z "$tag" ]
 then
 usage
@@ -109,7 +135,7 @@
echo "No Revision found at '$JK_SVN_URL'"
exit 3
 fi
-JK_DIST=${JK_CVST}-${tag}-dev-local-${JK_REV}-src
+JK_DIST=${JK_CVST}-${tag}-dev-local-`date +%y%m%d%H%M%S`-${JK_REV}-src
 else
 JK_VER=$tag
 JK_TAG=`echo $tag | sed -e 's#^#JK_#' -e 's#\.#_#g'`
@@ -135,42 +161,11 @@
 ant
 cd ../../..
 
-# Copying things into source distribution
-srcdir=${JK_DIST}.tmp
-targetdir=${JK_DIST}
-mkdir -p ${targetdir}
-for item in ${COPY_TOP}
-do
-echo "Copying $item from ${srcdir} ..."
-cp -pr ${srcdir}/$item ${targetdir}/
-done
-
-srcdir=${JK_DIST}.tmp/jk
-targetdir=${JK_DIST}
-mkdir -p ${targetdir}
-for item in ${COPY_JK}
-do
-echo "Copying $item from ${srcdir} ..."
-cp -pr ${srcdir}/$item ${targetdir}/
-done
-
-srcdir=${JK_DIST}.tmp/jk/build
-targetdir=${JK_DIST}
-mkdir -p ${targetdir}
-for item in docs
-do
-echo "Copying $item from ${srcdir} ..."
-cp -pr ${srcdir}/$item ${targetdir}/
-done
-
-srcdir=${JK_DIST}.tmp/jk/conf
-targetdir=${JK_DIST}/conf
-mkdir -p ${targetdir}
-for item in ${COPY_CONF}
-do
-echo "Copying $item from ${srcdir} ..."
-cp -pr ${srcdir}/$item ${targetdir}/
-done
+# Copying things into source the distribution
+copy_files ${JK_DIST}.tmp $JK_DIST "$COPY_TOP"
+copy_files ${JK_DIST}.tmp/jk $JK_DIST "$COPY_JK"
+copy_files ${JK_DIST}.tmp/jk/build $JK_DIST "$COPY_BUILD"
+copy_files ${JK_DIST}.tmp/jk/conf $JK_DIST/conf "$COPY_CONF"
 
 # Remove extra directories and files
 targetdir=${JK_DIST}
@@ -250,10 +245,13 @@
 ./buildconf.sh
 cd ../../
 
-# Pack and sign
+# Pack
 tar cfz ${JK_DIST}.tar.gz --owner="${JK_OWNER}" --group="${JK_GROUP}" 
${JK_DIST}
 perl ${JK_DIST}/tools/lineends.pl --cr ${JK_DIST}
 zip -9 -r ${JK_DIST}.zip ${JK_DIST}
-# Create detatched signature
-gpg -ba ${JK_DIST}.tar.gz
-gpg -ba ${JK_DIST}.zip
+
+# Create detached signature and verify it
+archive=${JK_DIST}.tar.gz
+sign_and_verify $archive
+archive=${JK_DIST}.zip
+sign_and_verify $archive



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



svn commit: r559753 - /tomcat/connectors/trunk/jk/tools/jkrelease.sh

2007-07-26 Thread rjung
Author: rjung
Date: Thu Jul 26 01:41:12 2007
New Revision: 559753

URL: http://svn.apache.org/viewvc?view=rev&rev=559753
Log:
Fix comment typo in release script.

Modified:
tomcat/connectors/trunk/jk/tools/jkrelease.sh

Modified: tomcat/connectors/trunk/jk/tools/jkrelease.sh
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/tools/jkrelease.sh?view=diff&rev=559753&r1=559752&r2=559753
==
--- tomcat/connectors/trunk/jk/tools/jkrelease.sh (original)
+++ tomcat/connectors/trunk/jk/tools/jkrelease.sh Thu Jul 26 01:41:12 2007
@@ -161,7 +161,7 @@
 ant
 cd ../../..
 
-# Copying things into source the distribution
+# Copying things into source distribution
 copy_files ${JK_DIST}.tmp $JK_DIST "$COPY_TOP"
 copy_files ${JK_DIST}.tmp/jk $JK_DIST "$COPY_JK"
 copy_files ${JK_DIST}.tmp/jk/build $JK_DIST "$COPY_BUILD"



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



  1   2   3   4   5   6   7   8   9   10   >