svn commit: r326453 - /tomcat/connectors/trunk/jk/native/apache-2.0/Makefile.in
Author: mturk Date: Wed Oct 19 01:11:26 2005 New Revision: 326453 URL: http://svn.apache.org/viewcvs?rev=326453&view=rev Log: Allow building with BSD-ish like make, that does not understand '$<' expansion. Modified: tomcat/connectors/trunk/jk/native/apache-2.0/Makefile.in Modified: tomcat/connectors/trunk/jk/native/apache-2.0/Makefile.in URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/native/apache-2.0/Makefile.in?rev=326453&r1=326452&r2=326453&view=diff == --- tomcat/connectors/trunk/jk/native/apache-2.0/Makefile.in (original) +++ tomcat/connectors/trunk/jk/native/apache-2.0/Makefile.in Wed Oct 19 01:11:26 2005 @@ -66,7 +66,7 @@ $(LIBTOOL) --mode=link ${COMPILE} `${APXS} -q LDFLAGS` -o $@ -module -rpath ${libexecdir} -avoid-version mod_jk.lo $(APACHE_OBJECTS) mod_jk.so: mod_jk.la - $(LIBTOOL) --mode=install cp $< `pwd`/$@ + $(LIBTOOL) --mode=install cp mod_jk.la `pwd`/$@ install_dynamic: @echo "" - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r327657 - in /tomcat/connectors/trunk: http11/src/java/org/apache/coyote/http11/ jni/java/org/apache/tomcat/jni/ jni/native/include/ jni/native/src/ util/java/org/apache/tomcat/util/net/
Author: mturk Date: Sat Oct 22 05:32:32 2005 New Revision: 327657 URL: http://svn.apache.org/viewcvs?rev=327657&view=rev Log: Add optimized function for send and recv using presetting of internal ByteBuffer. This way the number of JNI calls is lowered that gives much higher speed, because each send or recv call now have one function param and one JNI call less then before. Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/InternalAprInputBuffer.java tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/InternalAprOutputBuffer.java tomcat/connectors/trunk/jni/java/org/apache/tomcat/jni/Socket.java tomcat/connectors/trunk/jni/native/include/tcn.h tomcat/connectors/trunk/jni/native/src/network.c tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/InternalAprInputBuffer.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/InternalAprInputBuffer.java?rev=327657&r1=327656&r2=327657&view=diff == --- tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/InternalAprInputBuffer.java (original) +++ tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/InternalAprInputBuffer.java Sat Oct 22 05:32:32 2005 @@ -215,6 +215,7 @@ */ public void setSocket(long socket) { this.socket = socket; +Socket.setrbb(this.socket, bbuf); } @@ -405,8 +406,8 @@ } // Do a simple read with a short timeout bbuf.clear(); -int nRead = Socket.recvbt -(socket, bbuf, 0, buf.length - lastValid, readTimeout); +int nRead = Socket.recvbbt +(socket, 0, buf.length - lastValid, readTimeout); if (nRead > 0) { bbuf.limit(nRead); bbuf.get(buf, pos, nRead); @@ -435,8 +436,8 @@ } // Do a simple read with a short timeout bbuf.clear(); -int nRead = Socket.recvbt -(socket, bbuf, 0, buf.length - lastValid, readTimeout); +int nRead = Socket.recvbbt +(socket, 0, buf.length - lastValid, readTimeout); if (nRead > 0) { bbuf.limit(nRead); bbuf.get(buf, pos, nRead); @@ -779,8 +780,8 @@ } bbuf.clear(); -nRead = Socket.recvb -(socket, bbuf, 0, buf.length - lastValid); +nRead = Socket.recvbb +(socket, 0, buf.length - lastValid); if (nRead > 0) { bbuf.limit(nRead); bbuf.get(buf, pos, nRead); @@ -799,8 +800,8 @@ pos = 0; lastValid = 0; bbuf.clear(); -nRead = Socket.recvb -(socket, bbuf, 0, buf.length); +nRead = Socket.recvbb +(socket, 0, buf.length); if (nRead > 0) { bbuf.limit(nRead); bbuf.get(buf, 0, nRead); Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/InternalAprOutputBuffer.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/InternalAprOutputBuffer.java?rev=327657&r1=327656&r2=327657&view=diff == --- tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/InternalAprOutputBuffer.java (original) +++ tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/InternalAprOutputBuffer.java Sat Oct 22 05:32:32 2005 @@ -182,6 +182,7 @@ */ public void setSocket(long socket) { this.socket = socket; +Socket.setsbb(this.socket, bbuf); } @@ -694,7 +695,7 @@ protected void flushBuffer() throws IOException { if (bbuf.position() > 0) { -if (Socket.sendb(socket, bbuf, 0, bbuf.position()) < 0) { +if (Socket.sendbb(socket, 0, bbuf.position()) < 0) { throw new IOException(sm.getString("iib.failedwrite")); } bbuf.clear(); Modified: tomcat/connectors/trunk/jni/java/org/apache/tomcat/jni/Socket.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/java/org/apache/tomcat/jni/Socket.java?rev=327657&r1=327656&r2=327657&view=diff == --- tomcat/connectors/trunk/jni/java/org/apache/tomcat/jni/Socket.java (original) +++ tomcat/connectors/trunk/jni/java/org/apache/tomcat/jni/Socket.java Sat Oct 22 05:32:32 2005 @@ -240,6 +240,11 @@ */ public static native int sendb(long sock,
svn commit: r327659 - /tomcat/connectors/trunk/jni/native/src/network.c
Author: mturk Date: Sat Oct 22 05:55:02 2005 New Revision: 327659 URL: http://svn.apache.org/viewcvs?rev=327659&view=rev Log: Fix warnings for unused function parameters. Those functions does not use JNI function params any more. Modified: tomcat/connectors/trunk/jni/native/src/network.c Modified: tomcat/connectors/trunk/jni/native/src/network.c URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/native/src/network.c?rev=327659&r1=327658&r2=327659&view=diff == --- tomcat/connectors/trunk/jni/native/src/network.c (original) +++ tomcat/connectors/trunk/jni/native/src/network.c Sat Oct 22 05:55:02 2005 @@ -594,7 +594,7 @@ apr_size_t nbytes = (apr_size_t)len; apr_status_t ss; -UNREFERENCED(o); +UNREFERENCED_STDARGS; TCN_ASSERT(sock != 0); TCN_ASSERT(s->opaque != NULL); TCN_ASSERT(s->jsbbuff != NULL); @@ -854,7 +854,7 @@ apr_status_t ss; apr_size_t nbytes = (apr_size_t)len; -UNREFERENCED(o); +UNREFERENCED_STDARGS; TCN_ASSERT(sock != 0); TCN_ASSERT(s->opaque != NULL); TCN_ASSERT(s->jrbbuff != NULL); @@ -952,7 +952,7 @@ apr_size_t nbytes = (apr_size_t)len; apr_interval_time_t t; -UNREFERENCED(o); +UNREFERENCED_STDARGS; TCN_ASSERT(sock != 0); TCN_ASSERT(s->jrbbuff != NULL); TCN_ASSERT(s->opaque != NULL); @@ -1180,7 +1180,7 @@ apr_hdtr_t hdrs; apr_status_t ss; -UNREFERENCED(o); +UNREFERENCED_STDARGS; TCN_ASSERT(sock != 0); TCN_ASSERT(file != 0); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r331751 - in /tomcat/site/trunk: docs/download-connectors.html xdocs/download-connectors.xml
Author: mturk Date: Tue Nov 8 01:20:51 2005 New Revision: 331751 URL: http://svn.apache.org/viewcvs?rev=331751&view=rev Log: Update download-connectors for 1.2.15 release. 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/viewcvs/tomcat/site/trunk/docs/download-connectors.html?rev=331751&r1=331750&r2=331751&view=diff == --- tomcat/site/trunk/docs/download-connectors.html (original) +++ tomcat/site/trunk/docs/download-connectors.html Tue Nov 8 01:20:51 2005 @@ -218,18 +218,18 @@ -JK 1.2.14 Source Release tar.gz +JK 1.2.15 Source Release tar.gz -[http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.14/jakarta-tomcat-connectors-1.2.14.1-src.tar.gz.asc";>pgp] +[http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.15/jakarta-tomcat-connectors-1.2.15-src.tar.gz.asc";>pgp] -JK 1.2.14 Source Release zip +JK 1.2.15 Source Release zip -[http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.14/jakarta-tomcat-connectors-1.2.14.1-src.zip.asc";>pgp] +[http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.15/jakarta-tomcat-connectors-1.2.15-src.zip.asc";>pgp] Modified: tomcat/site/trunk/xdocs/download-connectors.xml URL: http://svn.apache.org/viewcvs/tomcat/site/trunk/xdocs/download-connectors.xml?rev=331751&r1=331750&r2=331751&view=diff == --- tomcat/site/trunk/xdocs/download-connectors.xml (original) +++ tomcat/site/trunk/xdocs/download-connectors.xml Tue Nov 8 01:20:51 2005 @@ -1,4 +1,4 @@ - + Tomcat Connectors (mod_jk, mod_jk2) DownloadsWe recommend you use a mirror to download our release builds, but you must verify the integrity of the downloaded files using signatures downloaded from our main @@ -19,4 +19,34 @@ [end] The KEYS link links to the code signing keys used to sign the product. The PGP link downloads the OpenPGP compatible signature from our main site. -For more information concerning Tomcat Connectors (mod_jk, mod_jk2), see the http://tomcat.apache.org/connectors-doc/"; class="name">Tomcat Connectors (mod_jk, mod_jk2) site. http://www.apache.org/dist/tomcat/tomcat-connectors/KEYS";>KEYSJK 1.2SourceJK 1.2.14 Source Release tar.gz[http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.14/jakarta-tomcat-connectors-1.2.14.1-src.tar.gz.asc";>pgp]JK 1.2.14 Source Release zip[http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.14/jakarta-tomcat-connectors-1.2.14.1-src.zip.asc";>pgp]JK 1.2 Binary ReleasesJK 2 (deprecated)SourceJK2 2.0.4 Source Release tar.gz[http://www.apache.org/dist/tomcat/tomcat-connectors/jk2/jakarta-tomcat-connectors-jk2-src-current.tar.gz.asc";>pgp]JK2 2.0.4 Source Release zip[http://www.apache.org/dist/tomcat/tomcat-connectors/jk2/jakarta-tomcat-connectors-jk2-src-current.zip.asc";>pgp]JK 2 Binary Releasesbrowse download areahttp://archive.apache.org/dist/tomcat/tomcat-connectors/";>archives... + +For more information concerning Tomcat Connectors (mod_jk, mod_jk2), see the http://tomcat.apache.org/connectors-doc/"; class="name">Tomcat Connectors (mod_jk, mod_jk2) site. + +http://www.apache.org/dist/tomcat/tomcat-connectors/KEYS";>KEYS + + + +JK 1.2 + +Source +JK 1.2.15 Source Release tar.gz +[http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.15/jakarta-tomcat-connectors-1.2.15-src.tar.gz.asc";>pgp] + + + +JK 1.2.15 Source Release zip +[http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.15/jakarta-tomcat-connectors-1.2.15-src.zip.asc";>pgp] + + + + + +JK 1.2 Binary Releases + + + +JK 2 (deprecated) + + +Source +JK2 2.0.4 Source Release tar.gz[http://www.apache.org/dist/tomcat/tomcat-connectors/jk2/jakarta-tomcat-connectors-jk2-src-current.tar.gz.asc";>pgp]JK2 2.0.4 Source Release zip[http://www.apache.org/dist/tomcat/tomcat-connectors/jk2/jakarta-tomcat-connectors-jk2-src-current.zip.asc";>pgp]JK 2 Binary Releasesbrowse download areahttp://archive.apache.org/dist/tomcat/tomcat-connectors/";>archives... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r331756 - in /tomcat/connectors/trunk/jk/xdocs: index.xml news/20050101.xml
Author: mturk Date: Tue Nov 8 01:40:10 2005 New Revision: 331756 URL: http://svn.apache.org/viewcvs?rev=331756&view=rev Log: Update docc to 1.2.15 release Modified: tomcat/connectors/trunk/jk/xdocs/index.xml tomcat/connectors/trunk/jk/xdocs/news/20050101.xml Modified: tomcat/connectors/trunk/jk/xdocs/index.xml URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/xdocs/index.xml?rev=331756&r1=331755&r2=331756&view=diff == --- tomcat/connectors/trunk/jk/xdocs/index.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/index.xml Tue Nov 8 01:40:10 2005 @@ -28,6 +28,17 @@ +8 November 2005 - JK-1.2.15 released +The Apache Tomcat team is proud to announce the immediate availability +of Jakarta Tomcat Connectors 1.2.15 Stable. + +Download the http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.15/jakarta-tomcat-connectors-1.2.15-src.tar.gz";>JK 1.2.15 release sources + | http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.15/jakarta-tomcat-connectors-1.2.15-src.tar.gz.asc";>PGP signature + +Download the http://www.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/";>binaries for selected platforms. + + + 13 July 2005 - JK-1.2.14 released The Apache Tomcat team is proud to announce the immediate availability of Jakarta Tomcat Connectors 1.2.14 Stable. Modified: tomcat/connectors/trunk/jk/xdocs/news/20050101.xml URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/xdocs/news/20050101.xml?rev=331756&r1=331755&r2=331756&view=diff == --- tomcat/connectors/trunk/jk/xdocs/news/20050101.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/news/20050101.xml Tue Nov 8 01:40:10 2005 @@ -21,6 +21,22 @@ --> + +8 November - JK-1.2.15 released +The Apache Tomcat team is proud to announce the immediate availability +of Jakarta Tomcat Connectors 1.2.15. This is Stable release and it contains +few bug fixes found in 1.2.14 version. + + + 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. + + + + 13 July - JK-1.2.14 released The Apache Tomcat team is proud to announce the immediate availability - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r354090 - /tomcat/connectors/tags/other/TOMCAT_NATIVE_1_1_1/
Author: mturk Date: Mon Dec 5 08:22:17 2005 New Revision: 354090 URL: http://svn.apache.org/viewcvs?rev=354090&view=rev Log: made a copy Added: tomcat/connectors/tags/other/TOMCAT_NATIVE_1_1_1/ - copied from r354089, tomcat/connectors/trunk/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r354093 - in /tomcat/build/tc5.5.x: build.properties.default tomcat.nsi
Author: mturk Date: Mon Dec 5 08:29:19 2005 New Revision: 354093 URL: http://svn.apache.org/viewcvs?rev=354093&view=rev Log: Use tomcat-native-1.1.1 version. Modified: tomcat/build/tc5.5.x/build.properties.default tomcat/build/tc5.5.x/tomcat.nsi Modified: tomcat/build/tc5.5.x/build.properties.default URL: http://svn.apache.org/viewcvs/tomcat/build/tc5.5.x/build.properties.default?rev=354093&r1=354092&r2=354093&view=diff == --- tomcat/build/tc5.5.x/build.properties.default (original) +++ tomcat/build/tc5.5.x/build.properties.default Mon Dec 5 08:29:19 2005 @@ -139,9 +139,9 @@ # - Tomcat native library - -tomcat-native.home=${base.path}/tomcat-native-1.1.0 +tomcat-native.home=${base.path}/tomcat-native-1.1.1 tomcat-native.tar.gz=${tomcat-native.home}/tomcat-native.tar.gz -tomcat-native.loc=${base-jakarta.loc}/tomcat-connectors/native/tomcat-native-1.1.0.tar.gz +tomcat-native.loc=${base-jakarta.loc}/tomcat-connectors/native/tomcat-native-1.1.1.tar.gz # -- Modified: tomcat/build/tc5.5.x/tomcat.nsi URL: http://svn.apache.org/viewcvs/tomcat/build/tc5.5.x/tomcat.nsi?rev=354093&r1=354092&r2=354093&view=diff == --- tomcat/build/tc5.5.x/tomcat.nsi (original) +++ tomcat/build/tc5.5.x/tomcat.nsi Mon Dec 5 08:29:19 2005 @@ -203,11 +203,11 @@ SectionIn 3 - NSISdl::download /TIMEOUT=3 http://tomcat.heanet.ie/native/1.1.0/binaries/win32/tcnative-1.dll $INSTDIR\bin\tcnative-1.dll + NSISdl::download /TIMEOUT=3 http://tomcat.heanet.ie/native/1.1.1/binaries/win32/tcnative-1.dll $INSTDIR\bin\tcnative-1.dll Pop $0 StrCmp $0 success success SetDetailsView show -DetailPrint "download failed from http://tomcat.heanet.ie/native/1.1.0/binaries/win32/tcnative-1.dll: $0" +DetailPrint "download failed from http://tomcat.heanet.ie/native/1.1.1/binaries/win32/tcnative-1.dll: $0" success: ClearErrors - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r354097 - in /tomcat/connectors/trunk/jni/native: include/tcn_version.h os/win32/libtcnative.rc
Author: mturk Date: Mon Dec 5 08:53:09 2005 New Revision: 354097 URL: http://svn.apache.org/viewcvs?rev=354097&view=rev Log: Update version to 1.1.1 Modified: tomcat/connectors/trunk/jni/native/include/tcn_version.h tomcat/connectors/trunk/jni/native/os/win32/libtcnative.rc Modified: tomcat/connectors/trunk/jni/native/include/tcn_version.h URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/native/include/tcn_version.h?rev=354097&r1=354096&r2=354097&view=diff == --- tomcat/connectors/trunk/jni/native/include/tcn_version.h (original) +++ tomcat/connectors/trunk/jni/native/include/tcn_version.h Mon Dec 5 08:53:09 2005 @@ -68,13 +68,13 @@ #define TCN_MINOR_VERSION 1 /** patch level */ -#define TCN_PATCH_VERSION 0 +#define TCN_PATCH_VERSION 1 /** * This symbol is defined for internal, "development" copies of TCN. This * symbol will be #undef'd for releases. */ -#define TCN_IS_DEV_VERSION +#undef TCN_IS_DEV_VERSION /** The formatted string of APU's version */ Modified: tomcat/connectors/trunk/jni/native/os/win32/libtcnative.rc URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/native/os/win32/libtcnative.rc?rev=354097&r1=354096&r2=354097&view=diff == --- tomcat/connectors/trunk/jni/native/os/win32/libtcnative.rc (original) +++ tomcat/connectors/trunk/jni/native/os/win32/libtcnative.rc Mon Dec 5 08:53:09 2005 @@ -19,7 +19,7 @@ "specific language governing permissions and " \ "limitations under the License." -#define TCN_VERISON "1.1.0-dev" +#define TCN_VERISON "1.1.1" 1000 ICON "apache.ico" 1001 DIALOGEX 0, 0, 252, 51 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r354098 - /tomcat/connectors/trunk/jni/native/src/jnilib.c
Author: mturk Date: Mon Dec 5 09:01:40 2005 New Revision: 354098 URL: http://svn.apache.org/viewcvs?rev=354098&view=rev Log: Add new line to the end of the file. No functional change. Modified: tomcat/connectors/trunk/jni/native/src/jnilib.c Modified: tomcat/connectors/trunk/jni/native/src/jnilib.c URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/native/src/jnilib.c?rev=354098&r1=354097&r2=354098&view=diff == --- tomcat/connectors/trunk/jni/native/src/jnilib.c (original) +++ tomcat/connectors/trunk/jni/native/src/jnilib.c Mon Dec 5 09:01:40 2005 @@ -457,4 +457,4 @@ TCN_DECLARE(JavaVM *) tcn_get_java_vm() { return tcn_global_vm; -} \ No newline at end of file +} - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r358770 - /tomcat/connectors/trunk/jk/native/apache-1.3/Makefile.in
Author: mturk Date: Fri Dec 23 00:42:05 2005 New Revision: 358770 URL: http://svn.apache.org/viewcvs?rev=358770&view=rev Log: Replace $< with real source name. This fixes building problems on BSD make systems like Solaris, etc... Modified: tomcat/connectors/trunk/jk/native/apache-1.3/Makefile.in Modified: tomcat/connectors/trunk/jk/native/apache-1.3/Makefile.in URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/native/apache-1.3/Makefile.in?rev=358770&r1=358769&r2=358770&view=diff == --- tomcat/connectors/trunk/jk/native/apache-1.3/Makefile.in (original) +++ tomcat/connectors/trunk/jk/native/apache-1.3/Makefile.in Fri Dec 23 00:42:05 2005 @@ -85,13 +85,13 @@ ${MOD_LINK} -o $@ $^ mod_jk.so: mod_jk.la - $(LIBTOOL) --mode=install cp $< `pwd`/$@ + $(LIBTOOL) --mode=install cp mod_jk.la `pwd`/$@ # # Common part. # mod_jk.lo: mod_jk.c - ${SH_COMPILE} -c $< -o $@ + ${SH_COMPILE} -c mod_jk.c -o $@ .c.lo: ${SH_COMPILE} -c $< -o $@ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r358771 - in /tomcat/connectors/trunk/jk/native: common/portable.h.sample iis/installer/isapi-redirector-win32-msi.ism iis/isapi_redirect.rc
Author: mturk Date: Fri Dec 23 00:44:22 2005 New Revision: 358771 URL: http://svn.apache.org/viewcvs?rev=358771&view=rev Log: Update version numbers to current 1.2.16-dev Modified: tomcat/connectors/trunk/jk/native/common/portable.h.sample 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/common/portable.h.sample URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/native/common/portable.h.sample?rev=358771&r1=358770&r2=358771&view=diff == --- tomcat/connectors/trunk/jk/native/common/portable.h.sample (original) +++ tomcat/connectors/trunk/jk/native/common/portable.h.sample Fri Dec 23 00:44:22 2005 @@ -108,4 +108,4 @@ #define USE_SO_SNDTIMEO 1 /* Version number of package */ -#define VERSION "1.2.14" +#define VERSION "1.2.16" Modified: tomcat/connectors/trunk/jk/native/iis/installer/isapi-redirector-win32-msi.ism URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/native/iis/installer/isapi-redirector-win32-msi.ism?rev=358771&r1=358770&r2=358771&view=diff == --- 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 Fri Dec 23 00:44:22 2005 @@ -3288,7 +3288,7 @@ ProductIDnone ProductLanguage1033 ProductNameJakarta Isapi Redirector - ProductVersion1.2.15 + ProductVersion1.2.16 ProgressType0install ProgressType1Installing ProgressType2installed Modified: tomcat/connectors/trunk/jk/native/iis/isapi_redirect.rc URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/native/iis/isapi_redirect.rc?rev=358771&r1=358770&r2=358771&view=diff == --- tomcat/connectors/trunk/jk/native/iis/isapi_redirect.rc (original) +++ tomcat/connectors/trunk/jk/native/iis/isapi_redirect.rc Fri Dec 23 00:44:22 2005 @@ -14,7 +14,7 @@ "specific language governing permissions and " \ "limitations under the License." -#define JK_VERSION_STR "1.2.14-dev" +#define JK_VERSION_STR "1.2.16-dev" #define JK_DLL_BASENAME "isapi_redirect-" JK_VERSION_STR - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r358772 - /tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c
Author: mturk Date: Fri Dec 23 00:46:06 2005 New Revision: 358772 URL: http://svn.apache.org/viewcvs?rev=358772&view=rev Log: Fix Cookie2 header problems caused by Cookie2 been always sent as Cookie. This is modified patch provided by Andre Gebers. 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/viewcvs/tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c?rev=358772&r1=358771&r2=358772&view=diff == --- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Fri Dec 23 00:46:06 2005 @@ -300,7 +300,9 @@ return UNKNOWN_METHOD; break; case 'C': -if (memcmp(p, "OOKIE", 5) == 0) +if(memcmp(p, "OOKIE2", 6) == 0) +return SC_COOKIE2; +else if (memcmp(p, "OOKIE", 5) == 0) return SC_COOKIE; else if(memcmp(p, "ONNECTION", 9) == 0) return SC_CONNECTION; @@ -308,8 +310,6 @@ return SC_CONTENT_TYPE; else if(memcmp(p, "ONTENT-LENGTH", 13) == 0) return SC_CONTENT_LENGTH; -else if(memcmp(p, "OOKIE2", 6) == 0) -return SC_COOKIE2; else return UNKNOWN_METHOD; break; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r358775 - /tomcat/connectors/trunk/jk/xdocs/changelog.xml
Author: mturk Date: Fri Dec 23 00:57:43 2005 New Revision: 358775 URL: http://svn.apache.org/viewcvs?rev=358775&view=rev Log: Cookie2 fix notation. Modified: tomcat/connectors/trunk/jk/xdocs/changelog.xml Modified: tomcat/connectors/trunk/jk/xdocs/changelog.xml URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/xdocs/changelog.xml?rev=358775&r1=358774&r2=358775&view=diff == --- tomcat/connectors/trunk/jk/xdocs/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/changelog.xml Fri Dec 23 00:57:43 2005 @@ -26,6 +26,10 @@ + Fix AJP13 Cookie2 parsing. Cookie2 was always send as Cookie. + Patch provided by Andre Gebers. (mturk) + + 35862: NSAPI plugin attempts to read freed memory and attempts to dereference a null pointer. Patch provided by Brian Kavanagh. (markt) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r368776 - in /tomcat/connectors/trunk/jni: java/org/apache/tomcat/jni/File.java native/src/file.c
Author: mturk Date: Fri Jan 13 08:29:09 2006 New Revision: 368776 URL: http://svn.apache.org/viewcvs?rev=368776&view=rev Log: Mark that pool for remove and rename is unused, because APR actually does not use it. No API and no functional change, and since it's not used by APR connector, the patch is irrelevant :) Modified: tomcat/connectors/trunk/jni/java/org/apache/tomcat/jni/File.java tomcat/connectors/trunk/jni/native/src/file.c Modified: tomcat/connectors/trunk/jni/java/org/apache/tomcat/jni/File.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/java/org/apache/tomcat/jni/File.java?rev=368776&r1=368775&r2=368776&view=diff == --- tomcat/connectors/trunk/jni/java/org/apache/tomcat/jni/File.java (original) +++ tomcat/connectors/trunk/jni/java/org/apache/tomcat/jni/File.java Fri Jan 13 08:29:09 2006 @@ -255,7 +255,7 @@ /** * Delete the specified file. * @param path The full path to the file (using / on all systems) - * @param pool The pool to use. + * @param pool Unused. * If the file is open, it won't be removed until all * instances are closed. */ @@ -268,7 +268,7 @@ * possible. * @param fromPath The full path to the original file (using / on all systems) * @param toPath The full path to the new file (using / on all systems) - * @param pool The pool to use. + * @param pool Unused. */ public static native int rename(String fromPath, String toPath, long pool); Modified: tomcat/connectors/trunk/jni/native/src/file.c URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/native/src/file.c?rev=368776&r1=368775&r2=368776&view=diff == --- tomcat/connectors/trunk/jni/native/src/file.c (original) +++ tomcat/connectors/trunk/jni/native/src/file.c Fri Jan 13 08:29:09 2006 @@ -112,12 +112,12 @@ TCN_IMPLEMENT_CALL(jint, File, remove)(TCN_STDARGS, jstring path, jlong pool) { -apr_pool_t *p = J2P(pool, apr_pool_t *); TCN_ALLOC_CSTRING(path); apr_status_t rv; UNREFERENCED(o); -rv = apr_file_remove(J2S(path), p); +UNREFERENCED(pool); +rv = apr_file_remove(J2S(path), NULL); TCN_FREE_CSTRING(path); return (jint)rv; } @@ -125,13 +125,13 @@ TCN_IMPLEMENT_CALL(jint, File, rename)(TCN_STDARGS, jstring from, jstring to, jlong pool) { -apr_pool_t *p = J2P(pool, apr_pool_t *); TCN_ALLOC_CSTRING(from); TCN_ALLOC_CSTRING(to); apr_status_t rv; UNREFERENCED(o); -rv = apr_file_rename(J2S(from), J2S(to), p); +UNREFERENCED(pool); +rv = apr_file_rename(J2S(from), J2S(to), NULL); TCN_FREE_CSTRING(from); TCN_FREE_CSTRING(to); return (jint)rv; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r369000 - in /tomcat/connectors/trunk/jni: java/org/apache/tomcat/jni/File.java native/src/file.c
Author: mturk Date: Sat Jan 14 00:08:44 2006 New Revision: 369000 URL: http://svn.apache.org/viewcvs?rev=369000&view=rev Log: Revert note about unused pool. APR guys say it might be used sometime in the future :) Modified: tomcat/connectors/trunk/jni/java/org/apache/tomcat/jni/File.java tomcat/connectors/trunk/jni/native/src/file.c Modified: tomcat/connectors/trunk/jni/java/org/apache/tomcat/jni/File.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/java/org/apache/tomcat/jni/File.java?rev=369000&r1=368999&r2=369000&view=diff == --- tomcat/connectors/trunk/jni/java/org/apache/tomcat/jni/File.java (original) +++ tomcat/connectors/trunk/jni/java/org/apache/tomcat/jni/File.java Sat Jan 14 00:08:44 2006 @@ -255,7 +255,7 @@ /** * Delete the specified file. * @param path The full path to the file (using / on all systems) - * @param pool Unused. + * @param pool The pool to use. * If the file is open, it won't be removed until all * instances are closed. */ @@ -268,7 +268,7 @@ * possible. * @param fromPath The full path to the original file (using / on all systems) * @param toPath The full path to the new file (using / on all systems) - * @param pool Unused. + * @param pool The pool to use. */ public static native int rename(String fromPath, String toPath, long pool); Modified: tomcat/connectors/trunk/jni/native/src/file.c URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/native/src/file.c?rev=369000&r1=368999&r2=369000&view=diff == --- tomcat/connectors/trunk/jni/native/src/file.c (original) +++ tomcat/connectors/trunk/jni/native/src/file.c Sat Jan 14 00:08:44 2006 @@ -112,12 +112,12 @@ TCN_IMPLEMENT_CALL(jint, File, remove)(TCN_STDARGS, jstring path, jlong pool) { +apr_pool_t *p = J2P(pool, apr_pool_t *); TCN_ALLOC_CSTRING(path); apr_status_t rv; UNREFERENCED(o); -UNREFERENCED(pool); -rv = apr_file_remove(J2S(path), NULL); +rv = apr_file_remove(J2S(path), p); TCN_FREE_CSTRING(path); return (jint)rv; } @@ -125,13 +125,13 @@ TCN_IMPLEMENT_CALL(jint, File, rename)(TCN_STDARGS, jstring from, jstring to, jlong pool) { +apr_pool_t *p = J2P(pool, apr_pool_t *); TCN_ALLOC_CSTRING(from); TCN_ALLOC_CSTRING(to); apr_status_t rv; UNREFERENCED(o); -UNREFERENCED(pool); -rv = apr_file_rename(J2S(from), J2S(to), NULL); +rv = apr_file_rename(J2S(from), J2S(to), p); TCN_FREE_CSTRING(from); TCN_FREE_CSTRING(to); return (jint)rv; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r375626 - /tomcat/connectors/trunk/jni/native/src/network.c
Author: mturk Date: Tue Feb 7 07:24:06 2006 New Revision: 375626 URL: http://svn.apache.org/viewcvs?rev=375626&view=rev Log: Make sure that all the bytes are send when calling sendbb. Since APR might return partial writes, add a loop that will resolve that. Modified: tomcat/connectors/trunk/jni/native/src/network.c Modified: tomcat/connectors/trunk/jni/native/src/network.c URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/native/src/network.c?rev=375626&r1=375625&r2=375626&view=diff == --- tomcat/connectors/trunk/jni/native/src/network.c (original) +++ tomcat/connectors/trunk/jni/native/src/network.c Tue Feb 7 07:24:06 2006 @@ -280,7 +280,7 @@ GET_S_FAMILY(f, family); GET_S_TYPE(t, type); -if (family >= 0) { +if (family >= 0) { TCN_THROW_IF_ERR(apr_socket_create(&s, f, t, protocol, p), a); } @@ -592,6 +592,7 @@ { tcn_socket_t *s = J2P(sock, tcn_socket_t *); apr_size_t nbytes = (apr_size_t)len; +apr_size_t sent = 0; apr_status_t ss; UNREFERENCED_STDARGS; @@ -605,10 +606,15 @@ sp_num_send++; #endif -ss = (*s->net->send)(s->opaque, s->jsbbuff + offset, &nbytes); - +while (sent < nbytes) { + apr_size_t wr = nbytes - sent; + ss = (*s->net->send)(s->opaque, s->jsbbuff + offset + sent, &wr); + if (ss != APR_SUCCESS) + break; + sent += wr; +} if (ss == APR_SUCCESS) -return (jint)nbytes; +return (jint)sent; else { TCN_ERROR_WRAP(ss); return -(jint)ss; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r375890 - /tomcat/connectors/trunk/jni/native/os/win32/libtcnative.rc
Author: mturk Date: Wed Feb 8 00:13:47 2006 New Revision: 375890 URL: http://svn.apache.org/viewcvs?rev=375890&view=rev Log: Update to current version (1.1.2) Modified: tomcat/connectors/trunk/jni/native/os/win32/libtcnative.rc Modified: tomcat/connectors/trunk/jni/native/os/win32/libtcnative.rc URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/native/os/win32/libtcnative.rc?rev=375890&r1=375889&r2=375890&view=diff == --- tomcat/connectors/trunk/jni/native/os/win32/libtcnative.rc (original) +++ tomcat/connectors/trunk/jni/native/os/win32/libtcnative.rc Wed Feb 8 00:13:47 2006 @@ -3,7 +3,7 @@ LANGUAGE 0x9,0x1 1 11 logmessages.bin -#define TCN_COPYRIGHT "Copyright 2000-2005 The Apache Software " \ +#define TCN_COPYRIGHT "Copyright 2000-2006 The Apache Software " \ "Foundation or its licensors, as applicable." #define TCN_LICENSE "Licensed under the Apache License, Version 2.0 " \ @@ -19,7 +19,7 @@ "specific language governing permissions and " \ "limitations under the License." -#define TCN_VERISON "1.1.1" +#define TCN_VERISON "1.1.2" 1000 ICON "apache.ico" 1001 DIALOGEX 0, 0, 252, 51 @@ -35,8 +35,8 @@ END 1 VERSIONINFO - FILEVERSION 1,1,0,0 - PRODUCTVERSION 1,1,0,0 + FILEVERSION 1,1,2,0 + PRODUCTVERSION 1,1,2,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -55,9 +55,9 @@ VALUE "CompanyName", "Apache Software Foundation\0" VALUE "FileDescription", "Tomcat Native Java Library\0" VALUE "FileVersion", TCN_VERISON "\0" -VALUE "InternalName", "libtcnative-1" +VALUE "InternalName", "libtcnative-1\0" VALUE "LegalCopyright", TCN_COPYRIGHT "\0" -VALUE "OriginalFilename", "libtcnative-1.dll" +VALUE "OriginalFilename", "libtcnative-1.dll\0" VALUE "ProductName", "Tomcat Native Java Library\0" VALUE "ProductVersion", TCN_VERISON "\0" END - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r375945 - /tomcat/connectors/trunk/jni/native/src/network.c
Author: mturk Date: Wed Feb 8 04:35:08 2006 New Revision: 375945 URL: http://svn.apache.org/viewcvs?rev=375945&view=rev Log: Use send loop for all send(b) calls. Modified: tomcat/connectors/trunk/jni/native/src/network.c Modified: tomcat/connectors/trunk/jni/native/src/network.c URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/native/src/network.c?rev=375945&r1=375944&r2=375945&view=diff == --- tomcat/connectors/trunk/jni/native/src/network.c (original) +++ tomcat/connectors/trunk/jni/native/src/network.c Wed Feb 8 04:35:08 2006 @@ -562,6 +562,7 @@ { tcn_socket_t *s = J2P(sock, tcn_socket_t *); apr_size_t nbytes = (apr_size_t)len; +apr_size_t sent = 0; char *bytes; apr_status_t ss; @@ -577,10 +578,17 @@ #endif bytes = (char *)(*e)->GetDirectBufferAddress(e, buf); -ss = (*s->net->send)(s->opaque, bytes + offset, &nbytes); + +while (sent < nbytes) { +apr_size_t wr = nbytes - sent; +ss = (*s->net->send)(s->opaque, bytes + offset + sent, &wr); +if (ss != APR_SUCCESS) +break; +sent += wr; +} if (ss == APR_SUCCESS) -return (jint)nbytes; +return (jint)sent; else { TCN_ERROR_WRAP(ss); return -(jint)ss; @@ -607,11 +615,11 @@ #endif while (sent < nbytes) { - apr_size_t wr = nbytes - sent; - ss = (*s->net->send)(s->opaque, s->jsbbuff + offset + sent, &wr); - if (ss != APR_SUCCESS) - break; - sent += wr; +apr_size_t wr = nbytes - sent; +ss = (*s->net->send)(s->opaque, s->jsbbuff + offset + sent, &wr); +if (ss != APR_SUCCESS) +break; +sent += wr; } if (ss == APR_SUCCESS) return (jint)sent; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r376231 - /tomcat/connectors/trunk/jni/native/src/network.c
Author: mturk Date: Thu Feb 9 01:05:50 2006 New Revision: 376231 URL: http://svn.apache.org/viewcvs?rev=376231&view=rev Log: Fix compile time warnings, as well as case where the send length is 0 (should never happen) Modified: tomcat/connectors/trunk/jni/native/src/network.c Modified: tomcat/connectors/trunk/jni/native/src/network.c URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/native/src/network.c?rev=376231&r1=376230&r2=376231&view=diff == --- tomcat/connectors/trunk/jni/native/src/network.c (original) +++ tomcat/connectors/trunk/jni/native/src/network.c Thu Feb 9 01:05:50 2006 @@ -564,7 +564,7 @@ apr_size_t nbytes = (apr_size_t)len; apr_size_t sent = 0; char *bytes; -apr_status_t ss; +apr_status_t ss = APR_SUCCESS; UNREFERENCED(o); TCN_ASSERT(sock != 0); @@ -601,7 +601,7 @@ tcn_socket_t *s = J2P(sock, tcn_socket_t *); apr_size_t nbytes = (apr_size_t)len; apr_size_t sent = 0; -apr_status_t ss; +apr_status_t ss = APR_SUCCESS; UNREFERENCED_STDARGS; TCN_ASSERT(sock != 0); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r376234 - /tomcat/connectors/tags/other/TOMCAT_NATIVE_1_1_2/
Author: mturk Date: Thu Feb 9 01:15:42 2006 New Revision: 376234 URL: http://svn.apache.org/viewcvs?rev=376234&view=rev Log: made a copy Added: tomcat/connectors/tags/other/TOMCAT_NATIVE_1_1_2/ - copied from r376233, tomcat/connectors/trunk/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r376634 - /tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java
Author: mturk Date: Fri Feb 10 03:07:52 2006 New Revision: 376634 URL: http://svn.apache.org/viewcvs?rev=376634&view=rev Log: Use APR_UNSPEC only! if apr was compiled with IPV6 support. Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=376634&r1=376633&r2=376634&view=diff == --- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java (original) +++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Fri Feb 10 03:07:52 2006 @@ -174,7 +174,7 @@ */ protected long serverSockPool = 0; - + /** * SSL context. */ @@ -356,7 +356,7 @@ */ public int getMinSpareThreads() { return 0; } - + /** * SSL engine. */ @@ -364,7 +364,7 @@ public String getSSLEngine() { return SSLEngine; } public void setSSLEngine(String SSLEngine) { this.SSLEngine = SSLEngine; } - + /** * SSL protocols. */ @@ -372,7 +372,7 @@ public String getSSLProtocol() { return SSLProtocol; } public void setSSLProtocol(String SSLProtocol) { this.SSLProtocol = SSLProtocol; } - + /** * SSL password (if a cert is encrypted, and no password has been provided, a callback * will ask for a password). @@ -388,15 +388,15 @@ protected String SSLCipherSuite = "ALL"; public String getSSLCipherSuite() { return SSLCipherSuite; } public void setSSLCipherSuite(String SSLCipherSuite) { this.SSLCipherSuite = SSLCipherSuite; } - - + + /** * SSL certificate file. */ protected String SSLCertificateFile = null; public String getSSLCertificateFile() { return SSLCertificateFile; } public void setSSLCertificateFile(String SSLCertificateFile) { this.SSLCertificateFile = SSLCertificateFile; } - + /** * SSL certificate key file. @@ -405,14 +405,14 @@ public String getSSLCertificateKeyFile() { return SSLCertificateKeyFile; } public void setSSLCertificateKeyFile(String SSLCertificateKeyFile) { this.SSLCertificateKeyFile = SSLCertificateKeyFile; } - + /** * SSL certificate chain file. */ protected String SSLCertificateChainFile = null; public String getSSLCertificateChainFile() { return SSLCertificateChainFile; } public void setSSLCertificateChainFile(String SSLCertificateChainFile) { this.SSLCertificateChainFile = SSLCertificateChainFile; } - + /** * SSL CA certificate path. @@ -420,23 +420,23 @@ protected String SSLCACertificatePath = null; public String getSSLCACertificatePath() { return SSLCACertificatePath; } public void setSSLCACertificatePath(String SSLCACertificatePath) { this.SSLCACertificatePath = SSLCACertificatePath; } - - + + /** * SSL CA certificate file. */ protected String SSLCACertificateFile = null; public String getSSLCACertificateFile() { return SSLCACertificateFile; } public void setSSLCACertificateFile(String SSLCACertificateFile) { this.SSLCACertificateFile = SSLCACertificateFile; } - - + + /** * SSL CA revocation path. */ protected String SSLCARevocationPath = null; public String getSSLCARevocationPath() { return SSLCARevocationPath; } public void setSSLCARevocationPath(String SSLCARevocationPath) { this.SSLCARevocationPath = SSLCARevocationPath; } - + /** * SSL CA revocation file. @@ -444,24 +444,24 @@ protected String SSLCARevocationFile = null; public String getSSLCARevocationFile() { return SSLCARevocationFile; } public void setSSLCARevocationFile(String SSLCARevocationFile) { this.SSLCARevocationFile = SSLCARevocationFile; } - - + + /** * SSL verify client. */ protected String SSLVerifyClient = "none"; public String getSSLVerifyClient() { return SSLVerifyClient; } public void setSSLVerifyClient(String SSLVerifyClient) { this.SSLVerifyClient = SSLVerifyClient; } - - + + /** * SSL verify depth. */ protected int SSLVerifyDepth = 10; public int getSSLVerifyDepth() { return SSLVerifyDepth; } public void setSSLVerifyDepth(int SSLVerifyDepth) { this.SSLVerifyDepth = SSLVerifyDepth; } - - + + // - Public Methods @@ -528,13 +528,16 @@ } else { addressStr = address.getHostAddress(); } -long inetAddress = Address.info(addressStr, Socket.APR_UNSPEC, +int family = Socket.APR_INET; +if (Library.APR_HAVE_IPV6) +family= Socket.APR_UNSPEC; +
svn commit: r378494 - /tomcat/connectors/trunk/jni/native/src/error.c
Author: mturk Date: Fri Feb 17 04:13:21 2006 New Revision: 378494 URL: http://svn.apache.org/viewcvs?rev=378494&view=rev Log: Add custom messages for our custom return values. Without that the apr_strerror returns "APR does not understand this error code." Modified: tomcat/connectors/trunk/jni/native/src/error.c Modified: tomcat/connectors/trunk/jni/native/src/error.c URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/native/src/error.c?rev=378494&r1=378493&r2=378494&view=diff == --- tomcat/connectors/trunk/jni/native/src/error.c (original) +++ tomcat/connectors/trunk/jni/native/src/error.c Fri Feb 17 04:13:21 2006 @@ -21,6 +21,16 @@ #include "tcn.h" +static const char *tcn_errors[] = { +"Unknown user error", +/* TCN_TIMEUP */ "Operation timed out", +/* TCN_EAGAIN */ "There is no data ready", +/* TCN_EINTR */ "Interrupted system call", +/* TCN_EINPROGRESS */ "Operation in prrogress", +/* TCN_ETIMEDOUT */ "Connection timed out", +NULL, +}; + /* Merge IS_ETIMEDOUT with APR_TIMEUP */ #define TCN_STATUS_IS_ETIMEDOUT(x) (APR_STATUS_IS_ETIMEDOUT((x)) || ((x) == APR_TIMEUP)) @@ -121,9 +131,14 @@ jstring jerr; UNREFERENCED(o); -apr_strerror(err, serr, 512); - -jerr = AJP_TO_JSTRING(serr); +if (err >= TCN_TIMEUP && err <= TCN_ETIMEDOUT) { +err -= TCN_TIMEUP; +jerr = AJP_TO_JSTRING(tcn_errors[err]); +} +else { +apr_strerror(err, serr, 512); +jerr = AJP_TO_JSTRING(serr); +} return jerr; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r378495 - /tomcat/connectors/trunk/jni/native/src/error.c
Author: mturk Date: Fri Feb 17 04:24:44 2006 New Revision: 378495 URL: http://svn.apache.org/viewcvs?rev=378495&view=rev Log: Report unknown errors. Modified: tomcat/connectors/trunk/jni/native/src/error.c Modified: tomcat/connectors/trunk/jni/native/src/error.c URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/native/src/error.c?rev=378495&r1=378494&r2=378495&view=diff == --- tomcat/connectors/trunk/jni/native/src/error.c (original) +++ tomcat/connectors/trunk/jni/native/src/error.c Fri Feb 17 04:24:44 2006 @@ -22,13 +22,13 @@ #include "tcn.h" static const char *tcn_errors[] = { -"Unknown user error", +"Unknow user error", /* TCN_TIMEUP */ "Operation timed out", /* TCN_EAGAIN */ "There is no data ready", /* TCN_EINTR */ "Interrupted system call", -/* TCN_EINPROGRESS */ "Operation in prrogress", +/* TCN_EINPROGRESS */ "Operation in progress", /* TCN_ETIMEDOUT */ "Connection timed out", -NULL, +NULL }; /* Merge IS_ETIMEDOUT with APR_TIMEUP @@ -133,7 +133,10 @@ UNREFERENCED(o); if (err >= TCN_TIMEUP && err <= TCN_ETIMEDOUT) { err -= TCN_TIMEUP; -jerr = AJP_TO_JSTRING(tcn_errors[err]); +jerr = AJP_TO_JSTRING(tcn_errors[err + 1]); +} +else if (err > TCN_ETIMEDOUT) { +jerr = AJP_TO_JSTRING(tcn_errors[0]); } else { apr_strerror(err, serr, 512); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r378496 - /tomcat/connectors/trunk/jni/native/src/error.c
Author: mturk Date: Fri Feb 17 04:31:18 2006 New Revision: 378496 URL: http://svn.apache.org/viewcvs?rev=378496&view=rev Log: Fix the typo. Modified: tomcat/connectors/trunk/jni/native/src/error.c Modified: tomcat/connectors/trunk/jni/native/src/error.c URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/native/src/error.c?rev=378496&r1=378495&r2=378496&view=diff == --- tomcat/connectors/trunk/jni/native/src/error.c (original) +++ tomcat/connectors/trunk/jni/native/src/error.c Fri Feb 17 04:31:18 2006 @@ -22,7 +22,7 @@ #include "tcn.h" static const char *tcn_errors[] = { -"Unknow user error", +"Unknown user error", /* TCN_TIMEUP */ "Operation timed out", /* TCN_EAGAIN */ "There is no data ready", /* TCN_EINTR */ "Interrupted system call", - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r378499 - /tomcat/connectors/trunk/jni/native/src/error.c
Author: mturk Date: Fri Feb 17 04:48:32 2006 New Revision: 378499 URL: http://svn.apache.org/viewcvs?rev=378499&view=rev Log: Check only for our custom messages, and leave to APR to deal with others. Modified: tomcat/connectors/trunk/jni/native/src/error.c Modified: tomcat/connectors/trunk/jni/native/src/error.c URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/native/src/error.c?rev=378499&r1=378498&r2=378499&view=diff == --- tomcat/connectors/trunk/jni/native/src/error.c (original) +++ tomcat/connectors/trunk/jni/native/src/error.c Fri Feb 17 04:48:32 2006 @@ -135,9 +135,6 @@ err -= TCN_TIMEUP; jerr = AJP_TO_JSTRING(tcn_errors[err + 1]); } -else if (err > TCN_ETIMEDOUT) { -jerr = AJP_TO_JSTRING(tcn_errors[0]); -} else { apr_strerror(err, serr, 512); jerr = AJP_TO_JSTRING(serr); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r378586 - /tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java
Author: mturk Date: Fri Feb 17 10:46:47 2006 New Revision: 378586 URL: http://svn.apache.org/viewcvs?rev=378586&view=rev Log: Use Library.APR_HAS_SENDFILE as default value for sendfile flag. Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=378586&r1=378585&r2=378586&view=diff == --- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java (original) +++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Fri Feb 17 10:46:47 2006 @@ -306,7 +306,7 @@ /** * Use endfile for sending static files. */ -protected boolean useSendfile = true; +protected boolean useSendfile = Library.APR_HAS_SENDFILE; public void setUseSendfile(boolean useSendfile) { this.useSendfile = useSendfile; } public boolean getUseSendfile() { return useSendfile; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r378588 - /tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java
Author: mturk Date: Fri Feb 17 10:52:26 2006 New Revision: 378588 URL: http://svn.apache.org/viewcvs?rev=378588&view=rev Log: When APR_HAS_SENDFILE is disabled always return false no mater what user set in the config. Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=378588&r1=378587&r2=378588&view=diff == --- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java (original) +++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Fri Feb 17 10:52:26 2006 @@ -306,9 +306,9 @@ /** * Use endfile for sending static files. */ -protected boolean useSendfile = Library.APR_HAS_SENDFILE; +protected boolean useSendfile = true; public void setUseSendfile(boolean useSendfile) { this.useSendfile = useSendfile; } -public boolean getUseSendfile() { return useSendfile; } +public boolean getUseSendfile() { return Library.APR_HAS_SENDFILE ? useSendfile : false; } /** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r378858 - in /tomcat/connectors/trunk: jni/native/src/network.c util/java/org/apache/tomcat/util/net/AprEndpoint.java
Author: mturk Date: Sun Feb 19 00:43:23 2006 New Revision: 378858 URL: http://svn.apache.org/viewcvs?rev=378858&view=rev Log: Revert checking for sendfile support in bean getter, but keep the default value for useSendfile depending on APR support, so that there is no unneeded warning. Also create a dummy JNI implementation returning APR_ENOTIMPL, so that library link don't report errors. Modified: tomcat/connectors/trunk/jni/native/src/network.c tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Modified: tomcat/connectors/trunk/jni/native/src/network.c URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/native/src/network.c?rev=378858&r1=378857&r2=378858&view=diff == --- tomcat/connectors/trunk/jni/native/src/network.c (original) +++ tomcat/connectors/trunk/jni/native/src/network.c Sun Feb 19 00:43:23 2006 @@ -1103,6 +1103,7 @@ return mark ? JNI_TRUE : JNI_FALSE; } +#if APR_HAS_SENDFILE TCN_IMPLEMENT_CALL(jlong, Socket, sendfile)(TCN_STDARGS, jlong sock, jlong file, @@ -1226,6 +1227,44 @@ return -(jlong)ss; } } + +#else /* APR_HAS_SENDIFLE */ + +TCN_IMPLEMENT_CALL(jlong, Socket, sendfile)(TCN_STDARGS, jlong sock, +jlong file, +jobjectArray headers, +jobjectArray trailers, +jlong offset, jlong len, +jint flags) +{ + +UNREFERENCED_STDARGS; +UNREFERENCED(sock); +UNREFERENCED(file); +UNREFERENCED(headers); +UNREFERENCED(trailers); +UNREFERENCED(offset); +UNREFERENCED(len); +UNREFERENCED(flags); +return -(jlong)APR_ENOTIMPL; +} + +TCN_IMPLEMENT_CALL(jlong, Socket, sendfilen)(TCN_STDARGS, jlong sock, + jlong file, + jlong offset, jlong len, + jint flags) +{ +UNREFERENCED_STDARGS; +UNREFERENCED(sock); +UNREFERENCED(file); +UNREFERENCED(offset); +UNREFERENCED(len); +UNREFERENCED(flags); +return -(jlong)APR_ENOTIMPL; +} + +#endif /* APR_HAS_SENDIFLE */ + TCN_IMPLEMENT_CALL(jint, Socket, acceptfilter)(TCN_STDARGS, jlong sock, Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=378858&r1=378857&r2=378858&view=diff == --- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java (original) +++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Sun Feb 19 00:43:23 2006 @@ -306,9 +306,9 @@ /** * Use endfile for sending static files. */ -protected boolean useSendfile = true; +protected boolean useSendfile = Library.APR_HAS_SENDFILE; public void setUseSendfile(boolean useSendfile) { this.useSendfile = useSendfile; } -public boolean getUseSendfile() { return Library.APR_HAS_SENDFILE ? useSendfile : false; } +public boolean getUseSendfile() { return useSendfile; } /** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r381594 - in /tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp: AjpAprProcessor.java Constants.java
Author: mturk Date: Tue Feb 28 00:53:23 2006 New Revision: 381594 URL: http://svn.apache.org/viewcvs?rev=381594&view=rev Log: Use constants instead directly hard coded values. No functional change. Modified: tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/Constants.java Modified: tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java?rev=381594&r1=381593&r2=381594&view=diff == --- tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java (original) +++ tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java Tue Feb 28 00:53:23 2006 @@ -32,7 +32,6 @@ import org.apache.coyote.Request; import org.apache.coyote.RequestInfo; import org.apache.coyote.Response; -import org.apache.jk.common.AjpConstants; import org.apache.tomcat.jni.Socket; import org.apache.tomcat.jni.Status; import org.apache.tomcat.util.buf.ByteChunk; @@ -78,7 +77,7 @@ public AjpAprProcessor(AprEndpoint endpoint) { this.endpoint = endpoint; - + request = new Request(); request.setInputBuffer(new SocketInputBuffer()); @@ -94,9 +93,9 @@ } // Allocate input and output buffers -inputBuffer = ByteBuffer.allocateDirect(16 * 1024); +inputBuffer = ByteBuffer.allocateDirect(Constants.MAX_PACKET_SIZE * 2); inputBuffer.limit(0); -outputBuffer = ByteBuffer.allocateDirect(16 * 1024); +outputBuffer = ByteBuffer.allocateDirect(Constants.MAX_PACKET_SIZE * 2); // Cause loading of HexUtils int foo = HexUtils.DEC[0]; @@ -131,15 +130,15 @@ /** * Header message. Note that this header is merely the one used during the * processing of the first message of a "request", so it might not be a request - * header. It will stay unchanged during the processing of the whole request. + * header. It will stay unchanged during the processing of the whole request. */ -protected AjpMessage requestHeaderMessage = new AjpMessage(); +protected AjpMessage requestHeaderMessage = new AjpMessage(); /** - * Message used for response header composition. + * Message used for response header composition. */ -protected AjpMessage responseHeaderMessage = new AjpMessage(); +protected AjpMessage responseHeaderMessage = new AjpMessage(); /** @@ -147,13 +146,13 @@ */ protected AjpMessage bodyMessage = new AjpMessage(); - + /** * Body message. */ protected MessageBytes bodyBytes = MessageBytes.newInstance(); - + /** * State flag. */ @@ -189,80 +188,80 @@ * header. */ protected long readTimeout; - - + + /** * Temp message bytes used for processing. */ protected MessageBytes tmpMB = MessageBytes.newInstance(); - - + + /** * Byte chunk for certs. */ protected MessageBytes certificates = MessageBytes.newInstance(); - - + + /** * End of stream flag. */ protected boolean endOfStream = false; - - + + /** * Body empty flag. */ protected boolean empty = true; - - + + /** * First read. */ protected boolean first = true; - - + + /** * Replay read. */ protected boolean replay = false; - - + + /** * Finished response. */ protected boolean finished = false; - - + + /** * Direct buffer used for output. */ protected ByteBuffer outputBuffer = null; - - + + /** * Direct buffer used for input. */ protected ByteBuffer inputBuffer = null; - - + + /** * Direct buffer used for sending right away a get body message. */ protected static final ByteBuffer getBodyMessageBuffer; - - + + /** * Direct buffer used for sending right away a pong message. */ protected static final ByteBuffer pongMessageBuffer; - - + + /** * End message array. */ protected static final byte[] endMessageArray; - - + + // - Static Initializer @@ -274,9 +273,9 @@ getBodyMessage.appendByte(Constants.JK_AJP13_GET_BODY_CHUNK); getBodyMessage.appendInt(Constants.MAX_READ_SIZE); getBodyMessage.end(); -getBodyMessageBuffer = +getBodyMessageBuffer = ByteBuffer.allocateDirect(getBodyMessage.getLen()); -getBodyMessageBuffer.put(getBodyMessage.getBuffer(), 0, +getBodyMessageBuffer.put(get
svn commit: r381713 - in /tomcat/connectors/trunk/jk: native/common/jk_lb_worker.c xdocs/changelog.xml
Author: mturk Date: Tue Feb 28 09:19:50 2006 New Revision: 381713 URL: http://svn.apache.org/viewcvs?rev=381713&view=rev Log: Fix bug 38806 by retrying all workers that are in error state. Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c tomcat/connectors/trunk/jk/xdocs/changelog.xml Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c?rev=381713&r1=381712&r2=381713&view=diff == --- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c Tue Feb 28 09:19:50 2006 @@ -42,7 +42,7 @@ /* * Time to wait before retry... */ -#define JK_WORKER_IN_ERROR(w) ((w)->in_error_state && !(w)->is_disabled && !(w)->is_busy) +#define JK_WORKER_IN_ERROR(w) ((w)->in_error_state && !(w)->is_busy) #define JK_WORKER_USABLE(w) (!(w)->in_error_state && !(w)->is_stopped && !(w)->is_disabled && !(w)->is_busy) struct lb_endpoint @@ -665,7 +665,7 @@ * on each consequtive attempt. */ if (attempt > (int)p->worker->num_of_workers) -jk_sleep_def(); +jk_sleep_def(); continue; } if (service_stat == JK_FALSE) { Modified: tomcat/connectors/trunk/jk/xdocs/changelog.xml URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/xdocs/changelog.xml?rev=381713&r1=381712&r2=381713&view=diff == --- tomcat/connectors/trunk/jk/xdocs/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/changelog.xml Tue Feb 28 09:19:50 2006 @@ -26,6 +26,10 @@ + 38806: Reclycle worker even if it is disabled. + This fixes hot-standby workers in error state. (mturk) + + ISAPI plugin (isapi_redirect.dll) did not provide correct request data for IIS to include in the IIS log. (markt) @@ -100,19 +104,19 @@ Added lock directive for load balancer that allows more acurate load balancing in case of burst load. (mturk) - + Added worker.maintain directive to allow customizing default 10 second timeout. On busy servers this value needs to be set on higher value. (mturk) - + Fix for NetWare compiler to deal with different types between AP13 and AP2 SDKs. (fuankg) Emit much more legible user.dmp crash analysis output for WIN32. (wrowe) - + 34558: Fix first failover request. (mturk) @@ -127,12 +131,12 @@ Added ForwardLocallAddres JkOptions flag for passing local instead remote address. Useful for remote addr valve. (mturk) - + Fix that worker not used, when stopped flag is true. (pero) Add loadbalance default worker secret attribute to the documentation (pero) - + @@ -148,9 +152,9 @@ Add worker secret attribute to the documentation (pero) - + - Add a stopped flag to worker configuration. Set flag True and + Add a stopped flag to worker configuration. Set flag True and complete traffic to worker is stopped. Also update the Ant JkStatusUpdateTask at Tomcat 5.5.10 release. Only usefull in a replicated session cluster.(pero) @@ -192,7 +196,7 @@ Add --enable-prefork to the documentation (pero) - + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r386275 - /tomcat/build/tc5.5.x/build.properties.default
Author: mturk Date: Wed Mar 15 22:43:16 2006 New Revision: 386275 URL: http://svn.apache.org/viewcvs?rev=386275&view=rev Log: Use native 1.1.2 Modified: tomcat/build/tc5.5.x/build.properties.default Modified: tomcat/build/tc5.5.x/build.properties.default URL: http://svn.apache.org/viewcvs/tomcat/build/tc5.5.x/build.properties.default?rev=386275&r1=386274&r2=386275&view=diff == --- tomcat/build/tc5.5.x/build.properties.default (original) +++ tomcat/build/tc5.5.x/build.properties.default Wed Mar 15 22:43:16 2006 @@ -142,9 +142,9 @@ # - Tomcat native library - -tomcat-native.home=${base.path}/tomcat-native-1.1.1 +tomcat-native.home=${base.path}/tomcat-native-1.1.2 tomcat-native.tar.gz=${tomcat-native.home}/tomcat-native.tar.gz -tomcat-native.loc=${base-tomcat.loc}/tomcat-connectors/native/tomcat-native-1.1.1.tar.gz +tomcat-native.loc=${base-tomcat.loc}/tomcat-connectors/native/tomcat-native-1.1.2.tar.gz # -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r386277 - in /tomcat/connectors/trunk/jk: native/common/jk_lb_worker.c xdocs/changelog.xml
Author: mturk Date: Wed Mar 15 23:07:46 2006 New Revision: 386277 URL: http://svn.apache.org/viewcvs?rev=386277&view=rev Log: Fix pessimistic locking mode by removing redundant shm lock code. Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c tomcat/connectors/trunk/jk/xdocs/changelog.xml Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c?rev=386277&r1=386276&r2=386277&view=diff == --- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c Wed Mar 15 23:07:46 2006 @@ -227,10 +227,7 @@ int total_factor = 0; jk_u64_t mytraffic = 0; jk_u64_t curmin = 0; - worker_record_t *candidate = NULL; -if (p->lblock == JK_LB_LOCK_PESSIMISTIC) -jk_shm_lock(); if (p->lbmethod == JK_LB_BYTRAFFIC) { double diff; @@ -278,8 +275,6 @@ candidate->s->lb_value -= total_factor; candidate->r = &(candidate->s->domain[0]); } -if (p->lblock == JK_LB_LOCK_PESSIMISTIC) -jk_shm_unlock(); return candidate; } @@ -292,8 +287,6 @@ int total_factor = 0; worker_record_t *candidate = NULL; -if (p->lblock == JK_LB_LOCK_PESSIMISTIC) -jk_shm_lock(); /* First try to see if we have available candidate */ for (i = 0; i < p->num_of_workers; i++) { /* If the worker is in error state run @@ -318,8 +311,6 @@ if (candidate) candidate->s->lb_value -= total_factor; -if (p->lblock == JK_LB_LOCK_PESSIMISTIC) -jk_shm_unlock(); return candidate; } @@ -334,8 +325,6 @@ double diff; time_t now = time(NULL); -if (p->lblock == JK_LB_LOCK_PESSIMISTIC) -jk_shm_lock(); for (i = 0; i < p->num_of_workers; i++) { diff = difftime(now, p->lb_workers[i].s->service_time); if (diff > JK_SERVICE_TRANSFER_INTERVAL) { @@ -367,8 +356,6 @@ } } } -if (p->lblock == JK_LB_LOCK_PESSIMISTIC) -jk_shm_unlock(); return candidate; } @@ -411,8 +398,6 @@ } if (candidate && !uses_domain && p->lbmethod == JK_LB_BYREQUESTS) { -if (p->lblock == JK_LB_LOCK_PESSIMISTIC) -jk_shm_lock(); for (i = 0; i < p->num_of_workers; i++) { if (JK_WORKER_USABLE(p->lb_workers[i].s)) { @@ -425,8 +410,6 @@ } } candidate->s->lb_value -= total_factor; -if (p->lblock == JK_LB_LOCK_PESSIMISTIC) -jk_shm_unlock(); } return candidate; } @@ -500,10 +483,14 @@ */ sessionid = get_sessionid(s); } -JK_ENTER_CS(&(p->cs), r); +if (p->lblock == JK_LB_LOCK_PESSIMISTIC) +r = jk_shm_lock(); +else { +JK_ENTER_CS(&(p->cs), r); +} if (!r) { jk_log(l, JK_LOG_ERROR, - "locking thread with errno=%d", + "locking failed with errno=%d", errno); JK_TRACE_EXIT(l); return NULL; @@ -536,7 +523,11 @@ /* We have a session route. Whow! */ rc = find_bysession_route(p, session_route, l); if (rc) { -JK_LEAVE_CS(&(p->cs), r); +if (p->lblock == JK_LB_LOCK_PESSIMISTIC) +jk_shm_unlock(); +else { +JK_LEAVE_CS(&(p->cs), r); +} if (JK_IS_DEBUG_LEVEL(l)) jk_log(l, JK_LOG_DEBUG, "found worker %s for route %s and partial sessionid %s", @@ -550,7 +541,11 @@ rc = NULL; } if (!rc && p->s->sticky_session_force) { - JK_LEAVE_CS(&(p->cs), r); +if (p->lblock == JK_LB_LOCK_PESSIMISTIC) +jk_shm_unlock(); +else { +JK_LEAVE_CS(&(p->cs), r); +} jk_log(l, JK_LOG_INFO, "all workers are in error state for session %s", session); @@ -559,7 +554,11 @@ } } rc = find_best_worker(p, l); -JK_LEAVE_CS(&(p->cs), r); +if (p->lblock == JK_LB_LOCK_PESSIMISTIC) +jk_shm_unlock(); +else { +JK_LEAVE_CS(&(p->cs), r); +} if (rc && JK_IS_DEBUG_LEVEL(l)) { jk_log(l, JK_LOG_DEBUG, "found best worker (%s) using %s method", rc->s->name, @@ -613,11 +612,16 @@ "service worker=%s jvm_route=%s",
svn commit: r386278 - /tomcat/connectors/trunk/jni/java/org/apache/tomcat/jni/OS.java
Author: mturk Date: Wed Mar 15 23:15:58 2006 New Revision: 386278 URL: http://svn.apache.org/viewcvs?rev=386278&view=rev Log: Fix bug 38984. Patch provided by Peter Grimshaw. Modified: tomcat/connectors/trunk/jni/java/org/apache/tomcat/jni/OS.java Modified: tomcat/connectors/trunk/jni/java/org/apache/tomcat/jni/OS.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/java/org/apache/tomcat/jni/OS.java?rev=386278&r1=386277&r2=386278&view=diff == --- tomcat/connectors/trunk/jni/java/org/apache/tomcat/jni/OS.java (original) +++ tomcat/connectors/trunk/jni/java/org/apache/tomcat/jni/OS.java Wed Mar 15 23:15:58 2006 @@ -46,23 +46,13 @@ */ private static native boolean is(int type); -static { -IS_UNIX= is(UNIX); -IS_NETWARE = is(NETWARE); -IS_WIN32 = is(WIN32); -IS_WIN64 = is(WIN64); -IS_LINUX = is(LINUX); -IS_SOLARIS = is(SOLARIS); -IS_BSD = is(BSD); -} - -public static boolean IS_UNIX= false; -public static boolean IS_NETWARE = false; -public static boolean IS_WIN32 = false; -public static boolean IS_WIN64 = false; -public static boolean IS_LINUX = false; -public static boolean IS_SOLARIS = false; -public static boolean IS_BSD = false; +public static final boolean IS_UNIX= is(UNIX); +public static final boolean IS_NETWARE = is(NETWARE); +public static final boolean IS_WIN32 = is(WIN32); +public static final boolean IS_WIN64 = is(WIN64); +public static final boolean IS_LINUX = is(LINUX); +public static final boolean IS_SOLARIS = is(SOLARIS); +public static final boolean IS_BSD = is(BSD); /** * Get the name of the system default characer set. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r386279 - in /tomcat/connectors/trunk/jk: native/common/jk_lb_worker.c native/common/jk_lb_worker.h native/common/jk_status.c native/common/jk_util.c xdocs/changelog.xml
Author: mturk Date: Wed Mar 15 23:53:27 2006 New Revision: 386279 URL: http://svn.apache.org/viewcvs?rev=386279&view=rev Log: Commit #36138. It was waiting for a long time... Modified from original patch provided by Chris Lamprecht. 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/native/common/jk_util.c tomcat/connectors/trunk/jk/xdocs/changelog.xml Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c?rev=386279&r1=386278&r2=386279&view=diff == --- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c Wed Mar 15 23:53:27 2006 @@ -359,6 +359,77 @@ return candidate; } +static worker_record_t *find_best_bybusyness(lb_worker_t *p, + jk_logger_t *l) +{ +static unsigned int next_offset = 0; +unsigned int i; +unsigned int j; +unsigned int offset; +int bfn = 1; /* Numerator of best busy factor */ +int bfd = 1; /* Denominator of best busy factor */ +int curn; /* Numerator of current busy factor */ +int curd; /* Denominator of current busy factor */ + +int left; /* left and right are used to compare rational numbers */ +int right; + +/* find the least busy worker */ +worker_record_t *candidate = NULL; + +offset = next_offset; + +/* First try to see if we have available candidate +*/ +for (j = 0; j < p->num_of_workers; j++) { +i = (j + offset) % p->num_of_workers; + +/* If the worker is in error state run + * retry on that worker. It will be marked as + * operational if the retry timeout is elapsed. + * The worker might still be unusable, but we try + * anyway. + */ +if (JK_WORKER_IN_ERROR(p->lb_workers[i].s)) { +retry_worker(&p->lb_workers[i], p->s->recover_wait_time, l); +} +/* Take into calculation only the workers that are + * not in error state, stopped or not disabled. + */ +if (JK_WORKER_USABLE(p->lb_workers[i].s)) { +curn = p->lb_workers[i].s->busy; +curd = p->lb_workers[i].s->lb_factor; + +/* If the server is restarted under load there is a bug that causes + * busy to be reset to zero before all the outstanding connections + * finish, they then finally finish. As a result, the busy value + * becomes negative, messing up the busyness load balancing. + * When this bug is fixed, this section can be removed + */ +if (curn < 0) { + jk_log(l, JK_LOG_WARNING, + "busy value is %d for worker %s, resetting it to zero", + curn, p->lb_workers[i].s->name); +p->lb_workers[i].s->busy = 0; +curn = 0; +} + +/* compare rational numbers: (a/b) < (c/d) iff a*d < c*b +*/ +left = curn * bfd; +right = bfn * curd; + +if (!candidate || (left < right)) { +candidate = &p->lb_workers[i]; +bfn = curn; +bfd = curd; +next_offset = i + 1; +} +} +} +return candidate; +} + static worker_record_t *find_bysession_route(lb_worker_t *p, const char *name, jk_logger_t *l) @@ -441,6 +512,8 @@ rc = find_best_byrequests(p, l); else if (p->lbmethod == JK_LB_BYTRAFFIC) rc = find_best_bytraffic(p, l); +else if (p->lbmethod == JK_LB_BYBUSYNESS) +rc = find_best_bybusyness(p, l); /* By default use worker name as session route */ if (rc) rc->r = &(rc->s->name[0]); Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h?rev=386279&r1=386278&r2=386279&view=diff == --- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h (original) +++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h Wed Mar 15 23:53:27 2006 @@ -39,8 +39,10 @@ #define JK_LB_BYREQUESTS (0) #define JK_LB_BYTRAFFIC (1) +#define JK_LB_BYBUSYNESS (2) #define JK_LB_METHOD_REQUESTS ("Request") #define JK_LB_METHOD_TRAFFIC ("Traffic") +#define JK_LB_METHOD_BUSYNES
svn commit: r386282 - in /tomcat/connectors/trunk/jk: native/common/jk_uri_worker_map.c xdocs/changelog.xml
Author: mturk Date: Thu Mar 16 00:10:18 2006 New Revision: 386282 URL: http://svn.apache.org/viewcvs?rev=386282&view=rev Log: Fix #38889 by sorting worker map depending on the path elements, to comply with Servlet spec. Patch provided by Steve Revilak. Modified: tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c tomcat/connectors/trunk/jk/xdocs/changelog.xml Modified: tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c?rev=386282&r1=386281&r2=386282&view=diff == --- tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c Thu Mar 16 00:10:18 2006 @@ -36,10 +36,48 @@ #define JK_STRNCMP strncmp #endif + +/* + * Given context uri, count the number of path tokens. + * + * Servlet specification 2.4, SRV.11.1 says + + * The container will recursively try tomatch the longest + * path-prefix. This is done by stepping down the path tree a + * directory at a time, using the / character as a path + * separator. The longest match determines the servlet selected. + * + * The implication seems to be `most uri path elements is most exact'. + * This is a little helper function to count uri tokens, so we can + * keep the worker map sorted with most specific first. + */ +static int worker_count_context_uri_tokens(const char * context) +{ +const char * c = context; +int count = 0; +while (c && *c) { +if ('/' == *c++) +count++; +} +return count; +} + static int worker_compare(const void *elem1, const void *elem2) { uri_worker_record_t *e1 = *(uri_worker_record_t **)elem1; uri_worker_record_t *e2 = *(uri_worker_record_t **)elem2; +int e1_tokens = 0; +int e2_tokens = 0; + +e1_tokens = worker_count_context_uri_tokens(e1->context); +e2_tokens = worker_count_context_uri_tokens(e2->context); + +if (e1_tokens != e2_tokens) { +return (e2_tokens - e1_tokens); +} +/* given the same number of URI tokens, use character + * length as a tie breaker + */ return ((int)e2->context_len - (int)e1->context_len); } Modified: tomcat/connectors/trunk/jk/xdocs/changelog.xml URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/xdocs/changelog.xml?rev=386282&r1=386281&r2=386282&view=diff == --- tomcat/connectors/trunk/jk/xdocs/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/changelog.xml Thu Mar 16 00:10:18 2006 @@ -25,6 +25,11 @@ + + 38889: Use worker map sorting depending on the path + elements, to comply with Servlet spec. Patch provided by + Steve Revilak. (mturk) + 36138: Added Busyness lb method. Patch provided by Chris Lamprecht. (mturk) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r386285 - in /tomcat/connectors/trunk/jk: native/common/jk_ajp_common.c xdocs/changelog.xml
Author: mturk Date: Thu Mar 16 00:18:04 2006 New Revision: 386285 URL: http://svn.apache.org/viewcvs?rev=386285&view=rev Log: Fix #38859 by protect mod_jk against buggy or malicious AJP servers in the backend. Patch provided by Ruediger Pluem. Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c tomcat/connectors/trunk/jk/xdocs/changelog.xml Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c?rev=386285&r1=386284&r2=386285&view=diff == --- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Thu Mar 16 00:18:04 2006 @@ -1380,6 +1380,22 @@ case JK_AJP13_SEND_BODY_CHUNK: { unsigned int len = (unsigned int)jk_b_get_int(msg); +/* + * Do a sanity check on len to prevent write reading beyond buffer + * boundaries and thus revealing possible sensitive memory + * contents to the client. + * len cannot be larger than msg->len - 3 because the ajp message + * contains the magic byte for JK_AJP13_SEND_BODY_CHUNK (1 byte) + * and the length of the chunk (2 bytes). The remaining part of + * the message is the chunk. + */ +if (len > msg->len - 3) { +jk_log(l, JK_LOG_ERROR, + "Chunk length too large. Length of AJP message is %i," + " chunk length is %i.", msg->len, len); +JK_TRACE_EXIT(l); +return JK_INTERNAL_ERROR; +} if (!r->write(r, msg->buf + msg->pos, len)) { jk_log(l, JK_LOG_INFO, "Connection aborted or network problems"); @@ -2065,7 +2081,7 @@ *e = NULL; /* set last_access only if needed */ if (w->cache_timeout > 0 || w->recycle_timeout > 0) -p->last_access = time(NULL); +p->last_access = time(NULL); JK_LEAVE_CS(&w->cs, rc); if (sock >= 0) jk_shutdown_socket(sock); @@ -2137,7 +2153,7 @@ else { jk_log(l, JK_LOG_WARNING, "Unable to get the free endpoint for worker %s from %d slots", -aw->name, aw->ep_cache_sz); +aw->name, aw->ep_cache_sz); } JK_LEAVE_CS(&aw->cs, rc); } Modified: tomcat/connectors/trunk/jk/xdocs/changelog.xml URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/xdocs/changelog.xml?rev=386285&r1=386284&r2=386285&view=diff == --- tomcat/connectors/trunk/jk/xdocs/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/changelog.xml Thu Mar 16 00:18:04 2006 @@ -26,6 +26,10 @@ + 38859: Protect mod_jk against buggy or malicious + AJP servers in the backend. Patch provided by Ruediger Pluem. (mturk) + + 38889: Use worker map sorting depending on the path elements, to comply with Servlet spec. Patch provided by Steve Revilak. (mturk) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r386286 - /tomcat/connectors/trunk/jk/xdocs/howto/apache.xml
Author: mturk Date: Thu Mar 16 00:25:12 2006 New Revision: 386286 URL: http://svn.apache.org/viewcvs?rev=386286&view=rev Log: Small doc update by Luc Carpentier. We need more of those! Modified: tomcat/connectors/trunk/jk/xdocs/howto/apache.xml Modified: tomcat/connectors/trunk/jk/xdocs/howto/apache.xml URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/xdocs/howto/apache.xml?rev=386286&r1=386285&r2=386286&view=diff == --- tomcat/connectors/trunk/jk/xdocs/howto/apache.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/howto/apache.xml Thu Mar 16 00:25:12 2006 @@ -7,13 +7,13 @@ &project; Copyright 1999-2005 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 - + 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. @@ -29,7 +29,7 @@ -This document explains how to connect Tomcat to the popular open source web server, Apache. +This document explains how to connect Tomcat to the popular open source web server, Apache. There is actually two version of Apache, 1.3 and 2.0 and both can be used with mod_jk, the Tomcat redirector module. @@ -40,13 +40,13 @@ -This document was originally part of Tomcat: A Minimalistic User's Guide written by Gal Shachor, -but has been split off for organizational reasons. +This document was originally part of Tomcat: A Minimalistic User's Guide written by Gal Shachor, +but has been split off for organizational reasons. -${tomcat_home} is the root directory of tomcat. +${tomcat_home} is the root directory of tomcat. Your Tomcat installation should have the following subdirectories: @@ -84,7 +84,7 @@ Netware -iSeries V5R1 and V5R2 with Apache 2.0.39. Be sure to have the latest Apache PTF installed. +iSeries V5R1 and V5R2 with Apache 2.0.39. Be sure to have the latest Apache PTF installed. Tomcat 3.2.x, Tomcat 3.3.x, Tomcat 4.0.x, Tomcat 4.1.x and Tomcat 5 @@ -93,7 +93,7 @@ -The redirector uses ajp12 and ajp13 to send requests to the Tomcat containers. There is also an option to use Tomcat in process, +The redirector uses ajp12 and ajp13 to send requests to the Tomcat containers. There is also an option to use Tomcat in process, more about the in-process mode can be found in the in process howto. @@ -104,7 +104,7 @@ -The ajp12 has been deprecated with Tomcat 3.3.x and you should use instead +The ajp12 has been deprecated with Tomcat 3.3.x and you should use instead ajp13 which is the only ajp protocol known by Tomcat 4.0.x, 4.1.x and 5. @@ -120,13 +120,13 @@ -In a nutshell a web server is waiting for client HTTP requests. -When these requests arrive the server does whatever is needed to serve the +In a nutshell a web server is waiting for client HTTP requests. +When these requests arrive the server does whatever is needed to serve the requests by providing the necessary content. -Adding a servlet container may somewhat change this behavior. +Adding a servlet container may somewhat change this behavior. Now the web server needs also to perform the following: @@ -135,21 +135,21 @@ Load the servlet container adapter library and initialize it (prior to serving requests). -When a request arrives, it needs to check and see if a certain request belongs to a servlet, +When a request arrives, it needs to check and see if a certain request belongs to a servlet, if so it needs to let the adapter take the request and handle it. -The adapter on the other hand needs to know what requests it is going to serve, +The adapter on the other hand needs to know what requests it is going to serve, usually based on some pattern in the request URL, and to where to direct these requests. -Things are even more complex when the user wants to set a configuration that uses virtual hosts, -or when they want multiple developers to work on the same web server -but on different servlet container JVMs. -We will cover these two cases in the advanced sections. +Things are even more complex when the user wants to set a configuration that uses virtual hosts, +or when they want multiple developers to work on the same web server +but on different servlet container JVMs. +We will cover these two cases in the advanced sections. @@ -158,25 +158,25 @@ -mod_jk can be obtained in two formats - binary and source. -Depending on the platform you are running your web server on, a binary version of mod_jk may be available. +mod_jk can be obtained in
svn commit: r386288 - /tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c
Author: mturk Date: Thu Mar 16 00:44:48 2006 New Revision: 386288 URL: http://svn.apache.org/viewcvs?rev=386288&view=rev Log: Cast fix for the int/uint. 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/viewcvs/tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c?rev=386288&r1=386287&r2=386288&view=diff == --- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Thu Mar 16 00:44:48 2006 @@ -1389,7 +1389,7 @@ * and the length of the chunk (2 bytes). The remaining part of * the message is the chunk. */ -if (len > msg->len - 3) { +if (len > (unsigned int)(msg->len - 3)) { jk_log(l, JK_LOG_ERROR, "Chunk length too large. Length of AJP message is %i," " chunk length is %i.", msg->len, len); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r386289 - /tomcat/connectors/trunk/jk/xdocs/config/workers.xml
Author: mturk Date: Thu Mar 16 00:50:02 2006 New Revision: 386289 URL: http://svn.apache.org/viewcvs?rev=386289&view=rev Log: Document Busyness load balancer method. Modified: tomcat/connectors/trunk/jk/xdocs/config/workers.xml Modified: tomcat/connectors/trunk/jk/xdocs/config/workers.xml URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/xdocs/config/workers.xml?rev=386289&r1=386288&r2=386289&view=diff == --- tomcat/connectors/trunk/jk/xdocs/config/workers.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/config/workers.xml Thu Mar 16 00:50:02 2006 @@ -4,7 +4,7 @@ ]> -&project; +&project; Mladen Turk @@ -21,34 +21,34 @@ Apache forwarding servlet requests to a Tomcat process (the worker) running behind it. -The scenario described above is a very simple one; -in fact one can configure multiple Tomcat workers to serve servlets on -behalf of a certain web server. +The scenario described above is a very simple one; +in fact one can configure multiple Tomcat workers to serve servlets on +behalf of a certain web server. The reasons for such configuration can be: -We want different contexts to be served by different Tomcat workers to provide a +We want different contexts to be served by different Tomcat workers to provide a development environment where all the developers share the same web server but own a Tomcat worker of their own. -We want different virtual hosts served by different Tomcat processes to provide a +We want different virtual hosts served by different Tomcat processes to provide a clear separation between sites belonging to different companies. -We want to provide load balancing, meaning run multiple Tomcat workers each on a +We want to provide load balancing, meaning run multiple Tomcat workers each on a machine of its own and distribute the requests between them. There are probably more reasons for having multiple workers but I guess that this list is enough... -Tomcat workers are defined in a properties file dubbed workers.properties and this tutorial +Tomcat workers are defined in a properties file dubbed workers.properties and this tutorial explains how to work with it. - + Each workers.properties directive consists of three words separated by dot. The first word is always @@ -72,7 +72,7 @@ A comma separated list of workers names that the JK will use. When starting up, the web server plugin will instantiate the workers whose name appears in the -worker.list property, these are also the workers to whom you can map requests. +worker.list property, these are also the workers to whom you can map requests. Worker connection pool maintain timeout in seconds. If set to the positive @@ -141,13 +141,13 @@ -The number of seconds that told webserver to cut an ajp13 connection after some time of +The number of seconds that told webserver to cut an ajp13 connection after some time of inactivity. When choosing an endpoint for a request and the assigned socket is open, it will be closed if it was not used for the configured time. -It's a good way to ensure that there won't too old threads living on Tomcat side, +It's a good way to ensure that there won't too old threads living on Tomcat side, with the extra cost you need to reopen the socket next time a request be forwarded. This property is very similar to cache_timeout but works also in non-cache mode. -If set to value zero (default) no recycle will took place. +If set to value zero (default) no recycle will took place. @@ -162,7 +162,7 @@ It will limit the number of those connection that each web server child process can made. -Cachesize property is used only for multi threaded +Cachesize property is used only for multi threaded web servers such as Apache 2.0 (worker), IIS and Netscape. The cachesize property 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 @@ -174,9 +174,9 @@ Cache timeout property should be used with cachesize to specify how to time JK should keep -an open socket in cache before closing it. This property should be used to reduce the number of threads +an open socket in cache before closing it. This property should be used to reduce the number of threads on the Tomcat WebServer. - + Each child could open an ajp13 connection if it have to forward a request to Tomcat, creating a new ajp13 thread on Tomcat side. @@ -185,7 +185,7 @@ until killed. And since the webserver will keep its childs/threads running to handle high-load, even it the child/thread handle only static contents, you could finish having many unused ajp13 threads on the Tomcat side. -. +. @@ -194,7 +194,7 @@ The load-balancing factor is how much we expect t
svn commit: r386291 - /tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c
Author: mturk Date: Thu Mar 16 00:58:17 2006 New Revision: 386291 URL: http://svn.apache.org/viewcvs?rev=386291&view=rev Log: Before decrementing busy flag, check if it was already reset by graceful shutdown, to disable the negative busy count values. 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/viewcvs/tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c?rev=386291&r1=386290&r2=386291&view=diff == --- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c Thu Mar 16 00:58:17 2006 @@ -721,9 +721,14 @@ * We have at least one endpoint free */ rec->s->is_busy = JK_FALSE; -/* Decrement the busy worker count */ -rec->s->busy--; -p->worker->s->busy--; +/* Decrement the busy worker count. + * Check if the busy was reset to zero by graceful + * restart of the server. + */ +if (rec->s->busy) +rec->s->busy--; +if (p->worker->s->busy) +p->worker->s->busy--; if (service_stat == JK_TRUE) { rec->s->in_error_state = JK_FALSE; rec->s->in_recovering = JK_FALSE; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r386569 - /tomcat/connectors/trunk/jk/xdocs/changelog.xml
Author: mturk Date: Fri Mar 17 00:36:51 2006 New Revision: 386569 URL: http://svn.apache.org/viewcvs?rev=386569&view=rev Log: Document #37167 -- Allow building with BSD-ish like make, that does not understand '$<' expansion. Modified: tomcat/connectors/trunk/jk/xdocs/changelog.xml Modified: tomcat/connectors/trunk/jk/xdocs/changelog.xml URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/xdocs/changelog.xml?rev=386569&r1=386568&r2=386569&view=diff == --- tomcat/connectors/trunk/jk/xdocs/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/changelog.xml Fri Mar 17 00:36:51 2006 @@ -47,6 +47,9 @@ This fixes hot-standby workers in error state. (mturk) + 37167: Allow building with BSD-ish like make. (mturk) + + ISAPI plugin (isapi_redirect.dll) did not provide correct request data for IIS to include in the IIS log. (markt) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r386592 - in /tomcat/connectors/trunk/jk: native/common/jk_util.c xdocs/changelog.xml
Author: mturk Date: Fri Mar 17 01:35:16 2006 New Revision: 386592 URL: http://svn.apache.org/viewcvs?rev=386592&view=rev Log: Fix #37332 -- potential misuse of buffer length with snprintf functions. Modified: tomcat/connectors/trunk/jk/native/common/jk_util.c tomcat/connectors/trunk/jk/xdocs/changelog.xml Modified: tomcat/connectors/trunk/jk/native/common/jk_util.c URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/native/common/jk_util.c?rev=386592&r1=386591&r2=386592&view=diff == --- tomcat/connectors/trunk/jk/native/common/jk_util.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_util.c Fri Mar 17 01:35:16 2006 @@ -315,8 +315,8 @@ used += sprintf(&buf[used], "[%04d:%04d] ", getpid(), jk_gettid()); #else -used += snprintf(&buf[used], HUGE_BUFFER_SIZE, "[%04d:%04d] ", - getpid(), jk_gettid()); +used += snprintf(&buf[used], HUGE_BUFFER_SIZE - used, + "[%04d:%04d] ", getpid(), jk_gettid()); #endif if (used < 0) { return 0; @@ -338,8 +338,8 @@ used += sprintf(&buf[used], "%s (%d): ", f, line); #else if (line) -used += snprintf(&buf[used], HUGE_BUFFER_SIZE, "%s (%d): ", - f, line); +used += snprintf(&buf[used], HUGE_BUFFER_SIZE - used, + "%s (%d): ", f, line); #endif if (used < 0) { return 0; /* [V] not sure what to return... */ Modified: tomcat/connectors/trunk/jk/xdocs/changelog.xml URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/xdocs/changelog.xml?rev=386592&r1=386591&r2=386592&view=diff == --- tomcat/connectors/trunk/jk/xdocs/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/changelog.xml Fri Mar 17 01:35:16 2006 @@ -26,6 +26,10 @@ + 37332: Fix potential misuse of buffer length with + snprintf functions. (mturk) + + 38859: Protect mod_jk against buggy or malicious AJP servers in the backend. Patch provided by Ruediger Pluem. (mturk) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r386604 - in /tomcat/connectors/trunk/jk: native/common/jk_shm.c xdocs/changelog.xml
Author: mturk Date: Fri Mar 17 02:39:10 2006 New Revision: 386604 URL: http://svn.apache.org/viewcvs?rev=386604&view=rev Log: Fix #37469. Shared memory was closed for forked childs, thus causing close an munmap twice for the same file id. Modified: tomcat/connectors/trunk/jk/native/common/jk_shm.c tomcat/connectors/trunk/jk/xdocs/changelog.xml Modified: tomcat/connectors/trunk/jk/native/common/jk_shm.c URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/native/common/jk_shm.c?rev=386604&r1=386603&r2=386604&view=diff == --- tomcat/connectors/trunk/jk/native/common/jk_shm.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_shm.c Fri Mar 17 02:39:10 2006 @@ -253,7 +253,10 @@ return 0; } jk_shmem.filename = fname; -jk_shmem.attached = attached; +if (attached) +jk_shmem.attached = (int)getpid(); +else +jk_shmem.attached = 0; jk_shmem.size = JK_SHM_ALIGN(sizeof(jk_shm_header_t) + sz); @@ -361,6 +364,16 @@ { int rc; if (jk_shmem.hdr) { +if (jk_shmem.hdr.attached) { +int p = (int)getpid(); +if (p != jk_shmem.hdr.attached) { +/* In case this is a forked child + * do not close the shared memory. + * It will be closed by the parent. + */ + return; +} +} if (jk_shmem.fd_lock >= 0) { close(jk_shmem.fd_lock); } Modified: tomcat/connectors/trunk/jk/xdocs/changelog.xml URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/xdocs/changelog.xml?rev=386604&r1=386603&r2=386604&view=diff == --- tomcat/connectors/trunk/jk/xdocs/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/changelog.xml Fri Mar 17 02:39:10 2006 @@ -26,6 +26,10 @@ + 37469: Fix shared memory close for forked childs. + The shared memory will be closed by the parent process. (mturk) + + 37332: Fix potential misuse of buffer length with snprintf functions. (mturk) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r387178 - /tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c
Author: mturk Date: Mon Mar 20 02:12:54 2006 New Revision: 387178 URL: http://svn.apache.org/viewcvs?rev=387178&view=rev Log: Add missing bussines logic for innner domain lb election. Also remove useless check for negative busy values. They are handled correctly now. 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/viewcvs/tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c?rev=387178&r1=387177&r2=387178&view=diff == --- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c Mon Mar 20 02:12:54 2006 @@ -38,7 +38,6 @@ * The load balancing code in this */ - /* * Time to wait before retry... */ @@ -227,6 +226,9 @@ int total_factor = 0; jk_u64_t mytraffic = 0; jk_u64_t curmin = 0; +int bfn = 1; +int bfd = 1; + worker_record_t *candidate = NULL; if (p->lbmethod == JK_LB_BYTRAFFIC) { @@ -242,7 +244,6 @@ } } } - /* First try to see if we have available candidate */ for (i = 0; i < p->num_of_workers; i++) { /* Skip all workers that are not member of domain */ @@ -259,7 +260,7 @@ if (!candidate || p->lb_workers[i].s->lb_value > candidate->s->lb_value) candidate = &p->lb_workers[i]; } -else { +else if (p->lbmethod == JK_LB_BYTRAFFIC) { mytraffic = (p->lb_workers[i].s->transferred + p->lb_workers[i].s->readed ) / p->lb_workers[i].s->lb_factor; if (!candidate || mytraffic < curmin) { @@ -267,6 +268,18 @@ curmin = mytraffic; } } +else { +/* compare rational numbers: (a/b) < (c/d) iff a*d < c*b +*/ +int left = p->lb_workers[i].s->busy * bfd; +int right = bfn * p->lb_workers[i].s->lb_factor; + +if (!candidate || (left < right)) { +candidate = &p->lb_workers[i]; +bfn = p->lb_workers[i].s->busy; +bfd = p->lb_workers[i].s->lb_factor; +} +} } } @@ -368,8 +381,6 @@ unsigned int offset; int bfn = 1; /* Numerator of best busy factor */ int bfd = 1; /* Denominator of best busy factor */ -int curn; /* Numerator of current busy factor */ -int curd; /* Denominator of current busy factor */ int left; /* left and right are used to compare rational numbers */ int right; @@ -397,32 +408,15 @@ * not in error state, stopped or not disabled. */ if (JK_WORKER_USABLE(p->lb_workers[i].s)) { -curn = p->lb_workers[i].s->busy; -curd = p->lb_workers[i].s->lb_factor; - -/* If the server is restarted under load there is a bug that causes - * busy to be reset to zero before all the outstanding connections - * finish, they then finally finish. As a result, the busy value - * becomes negative, messing up the busyness load balancing. - * When this bug is fixed, this section can be removed - */ -if (curn < 0) { - jk_log(l, JK_LOG_WARNING, - "busy value is %d for worker %s, resetting it to zero", - curn, p->lb_workers[i].s->name); -p->lb_workers[i].s->busy = 0; -curn = 0; -} - /* compare rational numbers: (a/b) < (c/d) iff a*d < c*b */ -left = curn * bfd; -right = bfn * curd; +left = p->lb_workers[i].s->busy * bfd; +right = bfn * p->lb_workers[i].s->lb_factor; if (!candidate || (left < right)) { candidate = &p->lb_workers[i]; -bfn = curn; -bfd = curd; +bfn = p->lb_workers[i].s->busy; +bfd = p->lb_workers[i].s->lb_factor; next_offset = i + 1; } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r388090 - in /tomcat/connectors/trunk/jni/native/os/win32: ntpipe.c registry.c system.c
Author: mturk Date: Wed Mar 22 23:53:24 2006 New Revision: 388090 URL: http://svn.apache.org/viewcvs?rev=388090&view=rev Log: Fix compile time warning if _WIN32_WINNT is defined in command line. Modified: tomcat/connectors/trunk/jni/native/os/win32/ntpipe.c tomcat/connectors/trunk/jni/native/os/win32/registry.c tomcat/connectors/trunk/jni/native/os/win32/system.c Modified: tomcat/connectors/trunk/jni/native/os/win32/ntpipe.c URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/native/os/win32/ntpipe.c?rev=388090&r1=388089&r2=388090&view=diff == --- tomcat/connectors/trunk/jni/native/os/win32/ntpipe.c (original) +++ tomcat/connectors/trunk/jni/native/os/win32/ntpipe.c Wed Mar 22 23:53:24 2006 @@ -20,7 +20,9 @@ */ +#ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0500 +#endif #define STRICT #include #include @@ -121,7 +123,7 @@ break; default: rv = APR_EINVAL; -break; +break; } return rv; } @@ -140,7 +142,7 @@ break; default: rv = APR_EINVAL; -break; +break; } return rv; } Modified: tomcat/connectors/trunk/jni/native/os/win32/registry.c URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/native/os/win32/registry.c?rev=388090&r1=388089&r2=388090&view=diff == --- tomcat/connectors/trunk/jni/native/os/win32/registry.c (original) +++ tomcat/connectors/trunk/jni/native/os/win32/registry.c Wed Mar 22 23:53:24 2006 @@ -19,7 +19,9 @@ * @version $Revision$, $Date$ */ +#ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0500 +#endif #include #include Modified: tomcat/connectors/trunk/jni/native/os/win32/system.c URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/native/os/win32/system.c?rev=388090&r1=388089&r2=388090&view=diff == --- tomcat/connectors/trunk/jni/native/os/win32/system.c (original) +++ tomcat/connectors/trunk/jni/native/os/win32/system.c Wed Mar 22 23:53:24 2006 @@ -19,7 +19,9 @@ * @version $Revision$, $Date$ */ +#ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0500 +#endif #include #include #include "apr.h" - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r388091 - /tomcat/connectors/trunk/jni/native/src/poll.c
Author: mturk Date: Wed Mar 22 23:56:28 2006 New Revision: 388091 URL: http://svn.apache.org/viewcvs?rev=388091&view=rev Log: Use array region routines instead copying entire poller result set array. It can save few CPU cycles. Modified: tomcat/connectors/trunk/jni/native/src/poll.c Modified: tomcat/connectors/trunk/jni/native/src/poll.c URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/native/src/poll.c?rev=388091&r1=388090&r2=388091&view=diff == --- tomcat/connectors/trunk/jni/native/src/poll.c (original) +++ tomcat/connectors/trunk/jni/native/src/poll.c Wed Mar 22 23:56:28 2006 @@ -37,6 +37,7 @@ apr_int32_t nelts; apr_int32_t nalloc; apr_pollset_t *pollset; +jlong *set; apr_pollfd_t *socket_set; apr_interval_time_t *socket_ttl; apr_interval_time_t max_ttl; @@ -119,6 +120,7 @@ } tps = apr_pcalloc(p, sizeof(tcn_pollset_t)); tps->pollset = pollset; +tps->set= apr_palloc(p, size * sizeof(jlong) * 2); tps->socket_set = apr_palloc(p, size * sizeof(apr_pollfd_t)); tps->socket_ttl = apr_palloc(p, size * sizeof(apr_interval_time_t)); tps->nelts = 0; @@ -237,7 +239,7 @@ jboolean remove) { const apr_pollfd_t *fd = NULL; -tcn_pollset_t *p = J2P(pollset, tcn_pollset_t *); +tcn_pollset_t *p = J2P(pollset, tcn_pollset_t *); apr_int32_t i, num = 0; apr_status_t rv = APR_SUCCESS; @@ -258,19 +260,18 @@ num = (apr_int32_t)(-rv); } if (num > 0) { -jlong *pset = (*e)->GetLongArrayElements(e, set, NULL); #ifdef TCN_DO_STATISTICS p->sp_polled += num; p->sp_max_polled = TCN_MAX(p->sp_max_polled, num); #endif for (i = 0; i < num; i++) { -pset[i*2+0] = (jlong)(fd->rtnevents); -pset[i*2+1] = P2J(fd->client_data); +p->set[i*2+0] = (jlong)(fd->rtnevents); +p->set[i*2+1] = P2J(fd->client_data); if (remove) do_remove(p, fd); fd ++; } -(*e)->ReleaseLongArrayElements(e, set, pset, 0); +(*e)->SetLongArrayRegion(e, set, 0, num * 2, p->set); } return (jint)num; @@ -280,7 +281,6 @@ jlongArray set, jboolean remove) { tcn_pollset_t *p = J2P(pollset, tcn_pollset_t *); -jlong *pset = (*e)->GetLongArrayElements(e, set, NULL); apr_int32_t i = 0, num = 0; apr_time_t now = apr_time_now(); apr_pollfd_t fd; @@ -293,7 +293,7 @@ for (i = 0; i < p->nelts; i++) { if ((now - p->socket_ttl[i]) > p->max_ttl) { fd = p->socket_set[i]; -pset[num++] = P2J(fd.client_data); +p->set[num++] = P2J(fd.client_data); } } if (remove && num) { @@ -304,15 +304,13 @@ #endif for (i = 0; i < num; i++) { fd.desc_type = APR_POLL_SOCKET; -fd.desc.s = (J2P(pset[i], tcn_socket_t *))->sock; +fd.desc.s = (J2P(p->set[i], tcn_socket_t *))->sock; do_remove(p, &fd); } } } if (num) -(*e)->ReleaseLongArrayElements(e, set, pset, 0); -else -(*e)->ReleaseLongArrayElements(e, set, pset, JNI_ABORT); +(*e)->SetLongArrayRegion(e, set, 0, num, p->set); return (jint)num; } @@ -335,7 +333,6 @@ jlongArray set) { tcn_pollset_t *p = J2P(pollset, tcn_pollset_t *); -jlong *pset = (*e)->GetLongArrayElements(e, set, NULL); apr_int32_t i = 0; apr_pollfd_t fd; @@ -345,12 +342,10 @@ for (i = 0; i < p->nelts; i++) { p->socket_set[i].rtnevents = APR_POLLHUP | APR_POLLIN; fd = p->socket_set[i]; -pset[i*2+0] = (jlong)(fd.rtnevents); -pset[i*2+1] = P2J(fd.client_data); +p->set[i*2+0] = (jlong)(fd.rtnevents); +p->set[i*2+1] = P2J(fd.client_data); } if (p->nelts) -(*e)->ReleaseLongArrayElements(e, set, pset, 0); -else -(*e)->ReleaseLongArrayElements(e, set, pset, JNI_ABORT); +(*e)->SetLongArrayRegion(e, set, 0, p->nelts * 2, p->set); return (jint)p->nelts; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r390144 - /tomcat/connectors/trunk/jni/native/src/network.c
Author: mturk Date: Thu Mar 30 06:25:42 2006 New Revision: 390144 URL: http://svn.apache.org/viewcvs?rev=390144&view=rev Log: Fix sprintf formating warnings. Modified: tomcat/connectors/trunk/jni/native/src/network.c Modified: tomcat/connectors/trunk/jni/native/src/network.c URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/native/src/network.c?rev=390144&r1=390143&r2=390144&view=diff == --- tomcat/connectors/trunk/jni/native/src/network.c (original) +++ tomcat/connectors/trunk/jni/native/src/network.c Thu Mar 30 06:25:42 2006 @@ -85,8 +85,8 @@ fprintf(stderr, "Last receive error : %d\n", sp_erl_recv); fprintf(stderr, "Total sendfile calls: %d\n", sf_num_send); -fprintf(stderr, "Minimum sendfile lenght : %d\n", sf_min_send); -fprintf(stderr, "Maximum sendfile lenght : %d\n", sf_max_send); +fprintf(stderr, "Minimum sendfile lenght : %d" APR_SIZE_T_FMT "\n", sf_min_send); +fprintf(stderr, "Maximum sendfile lenght : %d" APR_SIZE_T_FMT "\n", sf_max_send); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r390147 - /tomcat/connectors/trunk/jni/native/src/network.c
Author: mturk Date: Thu Mar 30 06:32:04 2006 New Revision: 390147 URL: http://svn.apache.org/viewcvs?rev=390147&view=rev Log: Copy/paste error. Remove extra format. Modified: tomcat/connectors/trunk/jni/native/src/network.c Modified: tomcat/connectors/trunk/jni/native/src/network.c URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/native/src/network.c?rev=390147&r1=390146&r2=390147&view=diff == --- tomcat/connectors/trunk/jni/native/src/network.c (original) +++ tomcat/connectors/trunk/jni/native/src/network.c Thu Mar 30 06:32:04 2006 @@ -85,8 +85,8 @@ fprintf(stderr, "Last receive error : %d\n", sp_erl_recv); fprintf(stderr, "Total sendfile calls: %d\n", sf_num_send); -fprintf(stderr, "Minimum sendfile lenght : %d" APR_SIZE_T_FMT "\n", sf_min_send); -fprintf(stderr, "Maximum sendfile lenght : %d" APR_SIZE_T_FMT "\n", sf_max_send); +fprintf(stderr, "Minimum sendfile lenght : %" APR_SIZE_T_FMT "\n", sf_min_send); +fprintf(stderr, "Maximum sendfile lenght : %" APR_SIZE_T_FMT "\n", sf_max_send); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r391288 - /tomcat/connectors/trunk/jni/native/src/sslnetwork.c
Author: mturk Date: Tue Apr 4 05:32:16 2006 New Revision: 391288 URL: http://svn.apache.org/viewcvs?rev=391288&view=rev Log: Fix ssl code by properly registering the socket shutdown modes. Modified: tomcat/connectors/trunk/jni/native/src/sslnetwork.c Modified: tomcat/connectors/trunk/jni/native/src/sslnetwork.c URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/native/src/sslnetwork.c?rev=391288&r1=391287&r2=391288&view=diff == --- tomcat/connectors/trunk/jni/native/src/sslnetwork.c (original) +++ tomcat/connectors/trunk/jni/native/src/sslnetwork.c Tue Apr 4 05:32:16 2006 @@ -289,19 +289,22 @@ int i = SSL_get_error(con->ssl, s); switch (i) { case SSL_ERROR_NONE: +con->shutdown_type = SSL_SHUTDOWN_TYPE_STANDARD; return APR_SUCCESS; break; case SSL_ERROR_WANT_READ: case SSL_ERROR_WANT_WRITE: if ((rv = wait_for_io_or_timeout(con, i)) != APR_SUCCESS) { +con->shutdown_type = SSL_SHUTDOWN_TYPE_UNCLEAN; return rv; } break; case SSL_ERROR_SYSCALL: +case SSL_ERROR_SSL: s = apr_get_netos_error(); if (!APR_STATUS_IS_EAGAIN(s) && !APR_STATUS_IS_EINTR(s)) { -con->shutdown_type = SSL_SHUTDOWN_TYPE_STANDARD; +con->shutdown_type = SSL_SHUTDOWN_TYPE_UNCLEAN; return s; } break; @@ -309,7 +312,7 @@ /* * Anything else is a fatal error */ -con->shutdown_type = SSL_SHUTDOWN_TYPE_STANDARD; +con->shutdown_type = SSL_SHUTDOWN_TYPE_UNCLEAN; return SSL_TO_APR_ERROR(i); break; } @@ -319,7 +322,7 @@ */ if (SSL_get_verify_result(con->ssl) != X509_V_OK) { /* TODO: Log SSL client authentication failed */ -con->shutdown_type = SSL_SHUTDOWN_TYPE_STANDARD; +con->shutdown_type = SSL_SHUTDOWN_TYPE_UNCLEAN; /* TODO: Figure out the correct return value */ return APR_EGENERAL; } @@ -355,28 +358,33 @@ switch (i) { case SSL_ERROR_ZERO_RETURN: *len = 0; +con->shutdown_type = SSL_SHUTDOWN_TYPE_STANDARD; return APR_EOF; break; case SSL_ERROR_WANT_READ: case SSL_ERROR_WANT_WRITE: if ((rv = wait_for_io_or_timeout(con, i)) != APR_SUCCESS) { +con->shutdown_type = SSL_SHUTDOWN_TYPE_UNCLEAN; return rv; } break; case SSL_ERROR_SYSCALL: +case SSL_ERROR_SSL: if (!APR_STATUS_IS_EAGAIN(os) && !APR_STATUS_IS_EINTR(os)) { -con->shutdown_type = SSL_SHUTDOWN_TYPE_STANDARD; +con->shutdown_type = SSL_SHUTDOWN_TYPE_UNCLEAN; return os; } break; default: +con->shutdown_type = SSL_SHUTDOWN_TYPE_UNCLEAN; return os; break; } } else { *len = s; +con->shutdown_type = SSL_SHUTDOWN_TYPE_STANDARD; break; } } @@ -388,16 +396,17 @@ apr_size_t *len) { tcn_ssl_conn_t *con = (tcn_ssl_conn_t *)sock; -int s, rd = (int)(*len); +int s, wr = (int)(*len); apr_status_t rv = APR_SUCCESS; for (;;) { -if ((s = SSL_write(con->ssl, buf, rd)) <= 0) { +if ((s = SSL_write(con->ssl, buf, wr)) <= 0) { apr_status_t os = apr_get_netos_error(); int i = SSL_get_error(con->ssl, s); switch (i) { case SSL_ERROR_ZERO_RETURN: *len = 0; +con->shutdown_type = SSL_SHUTDOWN_TYPE_STANDARD; return APR_EOF; break; case SSL_ERROR_WANT_READ: @@ -407,13 +416,15 @@ } break; case SSL_ERROR_SYSCALL: +case SSL_ERROR_SSL: if (!APR_STATUS_IS_EAGAIN(os) && !APR_STATUS_IS_EINTR(os)) { -con->shutdown_type = SSL_SHUTDOWN_TYPE_STANDARD; +con->shutdown_typ
svn commit: r391301 - /tomcat/connectors/trunk/jni/examples/mkcerts
Author: mturk Date: Tue Apr 4 06:25:40 2006 New Revision: 391301 URL: http://svn.apache.org/viewcvs?rev=391301&view=rev Log: Update year and add export for pkcs12 formatted server certificate. Modified: tomcat/connectors/trunk/jni/examples/mkcerts Modified: tomcat/connectors/trunk/jni/examples/mkcerts URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/examples/mkcerts?rev=391301&r1=391300&r2=391301&view=diff == --- tomcat/connectors/trunk/jni/examples/mkcerts (original) +++ tomcat/connectors/trunk/jni/examples/mkcerts Tue Apr 4 06:25:40 2006 @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright 1999-2004 The Apache Software Foundation +# Copyright 1999-2006 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. @@ -100,10 +100,10 @@ organizationalUnitName = Organizational Unit Name organizationalUnitName_value= Apache Tomcat commonName = Common Name -commonName_value= Tomcat Demo Root CA +commonName_value= Apache Tomcat demo root CA commonName_max = 64 emailAddress= Email Address -emailAddress_value = [EMAIL PROTECTED] +emailAddress_value = [EMAIL PROTECTED] emailAddress_max= 40 [ extensions ] subjectKeyIdentifier= hash @@ -149,10 +149,10 @@ organizationalUnitName = Organizational Unit Name organizationalUnitName_value= Apache Tomcat commonName = Common Name -commonName_value= Tomcat Localhost Secure Demo Server +commonName_value= Apache Tomcat localhost secure demo server commonName_max = 64 emailAddress= Email Address -emailAddress_value = [EMAIL PROTECTED] +emailAddress_value = [EMAIL PROTECTED] emailAddress_max= 40 [ extensions ] nsCertType = server @@ -172,6 +172,8 @@ $CA -passin $PASSPHRASE -batch -config ca.cfg -extensions server_cert -policy server_policy -out x.crt -infiles localhost.csr $X509 -in x.crt -out localhost.crt rm -f x.crt +# Create PKCS12 localhost certificate +$OPENSSL pkcs12 -export -passout $PASSPHRASE -passin $PASSPHRASE -in localhost.crt -inkey localhost.key -certfile ca.crt -out localhost.p12 $GENRSA -passout $PASSPHRASE -out user.key -rand .rnd 1024 @@ -188,7 +190,7 @@ commonName_value= Localhost Administrator commonName_max = 64 emailAddress= Email Address -emailAddress_value = [EMAIL PROTECTED] +emailAddress_value = [EMAIL PROTECTED] emailAddress_max= 40 [ extensions ] nsCertType = client,email @@ -208,8 +210,6 @@ $OPENSSL pkcs12 -export -passout $PASSPHRASE -passin $PASSPHRASE -in user.crt -inkey user.key -certfile ca.crt -out user.p12 rm -f ca.cfg -rm -f ca.serial.old -rm -f ca.index.old +rm -f *.old rm -f ca.index.attr -rm -f ca.index.attr.old rm -f .rnd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r391647 - /tomcat/build/tc5.5.x/build.properties.default
Author: mturk Date: Wed Apr 5 08:48:07 2006 New Revision: 391647 URL: http://svn.apache.org/viewcvs?rev=391647&view=rev Log: Update to version 5.5.17 so that HEAD is build as next release. Modified: tomcat/build/tc5.5.x/build.properties.default Modified: tomcat/build/tc5.5.x/build.properties.default URL: http://svn.apache.org/viewcvs/tomcat/build/tc5.5.x/build.properties.default?rev=391647&r1=391646&r2=391647&view=diff == --- tomcat/build/tc5.5.x/build.properties.default (original) +++ tomcat/build/tc5.5.x/build.properties.default Wed Apr 5 08:48:07 2006 @@ -12,10 +12,10 @@ # - Vesion Control Flags - version.major=5 version.minor=5 -version.build=16 +version.build=17 version.patch=0 #Set the pretty version name -version=5.5.16 +version=5.5.17 # - Compile Control Flags - compile.debug=on - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r391649 - /tomcat/connectors/trunk/jk/native/configure.in
Author: mturk Date: Wed Apr 5 08:49:41 2006 New Revision: 391649 URL: http://svn.apache.org/viewcvs?rev=391649&view=rev Log: Update VERSION to the current number. Modified: tomcat/connectors/trunk/jk/native/configure.in Modified: tomcat/connectors/trunk/jk/native/configure.in URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/native/configure.in?rev=391649&r1=391648&r2=391649&view=diff == --- tomcat/connectors/trunk/jk/native/configure.in (original) +++ tomcat/connectors/trunk/jk/native/configure.in Wed Apr 5 08:49:41 2006 @@ -11,7 +11,7 @@ dnl package and version. (synchronization with common/jk_version.h ?) PACKAGE=mod_jk -VERSION=1.2.14 +VERSION=1.2.16 AM_INIT_AUTOMAKE(${PACKAGE}, ${VERSION}) @@ -134,30 +134,30 @@ pathname to the apxs tool; defaults to finding apxs in your PATH.], [ -case "${withval}" in +case "${withval}" in y | yes | true) find_apxs=true ;; n | no | false) find_apxs=false ;; *) find_apxs=false ;; esac -if ${TEST} ${find_apxs} ; then +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 +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) @@ -179,7 +179,7 @@ INCTEMP="`$APXS -q APR_INCLUDEDIR` `$APXS -q APU_INCLUDEDIR`" for INC in ${INCTEMP}; do APRINCLUDEDIR="${APRINCLUDEDIR} -I${INC}" - done + done AC_MSG_RESULT([APRINCLUDEDIR is $APRINCLUDEDIR]) APXSCFLAGS="`${APXS} -q CFLAGS` `${APXS} -q EXTRA_CFLAGS` -DHAVE_APR ${APRINCLUDEDIR}" APXSCPPFLAGS="`${APXS} -q EXTRA_CPPFLAGS`" @@ -187,7 +187,7 @@ LIBTOOL=`$APXS -q LIBTOOL` fi AC_MSG_RESULT([building connector for \"$WEBSERVER\"]) - + AC_SUBST(APXS) fi fi @@ -202,11 +202,11 @@ sinclude(../support/os_apache.m4) dnl it is copied from the configure of JServ ;=) -dnl and adapted. +dnl and adapted. apache_dir_is_src="false" AC_ARG_WITH(apache, -[ --with-apache=DIR Build static Apache module. DIR is the pathname +[ --with-apache=DIR Build static Apache module. DIR is the pathname to the Apache source directory.], [ if ${TEST} ! -z "$WEBSERVER" ; then @@ -217,10 +217,10 @@ if ${TEST} -n "${withval}" && ${TEST} -d "${withval}" ; then if ${TEST} -d "${withval}/src" ; then - # handle the case where people use relative paths to + # handle the case where people use relative paths to # the apache source directory by pre-pending the current - # build directory to the path. there are probably - # errors with this if configure is run while in a + # build directory to the path. there are probably + # errors with this if configure is run while in a # different directory than what you are in at the time if ${TEST} -n "`${ECHO} ${withval}|${GREP} \"^\.\.\"`" ; then withval=`pwd`/${withval} @@ -229,7 +229,7 @@ apache_dir=${withval} apache_dir_is_src="true" AC_MSG_RESULT(${apache_dir}) - + AC_MSG_CHECKING(for Apache include directory) if ${TEST} -d "${withval}/src/include" ; then @@ -269,7 +269,7 @@ configure_apache=true configure_src=true - + AC_MSG_RESULT([building connector for \"$WEBSERVER\"]) ], [ @@ -354,9 +354,9 @@ AC_SUBST(APXSLDFLAGS) if ${TEST} -n "${JK_JNI_WORKER}" ; then - + WEBSERVER="jni ${WEBSERVER}" - + dnl Find the JDK dnl Results go in JAVA_HOME dnl Also sets JAVA_PLATFORM to 1 for 1.1 and to 2 for 1.2 @@ -364,10 +364,10 @@ AC_MSG_CHECKING
svn commit: r391652 - /tomcat/connectors/trunk/jni/native/src/sslnetwork.c
Author: mturk Date: Wed Apr 5 08:54:34 2006 New Revision: 391652 URL: http://svn.apache.org/viewcvs?rev=391652&view=rev Log: Add missing shutdown unclean flag if send times out due to the broken receiver (client). Modified: tomcat/connectors/trunk/jni/native/src/sslnetwork.c Modified: tomcat/connectors/trunk/jni/native/src/sslnetwork.c URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/native/src/sslnetwork.c?rev=391652&r1=391651&r2=391652&view=diff == --- tomcat/connectors/trunk/jni/native/src/sslnetwork.c (original) +++ tomcat/connectors/trunk/jni/native/src/sslnetwork.c Wed Apr 5 08:54:34 2006 @@ -406,12 +406,13 @@ switch (i) { case SSL_ERROR_ZERO_RETURN: *len = 0; -con->shutdown_type = SSL_SHUTDOWN_TYPE_STANDARD; +con->shutdown_type = SSL_SHUTDOWN_TYPE_STANDARD; return APR_EOF; break; case SSL_ERROR_WANT_READ: case SSL_ERROR_WANT_WRITE: if ((rv = wait_for_io_or_timeout(con, i)) != APR_SUCCESS) { +con->shutdown_type = SSL_SHUTDOWN_TYPE_UNCLEAN; return rv; } break; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r391984 - /tomcat/connectors/trunk/jni/native/src/poll.c
Author: mturk Date: Thu Apr 6 06:38:26 2006 New Revision: 391984 URL: http://svn.apache.org/viewcvs?rev=391984&view=rev Log: Check for EINTR inside poll call. This will lower the number of JNI calls in case EINTR is signaled. Modified: tomcat/connectors/trunk/jni/native/src/poll.c Modified: tomcat/connectors/trunk/jni/native/src/poll.c URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/native/src/poll.c?rev=391984&r1=391983&r2=391984&view=diff == --- tomcat/connectors/trunk/jni/native/src/poll.c (original) +++ tomcat/connectors/trunk/jni/native/src/poll.c Thu Apr 6 06:38:26 2006 @@ -55,6 +55,7 @@ int sp_poll_timeout; int sp_overflow; int sp_equals; +int sp_eintr; #endif } tcn_pollset_t; @@ -75,6 +76,7 @@ fprintf(stderr, "Maintained : %d\n", p->sp_maintained); fprintf(stderr, "Max. maintained : %d\n", p->sp_max_maintained); fprintf(stderr, "Number of duplicates: %d\n", p->sp_equals); +fprintf(stderr, "Number of interrupts: %d\n", p->sp_eintr); } @@ -249,15 +251,25 @@ #ifdef TCN_DO_STATISTICS p->sp_poll++; #endif -if ((rv = apr_pollset_poll(p->pollset, J2T(timeout), &num, &fd)) != APR_SUCCESS) { -TCN_ERROR_WRAP(rv); +for (;;) { +rv = apr_pollset_poll(p->pollset, J2T(timeout), &num, &fd); +if (rv != APR_SUCCESS) { +if (APR_STATUS_IS_EINTR(rv)) { #ifdef TCN_DO_STATISTICS -if (rv == TCN_TIMEUP) -p->sp_poll_timeout++; -else -p->sp_err_poll++; +p->sp_eintr++; #endif -num = (apr_int32_t)(-rv); +continue; +} +TCN_ERROR_WRAP(rv); +#ifdef TCN_DO_STATISTICS +if (rv == TCN_TIMEUP) +p->sp_poll_timeout++; +else +p->sp_err_poll++; +#endif +num = (apr_int32_t)(-rv); +} +break; } if (num > 0) { #ifdef TCN_DO_STATISTICS - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r393735 - in /tomcat/connectors/trunk/jni/native/src: os.c ssl.c
Author: mturk Date: Wed Apr 12 23:41:49 2006 New Revision: 393735 URL: http://svn.apache.org/viewcvs?rev=393735&view=rev Log: Use proper castings for thread_current. Modified: tomcat/connectors/trunk/jni/native/src/os.c tomcat/connectors/trunk/jni/native/src/ssl.c Modified: tomcat/connectors/trunk/jni/native/src/os.c URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/native/src/os.c?rev=393735&r1=393734&r2=393735&view=diff == --- tomcat/connectors/trunk/jni/native/src/os.c (original) +++ tomcat/connectors/trunk/jni/native/src/os.c Wed Apr 12 23:41:49 2006 @@ -18,7 +18,7 @@ * @author Mladen Turk * @version $Revision$, $Date$ */ - + #include "apr.h" #include "apr_pools.h" #include "apr_portable.h" @@ -46,5 +46,5 @@ TCN_IMPLEMENT_CALL(jlong, OS, threadCurrent)(TCN_STDARGS) { UNREFERENCED_STDARGS; -return (jlong)apr_os_thread_current(); +return (jlong)((unsigned long)apr_os_thread_current()); } Modified: tomcat/connectors/trunk/jni/native/src/ssl.c URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/native/src/ssl.c?rev=393735&r1=393734&r2=393735&view=diff == --- tomcat/connectors/trunk/jni/native/src/ssl.c (original) +++ tomcat/connectors/trunk/jni/native/src/ssl.c Wed Apr 12 23:41:49 2006 @@ -200,7 +200,7 @@ return psaptr->PSATOLD; #else -return (unsigned long)((jlong)apr_os_thread_current()); +return (unsigned long)(apr_os_thread_current()); #endif } @@ -371,7 +371,7 @@ } if (SSLeay() < 0x0090700L) { TCN_FREE_CSTRING(engine); -return (jint)APR_EINVAL; +return (jint)APR_EINVAL; } /* We must register the library in full, to ensure our configuration * code can successfully test the SSL environment. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r394031 - /tomcat/connectors/trunk/jni/native/os/unix/system.c
Author: mturk Date: Thu Apr 13 23:33:09 2006 New Revision: 394031 URL: http://svn.apache.org/viewcvs?rev=394031&view=rev Log: Fix #38985 by properly reporting >4G memory. Modified: tomcat/connectors/trunk/jni/native/os/unix/system.c Modified: tomcat/connectors/trunk/jni/native/os/unix/system.c URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/native/os/unix/system.c?rev=394031&r1=394030&r2=394031&view=diff == --- tomcat/connectors/trunk/jni/native/os/unix/system.c (original) +++ tomcat/connectors/trunk/jni/native/os/unix/system.c Thu Apr 13 23:33:09 2006 @@ -122,12 +122,12 @@ if (sysinfo(&info)) rv = apr_get_os_error(); else { -pvals[0] = (jlong)info.totalram; -pvals[1] = (jlong)info.freeram; -pvals[2] = (jlong)info.totalswap; -pvals[3] = (jlong)info.freeswap; -pvals[4] = (jlong)info.sharedram; -pvals[5] = (jlong)info.bufferram; +pvals[0] = (jlong)(info.totalram * info.mem_unit); +pvals[1] = (jlong)(info.freeram * info.mem_unit); +pvals[2] = (jlong)(info.totalswap * info.mem_unit); +pvals[3] = (jlong)(info.freeswap * info.mem_unit); +pvals[4] = (jlong)(info.sharedram * info.mem_unit); +pvals[5] = (jlong)(info.bufferram * info.mem_unit); pvals[6] = (jlong)(100 - (info.freeram * 100 / info.totalram)); rv = APR_SUCCESS; } @@ -293,7 +293,7 @@ * */ } - + #elif defined(DARWIN) uint64_t mem_total; @@ -327,7 +327,7 @@ TCN_ALLOC_CSTRING(val); UNREFERENCED(o); - + /* TODO: Make ${ENVAR} expansion */ str = (*e)->NewStringUTF(e, J2S(val)); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r394036 - in /tomcat/connectors/trunk/jni/native: include/tcn_version.h os/win32/libtcnative.rc
Author: mturk Date: Fri Apr 14 00:29:02 2006 New Revision: 394036 URL: http://svn.apache.org/viewcvs?rev=394036&view=rev Log: Update version numbers to 1.1.3 Modified: tomcat/connectors/trunk/jni/native/include/tcn_version.h tomcat/connectors/trunk/jni/native/os/win32/libtcnative.rc Modified: tomcat/connectors/trunk/jni/native/include/tcn_version.h URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/native/include/tcn_version.h?rev=394036&r1=394035&r2=394036&view=diff == --- tomcat/connectors/trunk/jni/native/include/tcn_version.h (original) +++ tomcat/connectors/trunk/jni/native/include/tcn_version.h Fri Apr 14 00:29:02 2006 @@ -18,7 +18,7 @@ * @author Mladen Turk * @version $Revision$, $Date$ */ - + #ifndef TCN_VERSION_H #define TCN_VERSION_H @@ -68,7 +68,7 @@ #define TCN_MINOR_VERSION 1 /** patch level */ -#define TCN_PATCH_VERSION 2 +#define TCN_PATCH_VERSION 3 /** * This symbol is defined for internal, "development" copies of TCN. This Modified: tomcat/connectors/trunk/jni/native/os/win32/libtcnative.rc URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/native/os/win32/libtcnative.rc?rev=394036&r1=394035&r2=394036&view=diff == --- tomcat/connectors/trunk/jni/native/os/win32/libtcnative.rc (original) +++ tomcat/connectors/trunk/jni/native/os/win32/libtcnative.rc Fri Apr 14 00:29:02 2006 @@ -19,7 +19,7 @@ "specific language governing permissions and " \ "limitations under the License." -#define TCN_VERISON "1.1.2" +#define TCN_VERISON "1.1.3" 1000 ICON "apache.ico" 1001 DIALOGEX 0, 0, 252, 51 @@ -35,8 +35,8 @@ END 1 VERSIONINFO - FILEVERSION 1,1,2,0 - PRODUCTVERSION 1,1,2,0 + FILEVERSION 1,1,3,0 + PRODUCTVERSION 1,1,3,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r394040 - in /tomcat/connectors/trunk/jni/native: Makefile.in configure.in
Author: mturk Date: Fri Apr 14 00:33:27 2006 New Revision: 394040 URL: http://svn.apache.org/viewcvs?rev=394040&view=rev Log: Separate tcnative and apr versions. Modified: tomcat/connectors/trunk/jni/native/Makefile.in tomcat/connectors/trunk/jni/native/configure.in Modified: tomcat/connectors/trunk/jni/native/Makefile.in URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/native/Makefile.in?rev=394040&r1=394039&r2=394040&view=diff == --- tomcat/connectors/trunk/jni/native/Makefile.in (original) +++ tomcat/connectors/trunk/jni/native/Makefile.in Fri Apr 14 00:33:27 2006 @@ -8,6 +8,7 @@ # gets substituted into some targets [EMAIL PROTECTED]@ [EMAIL PROTECTED]@ [EMAIL PROTECTED]@ srcdir = @srcdir@ VPATH = @srcdir@ @@ -29,6 +30,7 @@ @INCLUDE_RULES@ @INCLUDE_OUTPUTS@ +LINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(LT_LDFLAGS) $(COMPILE) -version-info $(TCNATIVE_LIBTOOL_VERSION) $(ALL_LDFLAGS) -o $@ CLEAN_SUBDIRS = test CLEAN_TARGETS = .make.dirs Modified: tomcat/connectors/trunk/jni/native/configure.in URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/native/configure.in?rev=394040&r1=394039&r2=394040&view=diff == --- tomcat/connectors/trunk/jni/native/configure.in (original) +++ tomcat/connectors/trunk/jni/native/configure.in Fri Apr 14 00:33:27 2006 @@ -50,9 +50,11 @@ version_hdr="$abs_srcdir/include/tcn_version.h" TCNATIVE_MAJOR_VERSION="`$get_version major $version_hdr TCN`" TCNATIVE_DOTTED_VERSION="`$get_version all $version_hdr TCN`" +TCNATIVE_LIBTOOL_VERSION="`$get_version libtool $version_hdr TCN`" AC_SUBST(TCNATIVE_DOTTED_VERSION) AC_SUBST(TCNATIVE_MAJOR_VERSION) +AC_SUBST(TCNATIVE_LIBTOOL_VERSION) echo "Tomcat Native Version: ${TCNATIVE_DOTTED_VERSION}" @@ -146,7 +148,7 @@ CFLAGS="${CFLAGS} -DDEBUG -Wall" else CFLAGS="${CFLAGS} -DDEBUG" - fi + fi AC_MSG_RESULT([...Enabling Maintainer mode...]) ]) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r394043 - /tomcat/connectors/trunk/jni/native/os/win32/system.c
Author: mturk Date: Fri Apr 14 01:03:35 2006 New Revision: 394043 URL: http://svn.apache.org/viewcvs?rev=394043&view=rev Log: Fix compile warnings on WIN64 flatform Modified: tomcat/connectors/trunk/jni/native/os/win32/system.c Modified: tomcat/connectors/trunk/jni/native/os/win32/system.c URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/native/os/win32/system.c?rev=394043&r1=394042&r2=394043&view=diff == --- tomcat/connectors/trunk/jni/native/os/win32/system.c (original) +++ tomcat/connectors/trunk/jni/native/os/win32/system.c Fri Apr 14 01:03:35 2006 @@ -310,9 +310,9 @@ if (fnGetSystemTimes) { if ((*fnGetSystemTimes)(&ft[0], &ft[1], &ft[2])) { -st[0] = ((ft[0].dwHighDateTime << 32) | ft[0].dwLowDateTime) / 10; -st[1] = ((ft[1].dwHighDateTime << 32) | ft[1].dwLowDateTime) / 10; -st[2] = ((ft[2].dwHighDateTime << 32) | ft[2].dwLowDateTime) / 10; +st[0] = (((ULONGLONG)ft[0].dwHighDateTime << 32) | ft[0].dwLowDateTime) / 10; +st[1] = (((ULONGLONG)ft[1].dwHighDateTime << 32) | ft[1].dwLowDateTime) / 10; +st[2] = (((ULONGLONG)ft[2].dwHighDateTime << 32) | ft[2].dwLowDateTime) / 10; } else goto cleanup; @@ -341,8 +341,8 @@ memset(st, 0, sizeof(st)); if (GetProcessTimes(GetCurrentProcess(), &ft[0], &ft[1], &ft[2], &ft[3])) { FileTimeToAprTime((apr_time_t *)&st[0], &ft[0]); -st[1] = ((ft[2].dwHighDateTime << 32) | ft[2].dwLowDateTime) / 10; -st[2] = ((ft[3].dwHighDateTime << 32) | ft[3].dwLowDateTime) / 10; +st[1] = (((ULONGLONG)ft[2].dwHighDateTime << 32) | ft[2].dwLowDateTime) / 10; +st[2] = (((ULONGLONG)ft[3].dwHighDateTime << 32) | ft[3].dwLowDateTime) / 10; } pvals[10] = st[0]; pvals[11] = st[1]; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r394045 - /tomcat/connectors/trunk/jk/native/common/jk_shm.h
Author: mturk Date: Fri Apr 14 01:23:47 2006 New Revision: 394045 URL: http://svn.apache.org/viewcvs?rev=394045&view=rev Log: Use 64 byte alignment instead 1024. The shared memory size will be much lower. Modified: tomcat/connectors/trunk/jk/native/common/jk_shm.h Modified: tomcat/connectors/trunk/jk/native/common/jk_shm.h URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/native/common/jk_shm.h?rev=394045&r1=394044&r2=394045&view=diff == --- tomcat/connectors/trunk/jk/native/common/jk_shm.h (original) +++ tomcat/connectors/trunk/jk/native/common/jk_shm.h Fri Apr 14 01:23:47 2006 @@ -39,7 +39,7 @@ */ #define JK_SHM_MAJOR'1' -#define JK_SHM_MINOR'0' +#define JK_SHM_MINOR'2' #define JK_SHM_STR_SIZ 63 #define JK_SHM_URI_SIZ 127 #define JK_SHM_DYNAMIC 16 @@ -47,8 +47,8 @@ /* Really huge numbers, but 64 workers should be enough */ #define JK_SHM_MAX_WORKERS 64 -#define JK_SHM_DEF_SIZE (JK_SHM_MAX_WORKERS * 1024) -#define JK_SHM_ALIGN(x) JK_ALIGN(x, 1024) +#define JK_SHM_DEF_SIZE (JK_SHM_MAX_WORKERS * 512) +#define JK_SHM_ALIGN(x) JK_ALIGN(x, 64) /* Use 1 minute for measuring read/write data */ #define JK_SERVICE_TRANSFER_INTERVAL60 @@ -61,6 +61,8 @@ volatile int busy; /* Maximum number of busy channels */ volatile int max_busy; +/* Number of currently connected channels */ +volatile int connected; /* worker name */ charname[JK_SHM_STR_SIZ+1]; /* worker domain */ @@ -93,6 +95,10 @@ volatile size_t elected; /* Number of non 200 responses */ volatile size_t errors; +/* Number of recovery attempts */ +volatile size_t recoveries; +/* Number of recovery failures */ +volatile size_t recovery_errors; }; typedef struct jk_shm_worker jk_shm_worker_t; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r394046 - /tomcat/connectors/tags/other/TOMCAT_NATIVE_1_1_3/
Author: mturk Date: Fri Apr 14 01:24:27 2006 New Revision: 394046 URL: http://svn.apache.org/viewcvs?rev=394046&view=rev Log: made a copy Added: tomcat/connectors/tags/other/TOMCAT_NATIVE_1_1_3/ - copied from r394045, tomcat/connectors/trunk/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r535843 - in /tomcat/connectors/trunk/jk/native: apache-1.3/mod_jk.c apache-2.0/mod_jk.c
Author: mturk Date: Mon May 7 03:46:45 2007 New Revision: 535843 URL: http://svn.apache.org/viewvc?view=rev&rev=535843 Log: Fix the detection of client connection status. If everything is send and the client aborted the connection immediately, allow Tomcat to send the END packet to suppress the WARN [org.apache.jk.common.ChannelSocket] processCallbacks status 2 log messages. 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=535843&r1=535842&r2=535843 == --- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Mon May 7 03:46:45 2007 @@ -419,8 +419,12 @@ } } -if (p->r->connection->aborted) +if (ll && p->r->connection->aborted) { +/* Fail if there is something left to send and + * the connection was aborted by the client + */ return JK_FALSE; +} } 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=535843&r1=535842&r2=535843 == --- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Mon May 7 03:46:45 2007 @@ -456,8 +456,12 @@ ll -= r; bb += r; } -if (p->r->connection->aborted) +if (ll && p->r->connection->aborted) { +/* Fail if there is something left to send and + * the connection was aborted by the client + */ return JK_FALSE; +} } return JK_TRUE; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r535844 - /tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c
Author: mturk Date: Mon May 7 03:48:29 2007 New Revision: 535844 URL: http://svn.apache.org/viewvc?view=rev&rev=535844 Log: Fix copy/paste from 2.0 Modified: tomcat/connectors/trunk/jk/native/apache-1.3/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=535844&r1=535843&r2=535844 == --- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Mon May 7 03:48:29 2007 @@ -419,7 +419,7 @@ } } -if (ll && p->r->connection->aborted) { +if (len && p->r->connection->aborted) { /* Fail if there is something left to send and * the connection was aborted by the client */ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r536215 - in /tomcat/connectors/trunk/jk3: ./ ROADMAP
Author: mturk Date: Tue May 8 08:05:24 2007 New Revision: 536215 URL: http://svn.apache.org/viewvc?view=rev&rev=536215 Log: Lets move things :) Added: tomcat/connectors/trunk/jk3/ tomcat/connectors/trunk/jk3/ROADMAP Added: tomcat/connectors/trunk/jk3/ROADMAP URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk3/ROADMAP?view=auto&rev=536215 == --- tomcat/connectors/trunk/jk3/ROADMAP (added) +++ tomcat/connectors/trunk/jk3/ROADMAP Tue May 8 08:05:24 2007 @@ -0,0 +1,43 @@ +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. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r536518 - in /tomcat/tc6.0.x/trunk/res/procrun: amd64/tomcat6.exe amd64/tomcat6w.exe ia64/tomcat6.exe ia64/tomcat6w.exe tomcat6.exe tomcat6w.exe
Author: mturk Date: Wed May 9 06:32:57 2007 New Revision: 536518 URL: http://svn.apache.org/viewvc?view=rev&rev=536518 Log: Update fixed binaries that will do a thread dump on stdout redirected file even if the log level is < INFO Modified: tomcat/tc6.0.x/trunk/res/procrun/amd64/tomcat6.exe tomcat/tc6.0.x/trunk/res/procrun/amd64/tomcat6w.exe tomcat/tc6.0.x/trunk/res/procrun/ia64/tomcat6.exe tomcat/tc6.0.x/trunk/res/procrun/ia64/tomcat6w.exe tomcat/tc6.0.x/trunk/res/procrun/tomcat6.exe tomcat/tc6.0.x/trunk/res/procrun/tomcat6w.exe Modified: tomcat/tc6.0.x/trunk/res/procrun/amd64/tomcat6.exe URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/res/procrun/amd64/tomcat6.exe?view=diff&rev=536518&r1=536517&r2=536518 == Binary files - no diff available. Modified: tomcat/tc6.0.x/trunk/res/procrun/amd64/tomcat6w.exe URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/res/procrun/amd64/tomcat6w.exe?view=diff&rev=536518&r1=536517&r2=536518 == Binary files - no diff available. Modified: tomcat/tc6.0.x/trunk/res/procrun/ia64/tomcat6.exe URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/res/procrun/ia64/tomcat6.exe?view=diff&rev=536518&r1=536517&r2=536518 == Binary files - no diff available. Modified: tomcat/tc6.0.x/trunk/res/procrun/ia64/tomcat6w.exe URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/res/procrun/ia64/tomcat6w.exe?view=diff&rev=536518&r1=536517&r2=536518 == Binary files - no diff available. Modified: tomcat/tc6.0.x/trunk/res/procrun/tomcat6.exe URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/res/procrun/tomcat6.exe?view=diff&rev=536518&r1=536517&r2=536518 == Binary files - no diff available. Modified: tomcat/tc6.0.x/trunk/res/procrun/tomcat6w.exe URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/res/procrun/tomcat6w.exe?view=diff&rev=536518&r1=536517&r2=536518 == Binary files - no diff available. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r536520 - in /tomcat/connectors/trunk/procrun/bin: amd64/tomcat5.exe amd64/tomcat5w.exe ia64/tomcat5.exe ia64/tomcat5w.exe tomcat5.exe tomcat5w.exe
Author: mturk Date: Wed May 9 06:35:30 2007 New Revision: 536520 URL: http://svn.apache.org/viewvc?view=rev&rev=536520 Log: Update fixed binaries that will do a thread dump on stdout redirected file even if the log level is < INFO Modified: tomcat/connectors/trunk/procrun/bin/amd64/tomcat5.exe tomcat/connectors/trunk/procrun/bin/amd64/tomcat5w.exe tomcat/connectors/trunk/procrun/bin/ia64/tomcat5.exe tomcat/connectors/trunk/procrun/bin/ia64/tomcat5w.exe tomcat/connectors/trunk/procrun/bin/tomcat5.exe tomcat/connectors/trunk/procrun/bin/tomcat5w.exe Modified: tomcat/connectors/trunk/procrun/bin/amd64/tomcat5.exe URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/procrun/bin/amd64/tomcat5.exe?view=diff&rev=536520&r1=536519&r2=536520 == Binary files - no diff available. Modified: tomcat/connectors/trunk/procrun/bin/amd64/tomcat5w.exe URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/procrun/bin/amd64/tomcat5w.exe?view=diff&rev=536520&r1=536519&r2=536520 == Binary files - no diff available. Modified: tomcat/connectors/trunk/procrun/bin/ia64/tomcat5.exe URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/procrun/bin/ia64/tomcat5.exe?view=diff&rev=536520&r1=536519&r2=536520 == Binary files - no diff available. Modified: tomcat/connectors/trunk/procrun/bin/ia64/tomcat5w.exe URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/procrun/bin/ia64/tomcat5w.exe?view=diff&rev=536520&r1=536519&r2=536520 == Binary files - no diff available. Modified: tomcat/connectors/trunk/procrun/bin/tomcat5.exe URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/procrun/bin/tomcat5.exe?view=diff&rev=536520&r1=536519&r2=536520 == Binary files - no diff available. Modified: tomcat/connectors/trunk/procrun/bin/tomcat5w.exe URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/procrun/bin/tomcat5w.exe?view=diff&rev=536520&r1=536519&r2=536520 == Binary files - no diff available. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r536529 - in /tomcat/tc6.0.x/trunk/res/procrun: amd64/tomcat6.exe amd64/tomcat6w.exe ia64/tomcat6.exe ia64/tomcat6w.exe tomcat6.exe tomcat6w.exe
Author: mturk Date: Wed May 9 06:54:04 2007 New Revision: 536529 URL: http://svn.apache.org/viewvc?view=rev&rev=536529 Log: Fix binaries by using /D_UNICODE for library as well. Modified: tomcat/tc6.0.x/trunk/res/procrun/amd64/tomcat6.exe tomcat/tc6.0.x/trunk/res/procrun/amd64/tomcat6w.exe tomcat/tc6.0.x/trunk/res/procrun/ia64/tomcat6.exe tomcat/tc6.0.x/trunk/res/procrun/ia64/tomcat6w.exe tomcat/tc6.0.x/trunk/res/procrun/tomcat6.exe tomcat/tc6.0.x/trunk/res/procrun/tomcat6w.exe Modified: tomcat/tc6.0.x/trunk/res/procrun/amd64/tomcat6.exe URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/res/procrun/amd64/tomcat6.exe?view=diff&rev=536529&r1=536528&r2=536529 == Binary files - no diff available. Modified: tomcat/tc6.0.x/trunk/res/procrun/amd64/tomcat6w.exe URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/res/procrun/amd64/tomcat6w.exe?view=diff&rev=536529&r1=536528&r2=536529 == Binary files - no diff available. Modified: tomcat/tc6.0.x/trunk/res/procrun/ia64/tomcat6.exe URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/res/procrun/ia64/tomcat6.exe?view=diff&rev=536529&r1=536528&r2=536529 == Binary files - no diff available. Modified: tomcat/tc6.0.x/trunk/res/procrun/ia64/tomcat6w.exe URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/res/procrun/ia64/tomcat6w.exe?view=diff&rev=536529&r1=536528&r2=536529 == Binary files - no diff available. Modified: tomcat/tc6.0.x/trunk/res/procrun/tomcat6.exe URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/res/procrun/tomcat6.exe?view=diff&rev=536529&r1=536528&r2=536529 == Binary files - no diff available. Modified: tomcat/tc6.0.x/trunk/res/procrun/tomcat6w.exe URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/res/procrun/tomcat6w.exe?view=diff&rev=536529&r1=536528&r2=536529 == Binary files - no diff available. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r536532 - in /tomcat/connectors/trunk/procrun/bin: amd64/tomcat5.exe amd64/tomcat5w.exe ia64/tomcat5.exe ia64/tomcat5w.exe tomcat5.exe tomcat5w.exe
Author: mturk Date: Wed May 9 06:56:58 2007 New Revision: 536532 URL: http://svn.apache.org/viewvc?view=rev&rev=536532 Log: Fix binaries by using /D_UNICODE for library as well. Modified: tomcat/connectors/trunk/procrun/bin/amd64/tomcat5.exe tomcat/connectors/trunk/procrun/bin/amd64/tomcat5w.exe tomcat/connectors/trunk/procrun/bin/ia64/tomcat5.exe tomcat/connectors/trunk/procrun/bin/ia64/tomcat5w.exe tomcat/connectors/trunk/procrun/bin/tomcat5.exe tomcat/connectors/trunk/procrun/bin/tomcat5w.exe Modified: tomcat/connectors/trunk/procrun/bin/amd64/tomcat5.exe URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/procrun/bin/amd64/tomcat5.exe?view=diff&rev=536532&r1=536531&r2=536532 == Binary files - no diff available. Modified: tomcat/connectors/trunk/procrun/bin/amd64/tomcat5w.exe URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/procrun/bin/amd64/tomcat5w.exe?view=diff&rev=536532&r1=536531&r2=536532 == Binary files - no diff available. Modified: tomcat/connectors/trunk/procrun/bin/ia64/tomcat5.exe URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/procrun/bin/ia64/tomcat5.exe?view=diff&rev=536532&r1=536531&r2=536532 == Binary files - no diff available. Modified: tomcat/connectors/trunk/procrun/bin/ia64/tomcat5w.exe URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/procrun/bin/ia64/tomcat5w.exe?view=diff&rev=536532&r1=536531&r2=536532 == Binary files - no diff available. Modified: tomcat/connectors/trunk/procrun/bin/tomcat5.exe URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/procrun/bin/tomcat5.exe?view=diff&rev=536532&r1=536531&r2=536532 == Binary files - no diff available. Modified: tomcat/connectors/trunk/procrun/bin/tomcat5w.exe URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/procrun/bin/tomcat5w.exe?view=diff&rev=536532&r1=536531&r2=536532 == Binary files - no diff available. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r541204 - /tomcat/trunk/dist.xml
Author: mturk Date: Wed May 23 23:54:44 2007 New Revision: 541204 URL: http://svn.apache.org/viewvc?view=rev&rev=541204 Log: Add windows service binaries to the .zip distribution. The rule can be excluded by defining exclude.service.binaries in build.properties file. Service binaries included are for all platforms WIN32 and WIN64. Modified: tomcat/trunk/dist.xml Modified: tomcat/trunk/dist.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/dist.xml?view=diff&rev=541204&r1=541203&r2=541204 == --- tomcat/trunk/dist.xml (original) +++ tomcat/trunk/dist.xml Wed May 23 23:54:44 2007 @@ -418,7 +418,7 @@ + description="Create Windows 32-bit installer" if="execute.installer"> @@ -426,10 +426,9 @@ - - + + + @@ -477,6 +476,15 @@ + + + + + + + + + @@ -493,7 +501,15 @@ - + + + + + + @@ -589,6 +605,14 @@ + + + + + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r541206 - /tomcat/trunk/bin/service.bat
Author: mturk Date: Wed May 23 23:56:59 2007 New Revision: 541206 URL: http://svn.apache.org/viewvc?view=rev&rev=541206 Log: Automatically detect CPU and 64-bit JVM version. This allows to install the proper service wrapper for the JVM and CPU used. Modified: tomcat/trunk/bin/service.bat Modified: tomcat/trunk/bin/service.bat URL: http://svn.apache.org/viewvc/tomcat/trunk/bin/service.bat?view=diff&rev=541206&r1=541205&r2=541206 == --- tomcat/trunk/bin/service.bat (original) +++ tomcat/trunk/bin/service.bat Wed May 23 23:56:59 2007 @@ -15,30 +15,45 @@ rem --- rem Guess CATALINA_HOME if not defined + +rem Make sure prerequisite environment variables are set +if not "%JAVA_HOME%" == "" goto okJavaHome +echo The JAVA_HOME environment variable is not defined +echo This environment variable is needed to run this program +goto end + +:okJavaHome + +rem Detect Java Version and CPU +set JVM_PLATFORM=%PROCESSOR_ARCHITEW6432% +if "%JVM_PLATFORM%" == "" set JVM_PLATFORM=%PROCESSOR_ARCHITECTURE% + +set EXECUTABLE_CPU= +java -version 2>&1 | findstr /I 64-bit > NUL +if not ERRORLEVEL == 1 set EXECUTABLE_CPU=%JVM_PLATFORM%\ + set CURRENT_DIR=%cd% if not "%CATALINA_HOME%" == "" goto gotHome -set CATALINA_HOME=%cd% -if exist "%CATALINA_HOME%\bin\tomcat6.exe" goto okHome -rem CD to the upper dir -cd .. -set CATALINA_HOME=%cd% +set CURRENT_DIR=.\ +if "%OS%" == "Windows_NT" set CURRENT_DIR=%~dp0% + +pushd %CURRENT_DIR%.. +set CATALINA_HOME=%CD% +popd + :gotHome -if exist "%CATALINA_HOME%\bin\tomcat6.exe" goto okHome -echo The tomcat.exe was not found... +if exist "%CATALINA_HOME%\bin\%EXECUTABLE_CPU%tomcat6.exe" goto okHome +echo Tomcat6.exe for %JVM_PLATFORM% was not found... echo The CATALINA_HOME environment variable is not defined correctly. echo This environment variable is needed to run this program goto end -rem Make sure prerequisite environment variables are set -if not "%JAVA_HOME%" == "" goto okHome -echo The JAVA_HOME environment variable is not defined -echo This environment variable is needed to run this program -goto end + :okHome if not "%CATALINA_BASE%" == "" goto gotBase set CATALINA_BASE=%CATALINA_HOME% :gotBase - -set EXECUTABLE=%CATALINA_HOME%\bin\tomcat6.exe + +set EXECUTABLE=%CATALINA_HOME%\bin\%EXECUTABLE_CPU%tomcat6.exe rem Set default Service name set SERVICE_NAME=Tomcat6 @@ -61,15 +76,15 @@ :doRemove rem Remove the service "%EXECUTABLE%" //DS//%SERVICE_NAME% -echo The service '%SERVICE_NAME%' has been removed +echo Service '%SERVICE_NAME%' has been removed goto end :doInstall rem Install the service -echo Installing the service '%SERVICE_NAME%' ... -echo Using CATALINA_HOME:%CATALINA_HOME% -echo Using CATALINA_BASE:%CATALINA_BASE% -echo Using JAVA_HOME:%JAVA_HOME% +echo Installing service '%SERVICE_NAME%' ... +echo Using CATALINA_HOME: %CATALINA_HOME% +echo Using CATALINA_BASE: %CATALINA_BASE% +echo Using JAVA_HOME: %JAVA_HOME% rem Use the environment variables as an example rem Each command line option is prefixed with PR_ @@ -86,7 +101,8 @@ if exist "%PR_JVM%" goto foundJvm set PR_JVM=auto :foundJvm -echo Using JVM: %PR_JVM% +echo Using JVM : %PR_JVM% +echo Using JVM_PLATFORM : %JVM_PLATFORM% "%EXECUTABLE%" //IS//%SERVICE_NAME% --StartClass org.apache.catalina.startup.Bootstrap --StopClass org.apache.catalina.startup.Bootstrap --StartParams start --StopParams stop if not errorlevel 1 goto installed echo Failed installing '%SERVICE_NAME%' service @@ -106,7 +122,7 @@ set PR_STDOUTPUT=auto set PR_STDERROR=auto "%EXECUTABLE%" //US//%SERVICE_NAME% ++JvmOptions "-Djava.io.tmpdir=%CATALINA_BASE%\temp" --JvmMs 128 --JvmMx 256 -echo The service '%SERVICE_NAME%' has been installed. +echo Service '%SERVICE_NAME%' has been installed. :end cd %CURRENT_DIR% - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r543852 - /tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c
Author: mturk Date: Sat Jun 2 23:59:41 2007 New Revision: 543852 URL: http://svn.apache.org/viewvc?view=rev&rev=543852 Log: Handle the disconnected sockets logging differently from the dead 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=543852&r1=543851&r2=543852 == --- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Sat Jun 2 23:59:41 2007 @@ -1212,9 +1212,18 @@ if (err || ((rc = ajp_connection_tcp_send_message(ae, op->request, l)) != JK_TRUE)) { if (rc != JK_FATAL_ERROR) { -jk_log(l, JK_LOG_INFO, - "(%s) error sending request. Will try another pooled connection", - ae->worker->name); +if (err == 1) { +jk_log(l, JK_LOG_DEBUG, + "(%s) failed sending request. " + "Will try another pooled connection", +ae->worker->name); +} +else { +jk_log(l, JK_LOG_INFO, + "(%s) error sending request. " + "Will try another pooled connection", +ae->worker->name); +} ajp_next_connection(ae, l); } else { @@ -1236,13 +1245,27 @@ * If we failed to reuse a connection, try to reconnect. */ if (!IS_VALID_SOCKET(ae->sd)) { -if (err) { -/* XXX: If err is set, the tomcat is either dead or disconnected */ +if (err == 1) { +/* If err is set, the tomcat is disconnected */ +jk_log(l, JK_LOG_INFO, + "(%s) all endpoints are disconnected", ae->worker->name); +JK_TRACE_EXIT(l); +return JK_FALSE; +} +else if (err) { +/* If err is set, the tomcat is dead */ jk_log(l, JK_LOG_INFO, - "(%s) all endpoints are %s", - ae->worker->name, err == 1 ? "disconnected" : "dead"); + "(%s) all endpoints are dead", ae->worker->name); +/* TODO: What is the purpose of the following log message? + * IMO it is very confusing and does not reflect the + * real reason (CPING/CPONG failed) of the error. + * Further more user might deliberately set the + * connectionTimeout and this is normal operational + * message in that case. + */ jk_log(l, JK_LOG_INFO, - "(%s) increase the backend idle connection timeout or the connection_pool_minsize", + "(%s) increase the backend idle connection " + "timeout or the connection_pool_minsize", ae->worker->name); JK_TRACE_EXIT(l); return JK_FALSE; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r543853 - in /tomcat/connectors/trunk/jk: native/common/jk_connect.c xdocs/miscellaneous/changelog.xml
Author: mturk Date: Sun Jun 3 00:08:36 2007 New Revision: 543853 URL: http://svn.apache.org/viewvc?view=rev&rev=543853 Log: Use initial zero timeout for select call. Patch provided by David McLaughlin. Modified: tomcat/connectors/trunk/jk/native/common/jk_connect.c tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml 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=543853&r1=543852&r2=543853 == --- tomcat/connectors/trunk/jk/native/common/jk_connect.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_connect.c Sun Jun 3 00:08:36 2007 @@ -654,15 +654,18 @@ FD_ZERO(&fd); FD_SET(sock, &fd); -/* Wait one microsecond */ +/* Initially test the socket without any blocking. + */ tv.tv_sec = 0; -tv.tv_usec = 1; +tv.tv_usec = 0; do { rc = select((int)sock + 1, &fd, NULL, NULL, &tv); #if defined(WIN32) || (defined(NETWARE) && defined(__NOVELL_LIBC__)) errno = WSAGetLastError() - WSABASEERR; #endif +/* Wait one microsecond on next select, if EINTR */ +tv.tv_usec = 1; } while (rc == -1 && errno == EINTR); if (rc == 0) { 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=543853&r1=543852&r2=543853 == --- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Sun Jun 3 00:08:36 2007 @@ -28,6 +28,15 @@ + Use initial zero timeout for jk_is_socket_connected. The resulting + detection is the same but offers a huge performance increase + with mod_jk. In most cases the Operating System does not favor + the 1 microsecond timeout, but it rather rounds that up to much + higher value (frequency of interrupt timer which on most systems + defaults to 100Hz). + Patch provided by David McLaughlin. (mturk) + + Always build with thread support, unless flag --enable-prefork is set during for configure. (rjung) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r544137 - /tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c
Author: mturk Date: Mon Jun 4 05:08:33 2007 New Revision: 544137 URL: http://svn.apache.org/viewvc?view=rev&rev=544137 Log: Add simple URI normalizer that can deal with things like %252e%252e. This is mostly copy/paste from the IIS module 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=544137&r1=544136&r2=544137 == --- tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c Mon Jun 4 05:08:33 2007 @@ -36,6 +36,8 @@ #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[] = { @@ -47,6 +49,116 @@ 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) @@ -535,6 +647,7 @@ const char *uri, jk_logger_t *l) { unsigned int i; +int rc; const char *rv = NULL; char url[JK_MAX_URI_LEN+1]; @@ -578,6 +691,22 @@ url[i] = uri[i]; } url[i] = '\0'; +if (JK_IS_DEBUG_LEVEL(l)) +jk_log(l, JK_LOG_DEBUG, "Attempting to map original URI '%s' from %d maps", + url, uw_map->size); +rc = unescape_url(url); +if (rc == BAD_REQUEST) { +jk_log(l, JK_LOG_INFO, "Invalid
svn commit: r545126 - in /tomcat/connectors/trunk: jk/native/common/jk_global.h jni/java/org/apache/tomcat/Apr.java
Author: mturk Date: Thu Jun 7 02:32:08 2007 New Revision: 545126 URL: http://svn.apache.org/viewvc?view=rev&rev=545126 Log: Use JK_OPT_FWDURICOMPAT again as default Modified: tomcat/connectors/trunk/jk/native/common/jk_global.h tomcat/connectors/trunk/jni/java/org/apache/tomcat/Apr.java 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=545126&r1=545125&r2=545126 == --- tomcat/connectors/trunk/jk/native/common/jk_global.h (original) +++ tomcat/connectors/trunk/jk/native/common/jk_global.h Thu Jun 7 02:32:08 2007 @@ -234,7 +234,7 @@ #define JK_OPT_FWDURICOMPATUNPARSED 0x0002 #define JK_OPT_FWDURIESCAPED0x0003 -#define JK_OPT_FWDURIDEFAULTJK_OPT_FWDURICOMPATUNPARSED +#define JK_OPT_FWDURIDEFAULTJK_OPT_FWDURICOMPAT #define JK_OPT_FWDKEYSIZE 0x0004 Modified: tomcat/connectors/trunk/jni/java/org/apache/tomcat/Apr.java URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jni/java/org/apache/tomcat/Apr.java?view=diff&rev=545126&r1=545125&r2=545126 == --- tomcat/connectors/trunk/jni/java/org/apache/tomcat/Apr.java (original) +++ tomcat/connectors/trunk/jni/java/org/apache/tomcat/Apr.java Thu Jun 7 02:32:08 2007 @@ -22,9 +22,51 @@ import java.util.Properties; public class Apr { -private static String aprInfo = null; +public static String Platform = null; +public static String Cpu = null; +public static String[] Libraries = null; static { +String prop = System.getProperty("os.name"); +String platform = "unknown"; + +if (name.startsWith("Windows")) +Platform = "windows"; +else if (name.equals("Linux")) +Platform = "linux2"; +else if (name.equals("SunOS")) +Platform = "solaris"; +else if (name.equals("HP-UX")) +Platform = "hpux"; +else +Platform = "unknown"; + prop = System.getProperty("os.arch"); + +if (Platform.equals("windows")) { +if (prop.equals("x86")) +Cpu = "i686"; +else +Cpu = prop; +} +else if (Platform.equals("linux2")) { +if (prop.equals("x86")) +Cpu = "i686"; +else +Cpu = prop; +} +else if (Platform.equals("solaris")) { +Cpu = prop; +} +else if (Platform.equals("hpux")) { +if (prop.startsWith("PA_RISC")) +Cpu = "parisc2"; +else if (prop.startsWith("IA64")) +Cpu = "ia64"; +else +Cpu = prop; +} +else +Cpu = "unknown"; try { InputStream is = Apr.class.getResourceAsStream @@ -32,7 +74,11 @@ Properties props = new Properties(); props.load(is); is.close(); -aprInfo = props.getProperty("tcn.info"); +int count = Integer.parseInt(props.getProperty(Platform + ".count")); +Libraries = new String[count]; +for (int i = 0; i < count; i++) { +Libraries[i] = props.getProperty(Platfrom + "." + i); +} } catch (Throwable t) { ; // Nothing - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r545128 - /tomcat/connectors/trunk/jni/java/org/apache/tomcat/Apr.java
Author: mturk Date: Thu Jun 7 02:37:54 2007 New Revision: 545128 URL: http://svn.apache.org/viewvc?view=rev&rev=545128 Log: Oops. Made an unwanted commit. Revert the changes to Apr.java Modified: tomcat/connectors/trunk/jni/java/org/apache/tomcat/Apr.java Modified: tomcat/connectors/trunk/jni/java/org/apache/tomcat/Apr.java URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jni/java/org/apache/tomcat/Apr.java?view=diff&rev=545128&r1=545127&r2=545128 == --- tomcat/connectors/trunk/jni/java/org/apache/tomcat/Apr.java (original) +++ tomcat/connectors/trunk/jni/java/org/apache/tomcat/Apr.java Thu Jun 7 02:37:54 2007 @@ -22,51 +22,9 @@ import java.util.Properties; public class Apr { -public static String Platform = null; -public static String Cpu = null; -public static String[] Libraries = null; +private static String aprInfo = null; static { -String prop = System.getProperty("os.name"); -String platform = "unknown"; - -if (name.startsWith("Windows")) -Platform = "windows"; -else if (name.equals("Linux")) -Platform = "linux2"; -else if (name.equals("SunOS")) -Platform = "solaris"; -else if (name.equals("HP-UX")) -Platform = "hpux"; -else -Platform = "unknown"; - prop = System.getProperty("os.arch"); - -if (Platform.equals("windows")) { -if (prop.equals("x86")) -Cpu = "i686"; -else -Cpu = prop; -} -else if (Platform.equals("linux2")) { -if (prop.equals("x86")) -Cpu = "i686"; -else -Cpu = prop; -} -else if (Platform.equals("solaris")) { -Cpu = prop; -} -else if (Platform.equals("hpux")) { -if (prop.startsWith("PA_RISC")) -Cpu = "parisc2"; -else if (prop.startsWith("IA64")) -Cpu = "ia64"; -else -Cpu = prop; -} -else -Cpu = "unknown"; try { InputStream is = Apr.class.getResourceAsStream @@ -74,11 +32,7 @@ Properties props = new Properties(); props.load(is); is.close(); -int count = Integer.parseInt(props.getProperty(Platform + ".count")); -Libraries = new String[count]; -for (int i = 0; i < count; i++) { -Libraries[i] = props.getProperty(Platfrom + "." + i); -} +aprInfo = props.getProperty("tcn.info"); } catch (Throwable t) { ; // Nothing - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r550789 - /tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c
Author: mturk Date: Tue Jun 26 05:28:00 2007 New Revision: 550789 URL: http://svn.apache.org/viewvc?view=rev&rev=550789 Log: Do not pass session id if it is zero length. For now only log those attempts. We should consider returning 400 if the jsessionid is empty perhaps. 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=550789&r1=550788&r2=550789 == --- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c Tue Jun 26 05:28:00 2007 @@ -390,13 +390,22 @@ /* Retrieve session id from the cookie or the parameter * (parameter first) */ -static char *get_sessionid(jk_ws_service_t *s) +static char *get_sessionid(jk_ws_service_t *s, jk_logger_t *l) { char *val; val = get_path_param(s, JK_PATH_SESSION_IDENTIFIER); if (!val) { val = get_cookie(s, JK_SESSION_IDENTIFIER); } +if (val && !*val) { +/* TODO: For now only log the empty sessions. + * However we should probably return 400 + * (BAD_REQUEST) in this case + */ +jk_log(l, JK_LOG_INFO, + "Detected empty session identifier."); +return NULL; +} return val; } @@ -913,7 +922,7 @@ /* Use sessionid only if sticky_session is * defined for this load balancer */ -sessionid = get_sessionid(s); +sessionid = get_sessionid(s, l); } if (JK_IS_DEBUG_LEVEL(l)) jk_log(l, JK_LOG_DEBUG, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r551809 - /tomcat/connectors/trunk/jk/native/common/jk_msg_buff.c
Author: mturk Date: Thu Jun 28 23:32:27 2007 New Revision: 551809 URL: http://svn.apache.org/viewvc?view=rev&rev=551809 Log: Fix potential overflow. The actual encoded string length is strlen + 3 (Two bytes for len and one '\0') Modified: tomcat/connectors/trunk/jk/native/common/jk_msg_buff.c Modified: tomcat/connectors/trunk/jk/native/common/jk_msg_buff.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_msg_buff.c?view=diff&rev=551809&r1=551808&r2=551809 == --- tomcat/connectors/trunk/jk/native/common/jk_msg_buff.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_msg_buff.c Thu Jun 28 23:32:27 2007 @@ -173,7 +173,7 @@ } len = (unsigned short)strlen(param); -if (msg->len + len + 2 > msg->maxlen) { +if (msg->len + len + 3 > msg->maxlen) { return -1; } @@ -181,7 +181,7 @@ jk_b_append_int(msg, len); /* We checked for space !! */ -strncpy((char *)msg->buf + msg->len, param, len + 1); /* including \0 */ +memcpy(msg->buf + msg->len, param, len + 1); /* including \0 */ #if (defined(AS400) && !defined(AS400_UTF8)) || defined(_OSD_POSIX) /* convert from EBCDIC if needed */ jk_xlate_to_ascii((char *)msg->buf + msg->len, len + 1); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r551810 - in /tomcat/connectors/trunk/jk/native/common: jk_ajp_common.c jk_lb_worker.c
Author: mturk Date: Thu Jun 28 23:49:28 2007 New Revision: 551810 URL: http://svn.apache.org/viewvc?view=rev&rev=551810 Log: Properly handle low memory situations, by checking the return values from message allocation functions. Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c tomcat/connectors/trunk/jk/native/common/jk_lb_worker.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=551810&r1=551809&r2=551810 == --- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Thu Jun 28 23:49:28 2007 @@ -792,7 +792,18 @@ JK_TRACE_ENTER(l); msg = jk_b_new(&ae->pool); -jk_b_set_buffer_size(msg, 16); /* 16 is way too large but I'm lazy :-) */ +if (!msg) { +jk_log(l, JK_LOG_ERROR, + "Failed allocating AJP message"); +JK_TRACE_EXIT(l); +return JK_FALSE; +} +if (jk_b_set_buffer_size(msg, 16)) { +jk_log(l, JK_LOG_ERROR, + "Failed allocating AJP message buffer"); +JK_TRACE_EXIT(l); +return JK_FALSE; +} jk_b_reset(msg); jk_b_append_byte(msg, AJP13_CPING_REQUEST); @@ -1212,7 +1223,7 @@ if (err || ((rc = ajp_connection_tcp_send_message(ae, op->request, l)) != JK_TRUE)) { if (rc != JK_FATAL_ERROR) { -if (err == 1) { +if (err == 1) { jk_log(l, JK_LOG_DEBUG, "(%s) failed sending request. " "Will try another pooled connection", @@ -1222,7 +1233,7 @@ jk_log(l, JK_LOG_INFO, "(%s) error sending request. " "Will try another pooled connection", -ae->worker->name); +ae->worker->name); } ajp_next_connection(ae, l); } @@ -1828,15 +1839,54 @@ p = e->endpoint_private; op->request = jk_b_new(&(p->pool)); -jk_b_set_buffer_size(op->request, p->worker->max_packet_size); +if (!op->request) { +*is_error = JK_HTTP_SERVER_ERROR; +jk_log(l, JK_LOG_ERROR, + "Failed allocating AJP message"); +JK_TRACE_EXIT(l); +return JK_SERVER_ERROR; +} +if (jk_b_set_buffer_size(op->request, p->worker->max_packet_size)) { +*is_error = JK_HTTP_SERVER_ERROR; +jk_log(l, JK_LOG_ERROR, + "Failed allocating AJP message buffer"); +JK_TRACE_EXIT(l); +return JK_SERVER_ERROR; +} jk_b_reset(op->request); op->reply = jk_b_new(&(p->pool)); -jk_b_set_buffer_size(op->reply, p->worker->max_packet_size); +if (!op->reply) { +*is_error = JK_HTTP_SERVER_ERROR; +jk_log(l, JK_LOG_ERROR, + "Failed allocating AJP message"); +JK_TRACE_EXIT(l); +return JK_SERVER_ERROR; +} +if (jk_b_set_buffer_size(op->reply, p->worker->max_packet_size)) { +*is_error = JK_HTTP_SERVER_ERROR; +jk_log(l, JK_LOG_ERROR, + "Failed allocating AJP message buffer"); +JK_TRACE_EXIT(l); +return JK_SERVER_ERROR; +} jk_b_reset(op->reply); op->post = jk_b_new(&(p->pool)); -jk_b_set_buffer_size(op->post, p->worker->max_packet_size); +if (!op->post) { +*is_error = JK_HTTP_SERVER_ERROR; +jk_log(l, JK_LOG_ERROR, + "Failed allocating AJP message"); +JK_TRACE_EXIT(l); +return JK_SERVER_ERROR; +} +if (jk_b_set_buffer_size(op->post, p->worker->max_packet_size)) { +*is_error = JK_HTTP_SERVER_ERROR; +jk_log(l, JK_LOG_ERROR, + "Failed allocating AJP message buffer"); +JK_TRACE_EXIT(l); +return JK_SERVER_ERROR; +} jk_b_reset(op->post); op->recoverable = JK_TRUE; 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=551810&r1=551809&r2=551810 == --- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c Thu Jun 28 23:49:28 2007 @@ -909,7 +909,20 @@ /* set the recovery post, for LB mode */ s->reco_buf = jk_b_new(s
svn commit: r552292 - in /tomcat/connectors/trunk/jk/native/common: jk_ajp_common.c jk_connect.c
Author: mturk Date: Sun Jul 1 04:54:45 2007 New Revision: 552292 URL: http://svn.apache.org/viewvc?view=rev&rev=552292 Log: Use shutdown instead hard close for connected sockets. This ensures that the FIN will be send to the Tomcat thus switching from CLOSE_WAIT to TIME_WAIT. The rewritten shutdown_socket is basically Apache 1.3 linering_close. It needs testing, but mine tests shows the large decrease in CLOSE_WAIT socket states when connectionTimeout is set on Tomcat side. Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c tomcat/connectors/trunk/jk/native/common/jk_connect.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=552292&r1=552291&r2=552292 == --- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Sun Jul 1 04:54:45 2007 @@ -681,7 +681,7 @@ static void ajp_reset_endpoint(ajp_endpoint_t * ae, jk_logger_t *l) { if (IS_VALID_SOCKET(ae->sd) && !ae->reuse) { -jk_close_socket(ae->sd); +jk_shutdown_socket(ae->sd); if (JK_IS_DEBUG_LEVEL(l)) jk_log(l, JK_LOG_DEBUG, "reset socket with sd = %u", ae->sd ); @@ -720,11 +720,12 @@ { int rc; ajp_worker_t *aw = ae->worker; -jk_sock_t sock = ae->sd; +jk_sock_t sock; +JK_ENTER_CS(&aw->cs, rc); +sock = ae->sd; /* Mark existing endpoint socket as closed */ ae->sd = JK_INVALID_SOCKET; -JK_ENTER_CS(&aw->cs, rc); if (rc) { unsigned int i; for (i = 0; i < aw->ep_cache_sz; i++) { @@ -739,7 +740,7 @@ } /* Close previous socket */ if (IS_VALID_SOCKET(sock)) -jk_close_socket(sock); +jk_shutdown_socket(sock); } /* @@ -1195,7 +1196,7 @@ jk_log(l, JK_LOG_DEBUG, "(%s) socket %d is not connected any more (errno=%d)", ae->worker->name, ae->sd, errno); -jk_close_socket(ae->sd); +jk_shutdown_socket(ae->sd); ae->sd = JK_INVALID_SOCKET; err = 1; } @@ -1242,7 +1243,7 @@ jk_log(l, JK_LOG_ERROR, "(%s) error sending request. Unrecoverable operation", ae->worker->name); -jk_close_socket(ae->sd); +jk_shutdown_socket(ae->sd); ae->sd = JK_INVALID_SOCKET; JK_TRACE_EXIT(l); return JK_FALSE; @@ -1291,7 +1292,7 @@ */ if (ajp_connection_tcp_send_message(ae, op->request, l) != JK_TRUE) { /* Close the socket if unable to send request */ -jk_close_socket(ae->sd); +jk_shutdown_socket(ae->sd); ae->sd = JK_INVALID_SOCKET; jk_log(l, JK_LOG_INFO, "(%s) error sending request on a fresh connection (errno=%d)", @@ -1302,7 +1303,7 @@ } else { /* Close the socket if unable to connect */ -jk_close_socket(ae->sd); +jk_shutdown_socket(ae->sd); ae->sd = JK_INVALID_SOCKET; jk_log(l, JK_LOG_INFO, "(%s) error connecting to the backend server (errno=%d)", @@ -1336,7 +1337,7 @@ if (postlen > AJP_HEADER_LEN) { if (ajp_connection_tcp_send_message(ae, op->post, l) != JK_TRUE) { /* Close the socket if unable to send request */ -jk_close_socket(ae->sd); +jk_shutdown_socket(ae->sd); ae->sd = JK_INVALID_SOCKET; jk_log(l, JK_LOG_ERROR, "(%s) failed resending request body (%d)", ae->worker->name, postlen); @@ -1356,7 +1357,7 @@ if (postlen > AJP_HEADER_LEN) { if (ajp_connection_tcp_send_message(ae, s->reco_buf, l) != JK_TRUE) { /* Close the socket if unable to send request */ -jk_close_socket(ae->sd); +jk_shutdown_socket(ae->sd); ae->sd = JK_INVALID_SOCKET; jk_log(l, JK_LOG_ERROR, "(%s) failed resending request body (lb mode) (%d)", @@ -1406,7 +1407,7 @@ s->content_read = (jk_uint64_t)len; if (ajp_connection_tcp_send_message(ae, op->post, l) != JK_TRUE) { /* Close the socket if unable to send request */ -jk_close_socket(ae->sd); +jk_shutdown_socket(ae->sd); ae->sd = JK_INVALID_SOCKET; jk_log(l, JK_LOG_ERR
svn commit: r555180 - /tomcat/connectors/trunk/jk/native/common/jk_worker.c
Author: mturk Date: Tue Jul 10 23:13:11 2007 New Revision: 555180 URL: http://svn.apache.org/viewvc?view=rev&rev=555180 Log: Fix error log message for invalid mounts. Modified: tomcat/connectors/trunk/jk/native/common/jk_worker.c 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=555180&r1=555179&r2=555180 == --- tomcat/connectors/trunk/jk/native/common/jk_worker.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_worker.c Tue Jul 10 23:13:11 2007 @@ -185,7 +185,8 @@ name, SOURCE_TYPE_WORKERDEF, l) == JK_FALSE) { w->destroy(&w, l); jk_log(l, JK_LOG_ERROR, - "validate failed for %s", name); + "mounting %s failed for %s", + map_names[i], name); JK_TRACE_EXIT(l); return JK_FALSE; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r556836 - in /tomcat/connectors/trunk/jk: native/iis/jk_isapi_plugin.c xdocs/miscellaneous/changelog.xml
Author: mturk Date: Tue Jul 17 00:49:04 2007 New Revision: 556836 URL: http://svn.apache.org/viewvc?view=rev&rev=556836 Log: Fix #42849 for IIS only. Modified: tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Modified: tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c?view=diff&rev=556836&r1=556835&r2=556836 == --- tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c (original) +++ tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c Tue Jul 17 00:49:04 2007 @@ -1127,6 +1127,7 @@ return 0; } +static int init_error = 0; DWORD WINAPI HttpFilterProc(PHTTP_FILTER_CONTEXT pfc, DWORD dwNotificationType, LPVOID pvNotification) @@ -1146,6 +1147,14 @@ if (!is_mapread) is_inited = JK_FALSE; } +if (!is_inited && !is_mapread) { +/* In case the initialization failed + * return error. This will make entire IIS + * unusable like with Apache servers + */ + SetLastError(ERROR_INVALID_FUNCTION); + return SF_STATUS_REQ_ERROR; +} if (auth_notification_flags == dwNotificationType) { char uri[INTERNET_MAX_URL_LENGTH]; char snuri[INTERNET_MAX_URL_LENGTH] = "/"; @@ -1372,6 +1381,7 @@ !SetHeader(pfc, "url", extension_uri)) { jk_log(logger, JK_LOG_ERROR, "error while adding request headers"); +SetLastError(ERROR_INVALID_PARAMETER); return SF_STATUS_REQ_ERROR; } Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml?view=diff&rev=556836&r1=556835&r2=556836 == --- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Tue Jul 17 00:49:04 2007 @@ -28,6 +28,13 @@ +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 +in case of fatal initialization errors. (mturk) + + Load Balancer: Fix a deadlock in lb worker, which was exposed on Solaris for threaded Apache MPMs. (rjung) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r559467 - in /tomcat/connectors/trunk: jk/native/common/jk_ajp12_worker.c jk3/ROADMAP
Author: mturk Date: Wed Jul 25 07:09:47 2007 New Revision: 559467 URL: http://svn.apache.org/viewvc?view=rev&rev=559467 Log: Fix compile time warning Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp12_worker.c tomcat/connectors/trunk/jk3/ROADMAP 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=559467&r1=559466&r2=559467 == --- tomcat/connectors/trunk/jk/native/common/jk_ajp12_worker.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_ajp12_worker.c Wed Jul 25 07:09:47 2007 @@ -475,7 +475,7 @@ to_read = READ_BUF_SIZE; } else { -to_read = s->content_length - so_far; +to_read = (unsigned int)(s->content_length - so_far); } if (!s->read(s, buf, to_read, &this_time)) { Modified: tomcat/connectors/trunk/jk3/ROADMAP URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk3/ROADMAP?view=diff&rev=559467&r1=559466&r2=559467 == --- tomcat/connectors/trunk/jk3/ROADMAP (original) +++ tomcat/connectors/trunk/jk3/ROADMAP Wed Jul 25 07:09:47 2007 @@ -50,6 +50,22 @@ server and backend - Maybe transporting the backend connector events back to the web server +* Load Balancer methods + - Round-Robin +Standard basic requests count method + - Least Connections +Number of active sessions + - Response Time +Request/reply response time + - Transferred Data +Data read/transferred over the channel. Total or within +a measured interval. + - All methods have weighted distribution + - Methods can be combined with different weight for each method +e.g. 75% Response Time and 25% Transferred Data + - Load threshold +Make a load treshold for high load. When node reaches the desired +treshold (eg. 90%) update the load factors. HOW TO REACH THE GOALS: ROADMAP. Here are the steps to reach the goals. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r559705 - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Author: mturk Date: Wed Jul 25 23:25:49 2007 New Revision: 559705 URL: http://svn.apache.org/viewvc?view=rev&rev=559705 Log: Modify current year display. No functional change Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_status.c?view=diff&rev=559705&r1=559704&r2=559705 == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Wed Jul 25 23:25:49 2007 @@ -154,7 +154,7 @@ "DTD HTML 3.2 Final//EN\">\n" \ "JK Status Manager" -#define JK_STATUS_COPYRIGHT"Copyright © 1999-2006, The Apache Software Foundation" \ +#define JK_STATUS_COPYRIGHT"Copyright © 1999-2007, The Apache Software Foundation" \ "Licensed under the http://www.apache.org/licenses/LICENSE-2.0\";>" \ "Apache License, Version 2.0." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r559693 - /tomcat/connectors/trunk/jk/native/common/jk_util.c
Author: mturk Date: Wed Jul 25 22:05:02 2007 New Revision: 559693 URL: http://svn.apache.org/viewvc?view=rev&rev=559693 Log: Use correct code style. We don't use an space after the or before the braces 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=559693&r1=559692&r2=559693 == --- tomcat/connectors/trunk/jk/native/common/jk_util.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_util.c Wed Jul 25 22:05:02 2007 @@ -371,9 +371,9 @@ l->log_fmt = jk_log_fmt; fmt = (char *)malloc(JK_TIME_MAX_SIZE + strlen(JK_TIME_PATTERN_MICRO)); -if ( fmt ) { +if (fmt) { strncpy(log_fmt_safe, jk_log_fmt, JK_TIME_MAX_SIZE); -if ( (s = strstr(log_fmt_safe, JK_TIME_CONV_MILLI)) ) { +if ((s = strstr(log_fmt_safe, JK_TIME_CONV_MILLI))) { size_t offset = s - log_fmt_safe; size_t len = strlen(JK_TIME_PATTERN_MILLI); @@ -414,7 +414,7 @@ int done; char log_fmt[JK_TIME_MAX_SIZE]; -if ( !l || !l->log_fmt ) { +if (!l || !l->log_fmt) { return 0; } @@ -430,15 +430,15 @@ #else rc = gettimeofday(&tv, NULL); #endif -if ( rc == 0 ) { +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 ) { +if (l->log_fmt_type == JK_TIME_SUBSEC_MILLI) { sprintf(subsec, "%03d", (int)(tv.tv_usec/1000)); strncpy(log_fmt + l->log_fmt_offset, subsec, 3); } -else if ( l->log_fmt_type == JK_TIME_SUBSEC_MICRO ) { +else if (l->log_fmt_type == JK_TIME_SUBSEC_MICRO) { sprintf(subsec, "%06d", (int)(tv.tv_usec)); strncpy(log_fmt + l->log_fmt_offset, subsec, 6); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r559692 - in /tomcat/connectors/trunk/jk/native/common: jk_logger.h jk_util.c
Author: mturk Date: Wed Jul 25 22:01:31 2007 New Revision: 559692 URL: http://svn.apache.org/viewvc?view=rev&rev=559692 Log: Use size_t for pointer and string based operations Modified: tomcat/connectors/trunk/jk/native/common/jk_logger.h tomcat/connectors/trunk/jk/native/common/jk_util.c 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=559692&r1=559691&r2=559692 == --- tomcat/connectors/trunk/jk/native/common/jk_logger.h (original) +++ tomcat/connectors/trunk/jk/native/common/jk_logger.h Wed Jul 25 22:01:31 2007 @@ -39,9 +39,9 @@ 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 */ +intlog_fmt_type;/* do we want milli or microseconds */ +size_t log_fmt_offset; /* at which position should we insert */ +size_t 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=559692&r1=559691&r2=559692 == --- tomcat/connectors/trunk/jk/native/common/jk_util.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_util.c Wed Jul 25 22:01:31 2007 @@ -374,8 +374,8 @@ if ( fmt ) { 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; -int len = strlen(JK_TIME_PATTERN_MILLI); +size_t offset = s - log_fmt_safe; +size_t len = strlen(JK_TIME_PATTERN_MILLI); l->log_fmt_type = JK_TIME_SUBSEC_MILLI; l->log_fmt_offset = offset; @@ -388,9 +388,9 @@ 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); +else if ((s = strstr(log_fmt_safe, JK_TIME_CONV_MICRO))) { +size_t offset = s - log_fmt_safe; +size_t len = strlen(JK_TIME_PATTERN_MICRO); l->log_fmt_type = JK_TIME_SUBSEC_MICRO; l->log_fmt_offset = offset; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r559711 - /tomcat/connectors/trunk/jk/native/netscape/nsapi.dsp
Author: mturk Date: Wed Jul 25 23:33:59 2007 New Revision: 559711 URL: http://svn.apache.org/viewvc?view=rev&rev=559711 Log: Add missing jk_url to the build Modified: tomcat/connectors/trunk/jk/native/netscape/nsapi.dsp Modified: tomcat/connectors/trunk/jk/native/netscape/nsapi.dsp URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/netscape/nsapi.dsp?view=diff&rev=559711&r1=559710&r2=559711 == --- tomcat/connectors/trunk/jk/native/netscape/nsapi.dsp (original) +++ tomcat/connectors/trunk/jk/native/netscape/nsapi.dsp Wed Jul 25 23:33:59 2007 @@ -168,6 +168,10 @@ # End Source File # Begin Source File +SOURCE=..\common\jk_url.c +# End Source File +# Begin Source File + SOURCE=..\common\jk_util.c # End Source File # Begin Source File @@ -257,6 +261,10 @@ # Begin Source File SOURCE=..\common\jk_uri_worker_map.h +# End Source File +# Begin Source File + +SOURCE=..\common\jk_url.h # End Source File # Begin Source File - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r559694 - /tomcat/connectors/trunk/jk/native/common/jk_global.h
Author: mturk Date: Wed Jul 25 22:10:02 2007 New Revision: 559694 URL: http://svn.apache.org/viewvc?view=rev&rev=559694 Log: On 64 bit systems time_t != long. Use proper casting 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=559694&r1=559693&r2=559694 == --- tomcat/connectors/trunk/jk/native/common/jk_global.h (original) +++ tomcat/connectors/trunk/jk/native/common/jk_global.h Wed Jul 25 22:10:02 2007 @@ -314,7 +314,9 @@ #ifdef WIN32 /* For WIN32, emulate gettimeofday() using _ftime() */ -#define gettimeofday(tv,tz) { struct _timeb tb; _ftime(&tb); (tv)->tv_sec = tb.time; (tv)->tv_usec = tb.millitm * 1000; } +#define gettimeofday(tv, tz) { struct _timeb tb; _ftime(&tb); \ + (tv)->tv_sec = (long)tb.time; \ + (tv)->tv_usec = tb.millitm * 1000; } #define HAVE_VSNPRINTF #define HAVE_SNPRINTF #ifdef HAVE_APR - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r562022 - in /tomcat/connectors/trunk/jk: native/apache-1.3/mod_jk.c native/apache-2.0/mod_jk.c xdocs/miscellaneous/changelog.xml
Author: mturk Date: Wed Aug 1 23:06:18 2007 New Revision: 562022 URL: http://svn.apache.org/viewvc?view=rev&rev=562022 Log: Fix the 401 not passed to the client. 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=562022&r1=562021&r2=562022 == --- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Wed Aug 1 23:06:18 2007 @@ -2159,7 +2159,8 @@ if (rc > 0) { /* If tomcat returned no body and the status is not OK, let apache handle the error code */ -if (!r->sent_bodyct && r->status >= HTTP_BAD_REQUEST) { +if (!r->sent_bodyct && r->status >= HTTP_BAD_REQUEST && + r->status != HTTP_UNAUTHORIZED) { jk_log(conf->log, JK_LOG_INFO, "No body with status=%d" " for worker=%s", r->status, worker_name); 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=562022&r1=562021&r2=562022 == --- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Wed Aug 1 23:06:18 2007 @@ -2250,7 +2250,8 @@ /* [EMAIL PROTECTED] : under i5/OS sent_bodyct is not set correctly */ /* check for header_only to see if there was a body */ -if (!r->sent_bodyct && r->status >= HTTP_BAD_REQUEST) { +if (!r->sent_bodyct && r->status >= HTTP_BAD_REQUEST && + r->status != HTTP_UNAUTHORIZED) { jk_log(xconf->log, JK_LOG_INFO, "No body with status=%d" " for worker=%s", r->status, worker_name); 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=562022&r1=562021&r2=562022 == --- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Wed Aug 1 23:06:18 2007 @@ -23,6 +23,16 @@ new documentation project for JK was started. + + + + + +Pass the 401 as OK instead sending 401 for authentication. (mturk) + + + + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r562025 - in /tomcat/connectors/trunk/jk/native: common/jk_version.h iis/installer/isapi-redirector-win32-msi.ism iis/isapi_redirect.rc
Author: mturk Date: Wed Aug 1 23:10:29 2007 New Revision: 562025 URL: http://svn.apache.org/viewvc?view=rev&rev=562025 Log: Increment version to 1.2.25-dev Modified: tomcat/connectors/trunk/jk/native/common/jk_version.h 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/common/jk_version.h URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_version.h?view=diff&rev=562025&r1=562024&r2=562025 == --- tomcat/connectors/trunk/jk/native/common/jk_version.h (original) +++ tomcat/connectors/trunk/jk/native/common/jk_version.h Wed Aug 1 23:10:29 2007 @@ -26,14 +26,14 @@ /** START OF AREA TO MODIFY BEFORE RELEASING */ #define JK_VERMAJOR 1 #define JK_VERMINOR 2 -#define JK_VERFIX 24 -#define JK_VERSTRING"1.2.24" +#define JK_VERFIX 25 +#define JK_VERSTRING"1.2.25" /* 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/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=562025&r1=562024&r2=562025 == --- 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 Wed Aug 1 23:10:29 2007 @@ -3409,7 +3409,7 @@ ProductIDnone ProductLanguage1033 ProductNameTomcat Isapi Redirector - ProductVersion1.2.24 + ProductVersion1.2.25 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=562025&r1=562024&r2=562025 == --- tomcat/connectors/trunk/jk/native/iis/isapi_redirect.rc (original) +++ tomcat/connectors/trunk/jk/native/iis/isapi_redirect.rc Wed Aug 1 23:10:29 2007 @@ -14,13 +14,13 @@ "specific language governing permissions and " \ "limitations under the License." -#define JK_VERSION_STR "1.2.24" +#define JK_VERSION_STR "1.2.25" #define JK_DLL_BASENAME "isapi_redirect-" JK_VERSION_STR 1 VERSIONINFO - FILEVERSION 1,2,24,0 - PRODUCTVERSION 1,2,24,0 + FILEVERSION 1,2,25,0 + PRODUCTVERSION 1,2,25,0 FILEFLAGSMASK 0x3fL #if defined(_DEBUG) FILEFLAGS 0x01L - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r562478 - in /tomcat/connectors/trunk/jni: java/org/apache/tomcat/jni/Socket.java native/include/tcn_version.h native/os/win32/libtcnative.rc native/src/network.c
Author: mturk Date: Fri Aug 3 07:33:51 2007 New Revision: 562478 URL: http://svn.apache.org/viewvc?view=rev&rev=562478 Log: Add two new 'immediate' methods for sending the data. It is the responsibility of the Java callee to deal with the returned values and retry if the error was non-fatal. Modified: tomcat/connectors/trunk/jni/java/org/apache/tomcat/jni/Socket.java tomcat/connectors/trunk/jni/native/include/tcn_version.h tomcat/connectors/trunk/jni/native/os/win32/libtcnative.rc tomcat/connectors/trunk/jni/native/src/network.c Modified: tomcat/connectors/trunk/jni/java/org/apache/tomcat/jni/Socket.java URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jni/java/org/apache/tomcat/jni/Socket.java?view=diff&rev=562478&r1=562477&r2=562478 == --- tomcat/connectors/trunk/jni/java/org/apache/tomcat/jni/Socket.java (original) +++ tomcat/connectors/trunk/jni/java/org/apache/tomcat/jni/Socket.java Fri Aug 3 07:33:51 2007 @@ -241,11 +241,42 @@ */ public static native int sendb(long sock, ByteBuffer buf, int offset, int len); + +/** + * Send data over a network without retry + * + * This functions acts like a blocking write by default. To change + * this behavior, use apr_socket_timeout_set() or the APR_SO_NONBLOCK + * socket option. + * + * It is possible for both bytes to be sent and an error to be returned. + * + * + * @param sock The socket to send the data over. + * @param buf The Byte buffer which contains the data to be sent. + * @param offset The offset within the buffer array of the first buffer from + * which bytes are to be retrieved; must be non-negative + * and no larger than buf.length + * @param len The maximum number of buffers to be accessed; must be non-negative + *and no larger than buf.length - offset + * @return The number of bytes send. + * + */ +public static native int sendib(long sock, ByteBuffer buf, +int offset, int len); + /** * Send data over a network using internally set ByteBuffer */ public static native int sendbb(long sock, int offset, int len); + +/** + * Send data over a network using internally set ByteBuffer + * without internal retry. + */ +public static native int sendibb(long sock, + int offset, int len); /** * Send multiple packets of data over a network. Modified: tomcat/connectors/trunk/jni/native/include/tcn_version.h URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jni/native/include/tcn_version.h?view=diff&rev=562478&r1=562477&r2=562478 == --- tomcat/connectors/trunk/jni/native/include/tcn_version.h (original) +++ tomcat/connectors/trunk/jni/native/include/tcn_version.h Fri Aug 3 07:33:51 2007 @@ -69,7 +69,7 @@ #define TCN_MINOR_VERSION 1 /** patch level */ -#define TCN_PATCH_VERSION 11 +#define TCN_PATCH_VERSION 12 /** * This symbol is defined for internal, "development" copies of TCN. This Modified: tomcat/connectors/trunk/jni/native/os/win32/libtcnative.rc URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jni/native/os/win32/libtcnative.rc?view=diff&rev=562478&r1=562477&r2=562478 == --- tomcat/connectors/trunk/jni/native/os/win32/libtcnative.rc (original) +++ tomcat/connectors/trunk/jni/native/os/win32/libtcnative.rc Fri Aug 3 07:33:51 2007 @@ -3,7 +3,7 @@ LANGUAGE 0x9,0x1 1 11 logmessages.bin -#define TCN_COPYRIGHT "Copyright 2000-2006 The Apache Software " \ +#define TCN_COPYRIGHT "Copyright 2000-2007 The Apache Software " \ "Foundation or its licensors, as applicable." #define TCN_LICENSE "Licensed under the Apache License, Version 2.0 " \ @@ -19,7 +19,7 @@ "specific language governing permissions and " \ "limitations under the License." -#define TCN_VERISON "1.1.11" +#define TCN_VERISON "1.1.12" 1000 ICON "apache.ico" 1001 DIALOGEX 0, 0, 252, 51 @@ -35,8 +35,8 @@ END 1 VERSIONINFO - FILEVERSION 1,1,11,0 - PRODUCTVERSION 1,1,11,0 + FILEVERSION 1,1,12,0 + PRODUCTVERSION 1,1,12,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L Modified: tomcat/connectors/trunk/jni/native/src/network.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jni/native/src/network.c?view=diff&rev=562478&r1=562477&r2=562478
svn commit: r585876 - /tomcat/connectors/trunk/jni/native/os/win32/libtcnative.rc
Author: mturk Date: Wed Oct 17 22:50:50 2007 New Revision: 585876 URL: http://svn.apache.org/viewvc?rev=585876&view=rev Log: Fix compilation. Add missing backslash Modified: tomcat/connectors/trunk/jni/native/os/win32/libtcnative.rc Modified: tomcat/connectors/trunk/jni/native/os/win32/libtcnative.rc URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jni/native/os/win32/libtcnative.rc?rev=585876&r1=585875&r2=585876&view=diff == --- tomcat/connectors/trunk/jni/native/os/win32/libtcnative.rc (original) +++ tomcat/connectors/trunk/jni/native/os/win32/libtcnative.rc Wed Oct 17 22:50:50 2007 @@ -11,7 +11,7 @@ #define TCN_LICENSE "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\r\n\r\n" + "may obtain a copy of the License at\r\n\r\n" \ "http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n"; \ "Unless required by applicable law or agreed to in " \ "writing, software distributed under the License is " \ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r585877 - /tomcat/connectors/trunk/jni/native/os/win32/libtcnative.rc
Author: mturk Date: Wed Oct 17 22:56:42 2007 New Revision: 585877 URL: http://svn.apache.org/viewvc?rev=585877&view=rev Log: Fix compilation. Properly quote the strings Modified: tomcat/connectors/trunk/jni/native/os/win32/libtcnative.rc Modified: tomcat/connectors/trunk/jni/native/os/win32/libtcnative.rc URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jni/native/os/win32/libtcnative.rc?rev=585877&r1=585876&r2=585877&view=diff == --- tomcat/connectors/trunk/jni/native/os/win32/libtcnative.rc (original) +++ tomcat/connectors/trunk/jni/native/os/win32/libtcnative.rc Wed Oct 17 22:56:42 2007 @@ -5,18 +5,18 @@ #define TCN_COPYRIGHT "Licensed to the Apache Software Foundation (ASF) under " \ "one or more contributor license agreements. See the " \ - "NOTICE file distributed with this work for additional "\ + "NOTICE file distributed with this work for additional " \ "information regarding copyright ownership." #define TCN_LICENSE "The ASF licenses this file to You under the Apache " \ - "License, Version 2.0 (the "License"); you may not use " \ + "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\r\n\r\n" \ "http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n"; \ "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. "\ + "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." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r591962 - /tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c
Author: mturk Date: Mon Nov 5 03:30:28 2007 New Revision: 591962 URL: http://svn.apache.org/viewvc?rev=591962&view=rev Log: Return DECLINED for NULL uw_map. This allows to have configured vhosts that have no mappings without need to initialize an empty uw_map 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?rev=591962&r1=591961&r2=591962&view=diff == --- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Mon Nov 5 03:30:28 2007 @@ -2918,8 +2918,17 @@ return DECLINED; } } +if (!conf->uw_map) { +if (JK_IS_DEBUG_LEVEL(conf->log)) +jk_log(conf->log, JK_LOG_DEBUG, + "Into translate empty uri map for uri=%s", + r->uri); -worker = map_uri_to_worker(conf->uw_map, r->uri, NULL, conf->log); +return DECLINED; +} +else +worker = map_uri_to_worker(conf->uw_map, r->uri, + NULL, conf->log); if (worker) { r->handler = apr_pstrdup(r->pool, JK_HANDLER); @@ -3060,8 +3069,17 @@ return DECLINED; } +if (!conf->uw_map) { +if (JK_IS_DEBUG_LEVEL(conf->log)) +jk_log(conf->log, JK_LOG_DEBUG, + "Into map_to_storage empty uri map for uri=%s", + r->uri); -worker = map_uri_to_worker(conf->uw_map, r->uri, NULL, conf->log); +return DECLINED; +} +else +worker = map_uri_to_worker(conf->uw_map, r->uri, + NULL, conf->log); if (worker) { r->handler = apr_pstrdup(r->pool, JK_HANDLER); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r591985 - /tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c
Author: mturk Date: Mon Nov 5 05:15:12 2007 New Revision: 591985 URL: http://svn.apache.org/viewvc?rev=591985&view=rev Log: Make envvar tables created on demand. Only non virtual hosts have pre-allocated tables, other are allocated if JkEnvVar is specified inside vhost 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?rev=591985&r1=591984&r2=591985&view=diff == --- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Mon Nov 5 05:15:12 2007 @@ -656,7 +656,7 @@ s->ssl_session = NULL; s->ssl_key_size = -1; /* required by Servlet 2.3 Api, added in jtc */ -if (conf->ssl_enable || conf->envvars_in_use) { +if (conf->ssl_enable || conf->envvars) { ap_add_common_vars(r); if (conf->ssl_enable) { @@ -716,7 +716,7 @@ } } -if (conf->envvars_in_use) { +if (conf->envvars) { const apr_array_header_t *t = conf->envvar_items; if (t && t->nelts) { int i; @@ -1810,6 +1810,12 @@ &jk_module); conf->envvars_in_use = JK_TRUE; +if (!conf->envvars) { +conf->envvars = apr_table_make(cmd->pool, 0); +conf->envvars_def = apr_table_make(cmd->pool, 0); +conf->envvar_items = apr_array_make(cmd->pool, 0, +sizeof(envvar_item)); +} /* env_name is mandatory, default_value is optional. * No value means send the attribute only, if the env var is set during runtime. @@ -2289,10 +2295,14 @@ we can't guarantee what order pools get cleaned up between APR implementations. */ wc_close(NULL); -if (conf->uri_to_context) +if (conf->uri_to_context) { jk_map_free(&conf->uri_to_context); -if (conf->uw_map) -uri_worker_map_free(&conf->uw_map, NULL); +/* We cannot have allocated uw_map + * unless we've allocated uri_to_context + */ +if (conf->uw_map) +uri_worker_map_free(&conf->uw_map, NULL); +} conf->was_initialized = JK_FALSE; } s = s->next; @@ -2363,9 +2373,11 @@ c->uw_map = NULL; c->envvars_in_use = JK_FALSE; -c->envvars = apr_table_make(p, 0); -c->envvars_def = apr_table_make(p, 0); -c->envvar_items = apr_array_make(p, 0, sizeof(envvar_item)); +if (!s->is_virtual) { +c->envvars = apr_table_make(p, 0); +c->envvars_def = apr_table_make(p, 0); +c->envvar_items = apr_array_make(p, 0, sizeof(envvar_item)); +} c->s = s; apr_pool_cleanup_register(p, s, jk_apr_pool_cleanup, jk_apr_pool_cleanup); @@ -2431,15 +2443,16 @@ overrides->options |= (base->options & ~base->exclude_options); -if (base->envvars_in_use) { -if (apr_table_elts(base->envvars)) { -overrides->envvars_in_use = JK_TRUE; +if (base->envvars) { +if (overrides->envvars && overrides->envvars_in_use) { merge_apr_table(base->envvars, overrides->envvars); -} -if (apr_table_elts(base->envvars_def)) { -overrides->envvars_in_use = JK_TRUE; merge_apr_table(base->envvars_def, overrides->envvars_def); } +else { +overrides->envvars = base->envvars; +overrides->envvars_def = base->envvars_def; +overrides->envvar_items = base->envvar_items; +} } if (overrides->mount_file_reload == JK_UNSET) @@ -2813,7 +2826,7 @@ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, "JkRequestLogFormat format array NULL"); } -if (sconf->envvars_in_use) { +if (sconf->envvars && sconf->envvars_in_use) { int i; const apr_array_header_t *arr; const apr_table_entry_t *elts; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r591990 - /tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c
Author: mturk Date: Mon Nov 5 05:35:02 2007 New Revision: 591990 URL: http://svn.apache.org/viewvc?rev=591990&view=rev Log: Allocate temporary mount maps on first directive 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?rev=591990&r1=591989&r2=591990&view=diff == --- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Mon Nov 5 05:35:02 2007 @@ -898,6 +898,11 @@ if (c[0] != '/') return "JkMount context should start with /"; +if (!conf->uri_to_context) { +if (!jk_map_alloc(&(conf->uri_to_context))) { +return "JkMount Memory error"; +} +} /* * Add the new worker to the alias map. */ @@ -942,6 +947,12 @@ return "JkUnMount context should start with /"; uri = apr_pstrcat(cmd->temp_pool, "!", c, NULL); + +if (!conf->uri_to_context) { +if (!jk_map_alloc(&(conf->uri_to_context))) { +return "JkUnMount Memory error"; +} +} /* * Add the new worker to the alias map. */ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r591995 - /tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c
Author: mturk Date: Mon Nov 5 05:49:37 2007 New Revision: 591995 URL: http://svn.apache.org/viewvc?rev=591995&view=rev Log: Do not allocate envvar maps on create. They are allocated on first use 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?rev=591995&r1=591994&r2=591995&view=diff == --- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Mon Nov 5 05:49:37 2007 @@ -2384,11 +2384,9 @@ c->uw_map = NULL; c->envvars_in_use = JK_FALSE; -if (!s->is_virtual) { -c->envvars = apr_table_make(p, 0); -c->envvars_def = apr_table_make(p, 0); -c->envvar_items = apr_array_make(p, 0, sizeof(envvar_item)); -} +c->envvars = NULL; +c->envvars_def = NULL; +c->envvar_items = NULL; c->s = s; apr_pool_cleanup_register(p, s, jk_apr_pool_cleanup, jk_apr_pool_cleanup); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r591997 - /tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c
Author: mturk Date: Mon Nov 5 05:56:06 2007 New Revision: 591997 URL: http://svn.apache.org/viewvc?rev=591997&view=rev Log: Remove trailing spaces. No functional change 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?rev=591997&r1=591996&r2=591997&view=diff == --- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Mon Nov 5 05:56:06 2007 @@ -901,7 +901,7 @@ if (!conf->uri_to_context) { if (!jk_map_alloc(&(conf->uri_to_context))) { return "JkMount Memory error"; -} +} } /* * Add the new worker to the alias map. @@ -951,7 +951,7 @@ if (!conf->uri_to_context) { if (!jk_map_alloc(&(conf->uri_to_context))) { return "JkUnMount Memory error"; -} +} } /* * Add the new worker to the alias map. @@ -1825,7 +1825,7 @@ conf->envvars = apr_table_make(cmd->pool, 0); conf->envvars_def = apr_table_make(cmd->pool, 0); conf->envvar_items = apr_array_make(cmd->pool, 0, -sizeof(envvar_item)); +sizeof(envvar_item)); } /* env_name is mandatory, default_value is optional. @@ -2946,7 +2946,7 @@ "Into translate empty uri map for uri=%s", r->uri); -return DECLINED; +return DECLINED; } else worker = map_uri_to_worker(conf->uw_map, r->uri, @@ -3097,7 +3097,7 @@ "Into map_to_storage empty uri map for uri=%s", r->uri); -return DECLINED; +return DECLINED; } else worker = map_uri_to_worker(conf->uw_map, r->uri, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r593462 - /tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c
Author: mturk Date: Fri Nov 9 01:18:47 2007 New Revision: 593462 URL: http://svn.apache.org/viewvc?rev=593462&view=rev Log: Initialize and allocate uw_map on first directive. Do not allocate on JkMountCopy if no additional maps are present 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?rev=593462&r1=593461&r2=593462&view=diff == --- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Fri Nov 9 01:18:47 2007 @@ -1014,6 +1014,12 @@ if (jk_file_exists(conf->mount_file) != JK_TRUE) return "Can't find the mount file specified"; +if (!conf->uri_to_context) { +if (!jk_map_alloc(&(conf->uri_to_context))) { +return "JkMountFile Memory error"; +} +} + return NULL; } @@ -2377,10 +2383,7 @@ c->strip_session = JK_FALSE; } -if (!jk_map_alloc(&(c->uri_to_context))) { -jk_error_exit(APLOG_MARK, APLOG_EMERG, s, p, "Memory error"); -} - +c->uri_to_context = NULL; c->uw_map = NULL; c->envvars_in_use = JK_FALSE; @@ -2464,13 +2467,12 @@ } } -if (overrides->mount_file_reload == JK_UNSET) -overrides->mount_file_reload = base->mount_file_reload; -if (overrides->mountcopy == JK_TRUE || -(overrides->mountcopy == JK_UNSET && jk_mount_copy_all == JK_TRUE)) { + if (overrides->uri_to_context) { if (jk_map_copy(base->uri_to_context, overrides->uri_to_context) == JK_FALSE) { jk_error_exit(APLOG_MARK, APLOG_EMERG, overrides->s, p, "Memory error"); } +if (overrides->mount_file_reload == JK_UNSET) +overrides->mount_file_reload = base->mount_file_reload; if (!overrides->mount_file) overrides->mount_file = base->mount_file; if (!overrides->alias_dir) @@ -2804,10 +2806,11 @@ * Therefore we check, if this config structure really belongs to this * vhost, otherwise we create a new one and merge. */ -if (sconf && sconf->s != srv && jk_mount_copy_all == JK_FALSE) { +if (sconf && sconf->s != srv) { jk_server_conf_t *srvconf = (jk_server_conf_t *)create_jk_config(pconf, srv); sconf = (jk_server_conf_t *)merge_jk_config(pconf, sconf, srvconf); ap_set_module_config(srv->module_config, &jk_module, sconf); + } if (sconf && sconf->was_initialized == JK_FALSE) { @@ -2815,18 +2818,25 @@ if (open_jklog(srv, pconf)) return HTTP_INTERNAL_SERVER_ERROR; 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, - srv->process->pool, "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; -uri_worker_map_load(sconf->uw_map, sconf->log); +if (sconf->uri_to_context) { +if (!uri_worker_map_alloc(&(sconf->uw_map), + sconf->uri_to_context, sconf->log)) +jk_error_exit(APLOG_MARK, APLOG_EMERG, srv, + srv->process->pool, "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; +uri_worker_map_load(sconf->uw_map, sconf->log); +
svn commit: r593493 - /tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c
Author: mturk Date: Fri Nov 9 03:20:13 2007 New Revision: 593493 URL: http://svn.apache.org/viewvc?rev=593493&view=rev Log: Not sure why we set to NULL or zero something that was already set to zero 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?rev=593493&r1=593492&r2=593493&view=diff == --- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Fri Nov 9 03:20:13 2007 @@ -2335,29 +2335,13 @@ jk_server_conf_t *c = (jk_server_conf_t *) apr_pcalloc(p, sizeof(jk_server_conf_t)); -c->mount_file = NULL; -c->log_file = NULL; -c->log = NULL; -c->alias_dir = NULL; -c->stamp_format_string = NULL; -c->format_string = NULL; -c->format = NULL; -c->exclude_options = 0; c->was_initialized = JK_FALSE; if (s->is_virtual) { c->mountcopy = JK_UNSET; c->mount_file_reload = JK_UNSET; c->log_level = JK_UNSET; -c->options = 0; -c->worker_indicator = NULL; c->ssl_enable = JK_UNSET; -c->https_indicator = NULL; -c->certs_indicator = NULL; -c->cipher_indicator = NULL; -c->certchain_prefix = NULL; -c->session_indicator = NULL; -c->key_size_indicator = NULL; c->strip_session = JK_UNSET; } else { c->mountcopy = JK_FALSE; @@ -2382,14 +2366,7 @@ c->key_size_indicator = JK_ENV_KEY_SIZE; c->strip_session = JK_FALSE; } - -c->uri_to_context = NULL; -c->uw_map = NULL; - c->envvars_in_use = JK_FALSE; -c->envvars = NULL; -c->envvars_def = NULL; -c->envvar_items = NULL; c->s = s; apr_pool_cleanup_register(p, s, jk_apr_pool_cleanup, jk_apr_pool_cleanup); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r593497 - /tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c
Author: mturk Date: Fri Nov 9 03:45:14 2007 New Revision: 593497 URL: http://svn.apache.org/viewvc?rev=593497&view=rev Log: Log missing uri maps 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?rev=593497&r1=593496&r2=593497&view=diff == --- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Fri Nov 9 03:45:14 2007 @@ -19,7 +19,7 @@ * Description: Apache 2 plugin for Tomcat * * Author: Gal Shachor <[EMAIL PROTECTED]> * * Henri Gomez <[EMAIL PROTECTED]>* - * Version: $Revision$ * + * Version: $Revision$* ***/ /* @@ -2930,9 +2930,9 @@ if (!conf->uw_map) { if (JK_IS_DEBUG_LEVEL(conf->log)) jk_log(conf->log, JK_LOG_DEBUG, - "Into translate empty uri map for uri=%s", + "missing uri map for %s:%s", + conf->s->server_hostname ? conf->s->server_hostname : "_default_", r->uri); - return DECLINED; } else @@ -3041,6 +3041,12 @@ } } } +else { +if (JK_IS_DEBUG_LEVEL(conf->log)) +jk_log(conf->log, JK_LOG_DEBUG, + "no match for %s found", + r->uri); +} } } @@ -3081,9 +3087,9 @@ if (!conf->uw_map) { if (JK_IS_DEBUG_LEVEL(conf->log)) jk_log(conf->log, JK_LOG_DEBUG, - "Into map_to_storage empty uri map for uri=%s", + "missing uri map for %s:%s", + conf->s->server_hostname ? conf->s->server_hostname : "_default_", r->uri); - return DECLINED; } else @@ -3117,6 +3123,12 @@ *jsessionid = '\0'; } return DECLINED; +} +else { +if (JK_IS_DEBUG_LEVEL(conf->log)) +jk_log(conf->log, JK_LOG_DEBUG, + "no match for %s found", + r->uri); } } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]