svn commit: r1129429 - /tomcat/jk/trunk/native/iis/jk_isapi_plugin.c

2011-05-30 Thread timw
Author: timw
Date: Mon May 30 23:16:54 2011
New Revision: 1129429

URL: http://svn.apache.org/viewvc?rev=1129429&view=rev
Log:
Fixing compile error

Modified:
tomcat/jk/trunk/native/iis/jk_isapi_plugin.c

Modified: tomcat/jk/trunk/native/iis/jk_isapi_plugin.c
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/native/iis/jk_isapi_plugin.c?rev=1129429&r1=1129428&r2=1129429&view=diff
==
--- tomcat/jk/trunk/native/iis/jk_isapi_plugin.c (original)
+++ tomcat/jk/trunk/native/iis/jk_isapi_plugin.c Mon May 30 23:16:54 2011
@@ -958,6 +958,7 @@ static int JK_METHOD start_response(jk_w
 status >= s->extension.use_server_error_pages) {
 if (status == JK_HTTP_UNAUTHORIZED) {
 int found = JK_FALSE;
+unsigned int h;
 for (h = 0; h < num_of_headers; h++) {
 if (!strcasecmp(header_names[h], "WWW-Authenticate")) {
 /*



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1131303 - /tomcat/jk/trunk/HOWTO-RELEASE.txt

2011-06-03 Thread timw
Author: timw
Date: Sat Jun  4 01:45:14 2011
New Revision: 1131303

URL: http://svn.apache.org/viewvc?rev=1131303&view=rev
Log:
Updating JK release instructions - some files have changed, and some servers 
have moved.

Modified:
tomcat/jk/trunk/HOWTO-RELEASE.txt

Modified: tomcat/jk/trunk/HOWTO-RELEASE.txt
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/HOWTO-RELEASE.txt?rev=1131303&r1=1131302&r2=1131303&view=diff
==
--- tomcat/jk/trunk/HOWTO-RELEASE.txt (original)
+++ tomcat/jk/trunk/HOWTO-RELEASE.txt Sat Jun  4 01:45:14 2011
@@ -32,9 +32,11 @@ Do a find for all the docs which include
 and replace it with the new version.  These are the docs I found which
 had to be updated:
 
+native/iis/README
+native/netscape/README
+native/STATUS.txt
 xdocs/index.xml
 xdocs/news/.xml
-native/STATUS.txt
 
 Update the JK_VERISRELEASE define in native/common/jk_version.h, here is
 a svn diff that shows what I changed:
@@ -87,23 +89,27 @@ Create the new source distribution
 A tool named jkrelease.sh in the directory tools creates
 a release tarball and a zip including signature files.
 
+
+
 Upload source distribution and documentation to www.apache.org
 ---
 First update the KEYS on the server if you have added a new pgp key.
 
 scp KEYS to the
 /www/www.apache.org/dist/tomcat/tomcat-connectors
-directory on the www.apache.org server.
+directory on the people.apache.org server.
 
 scp tomcat-connectors-1.2.29-src.tar.gz* to 
-/www/www.apache.org/dist/tomcat/tomcat-connectors/source
+/www/www.apache.org/dist/tomcat/tomcat-connectors/jk/source
 scp tomcat-connectors-1.2.29-src.zip* to   
-/www/www.apache.org/dist/tomcat/tomcat-connectors/source
+/www/www.apache.org/dist/tomcat/tomcat-connectors/jk/source
 
-ssh to www.apache.org and cd to the
+ssh to people.apache.org and cd to the
 /www/www.apache.org/dist/tomcat/tomcat-connectors/jk directory.
 
-Remove the symlinks for current and replace them with a soft link
+Modify README.html and update it to the current version.
+
+Remove the symlinks for current if present and replace them with a soft link
 to the new source distribution files.
 
 ln -s source/tomcat-connectors-1.2.29-src.tar.gz 
tomcat-connectors-src-current.tar.gz
@@ -114,7 +120,7 @@ ln -s source/tomcat-connectors-1.2.29-sr
 Make sure the group write bit is set on all files and directories
 in the jk directory.
 
-chmod -R g+w /www/www.apache.org/dist/tomcat/tomcat-connectors/
+chmod -R g+w /www/www.apache.org/dist/tomcat/tomcat-connectors/jk
 
 Build binaries and upload distributions to www.apache.org
 --
@@ -144,7 +150,7 @@ Remove old release distributions from ww
 
 
 Verify that the old versions of the source and binary distributions are
-available at /www/archive.apache.org/dist/tomcat/tomcat-connector/jk .
+available at /www/archive.apache.org/dist/tomcat/tomcat-connectors/jk .
 Copy old source distributions and binaries as needed, then remove the
 old source and binary distributions.
 
@@ -152,18 +158,22 @@ Arrange the downloads_tomcat-connectors.
 ---
 
 Check tomcat-site out:
+
 svn co https://svn.apache.org/repos/asf/tomcat/site site-tomcat
 
+Arrange the file: xdocs/download-connectors.xml, updating all occurrences
+of the version number to the just released version.
 
-Arrange the file: xdocs/downloads/downloads.xml
+Update xdocs/index.xml to reflect the new release of Tomcat Connectors.
 
-Use ant to regenerate the corresponding html file:
-docs/site/downloads/downloads_tomcat-connectors.html
+Run ant from the site-tomcat directory to regenerate the corresponding html 
file:
+docs/site/download-connectors.html
 
 Commit it after checking carefully the changes.
 
 Connect to people.apache.org and update the tomcat.apache.org site image,
-the site tomcat.apache.org should reflect the change after a while.
+the site tomcat.apache.org should reflect the change after a while:
+
 cd /x1/www/tomcat.apache.org/site/downloads
 svn update downloads_tomcat-connectors.html
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1151043 - in /tomcat/trunk: java/org/apache/catalina/valves/ExtendedAccessLogValve.java webapps/docs/changelog.xml webapps/docs/config/valve.xml

2011-07-26 Thread timw
Author: timw
Date: Tue Jul 26 09:41:36 2011
New Revision: 1151043

URL: http://svn.apache.org/viewvc?rev=1151043&view=rev
Log:
https://issues.apache.org/bugzilla/show_bug.cgi?id=51545

Adding ability to log current request thread name in ExtendedAccessLogValve 
using Tomcat specific x-threadname pattern format token.

Modified:
tomcat/trunk/java/org/apache/catalina/valves/ExtendedAccessLogValve.java
tomcat/trunk/webapps/docs/changelog.xml
tomcat/trunk/webapps/docs/config/valve.xml

Modified: 
tomcat/trunk/java/org/apache/catalina/valves/ExtendedAccessLogValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/ExtendedAccessLogValve.java?rev=1151043&r1=1151042&r2=1151043&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/valves/ExtendedAccessLogValve.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/valves/ExtendedAccessLogValve.java 
Tue Jul 26 09:41:36 2011
@@ -64,6 +64,7 @@ import org.apache.tomcat.util.ExceptionU
  * sc-status:  The status code
  * time:  Time the request was served
  * time-taken:  Time (in seconds) taken to serve the 
request
+ * x-threadname: Current request thread name (can compare 
later with stacktraces)
  * x-A(XXX): Pull XXX attribute from the servlet context 
  * x-C(XXX): Pull the first cookie of the name XXX 
  * x-O(XXX): Pull the all response header values XXX 
@@ -745,6 +746,10 @@ public class ExtendedAccessLogValve exte
 return null;
 }
 String token = tokenizer.getToken();
+if ("threadname".equals(token)) {
+return new ThreadNameElement();
+}
+
 if (!tokenizer.hasParameter()) {
 log.error("x param in wrong format. Needs to be 'x-#(...)' read 
the docs!");
 return null;

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1151043&r1=1151042&r2=1151043&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Tue Jul 26 09:41:36 2011
@@ -76,7 +76,7 @@
 <others/> tag when using absolute ordering. (markt)
   
   
-Move the SetCharacaterEncoding filter from the examples web application
+Move the SetCharacterEncoding filter from the examples web application
 to the org.apache.catalina.filters package so it is
 available for all web applications. (markt)
   
@@ -90,6 +90,11 @@
 51555: Allow destroy() to be called on Lifecycle components
 that are in the initialized state. (markt)
   
+  
+Add x-threadname pattern format token to ExtendedAccessLogValve to log
+the current request thread name. Based on a patch from Felix 
Schumacher.
+(timw)
+  
 
   
   

Modified: tomcat/trunk/webapps/docs/config/valve.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/valve.xml?rev=1151043&r1=1151042&r2=1151043&view=diff
==
--- tomcat/trunk/webapps/docs/config/valve.xml (original)
+++ tomcat/trunk/webapps/docs/config/valve.xml Tue Jul 26 09:41:36 2011
@@ -222,7 +222,7 @@
 %v - Local server name
 %D - Time taken to process the request, in millis
 %T - Time taken to process the request, in seconds
-%I - current request thread name (can compare later with 
stacktraces)
+%I - Current request thread name (can compare later with 
stacktraces)
 
 
 
@@ -411,6 +411,7 @@
 sc-status - HTTP status code of the response
 time - Time the request was served in HH:mm:ss format for 
GMT
 time-taken - Time (in seconds as floating point) taken to serve 
the request
+x-threadname - Current request thread name (can compare later 
with stacktraces)
 
 
 For any of the x-H(XXX) the following method will be 
called from the



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



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

2011-08-17 Thread timw
Author: timw
Date: Thu Aug 18 01:54:31 2011
New Revision: 1158991

URL: http://svn.apache.org/viewvc?rev=1158991&view=rev
Log:
Use the DLL handle to make the shared memory file name used by the ISAPI 
Redirector unique for each DLL - the redirector supports multiple instances per 
website, and without this multiple redirectors could access the same shared 
memory file, corrupting the contents (evident when LB workers are used on IIS 
7).

Modified:
tomcat/jk/trunk/native/iis/jk_isapi_plugin.c
tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml

Modified: tomcat/jk/trunk/native/iis/jk_isapi_plugin.c
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/native/iis/jk_isapi_plugin.c?rev=1158991&r1=1158990&r2=1158991&view=diff
==
--- tomcat/jk/trunk/native/iis/jk_isapi_plugin.c (original)
+++ tomcat/jk/trunk/native/iis/jk_isapi_plugin.c Thu Aug 18 01:54:31 2011
@@ -108,6 +108,9 @@ static char HTTP_QUERY_HEADER_NAME[MAX_P
 static char HTTP_WORKER_HEADER_NAME[MAX_PATH];
 static char HTTP_WORKER_HEADER_INDEX[MAX_PATH];
 
+/* DLL Handle - used to unique shared memory file */
+static char DLL_INSTANCE_ID[MAX_PATH];
+
 #define REGISTRY_LOCATION   ("Software\\Apache Software 
Foundation\\Jakarta Isapi Redirector\\1.0")
 #define W3SVC_REGISTRY_KEY  
("SYSTEM\\CurrentControlSet\\Services\\W3SVC\\Parameters")
 #define EXTENSION_URI_TAG   ("extension_uri")
@@ -2402,6 +2405,8 @@ BOOL WINAPI DllMain(HINSTANCE hInst,
 StringCbPrintf(HTTP_WORKER_HEADER_NAME, MAX_PATH, 
HTTP_HEADER_TEMPLATE, WORKER_HEADER_NAME_BASE, hInst);
 StringCbPrintf(HTTP_WORKER_HEADER_INDEX, MAX_PATH, 
HTTP_HEADER_TEMPLATE, WORKER_HEADER_INDEX_BASE, hInst);
 
+StringCbPrintf(DLL_INSTANCE_ID, MAX_PATH, "%p", hInst);
+
 JK_INIT_CS(&init_cs, rc);
 JK_INIT_CS(&log_cs, rc);
 
@@ -2601,6 +2606,9 @@ static int init_jk(char *serverName)
 
 jk_log(logger, JK_LOG_INFO, "Starting %s", (FULL_VERSION_STRING));
 
+StringCbCat(shm_name, MAX_PATH, "_");
+StringCbCat(shm_name, MAX_PATH, DLL_INSTANCE_ID);
+
 if (*serverName) {
 size_t i;
 StringCbCat(shm_name, MAX_PATH, "_");

Modified: tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml?rev=1158991&r1=1158990&r2=1158991&view=diff
==
--- tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml Thu Aug 18 01:54:31 2011
@@ -40,6 +40,19 @@
   new documentation project for JK was started.
   
 
+
+  
+  
+
+  
+IIS: Made the shared memory file name used by the ISAPI Redirector
+unique for each redirector DLL instance. Avoids issues caused by
+shared memory being corrupted by other redirectors on the same site.
+(timw)
+  
+
+  
+
 
   
   



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



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

2011-08-18 Thread timw
Author: timw
Date: Thu Aug 18 07:59:02 2011
New Revision: 1159071

URL: http://svn.apache.org/viewvc?rev=1159071&view=rev
Log:
Revert changes to SHM naming in ISAPI Redirector.

Modified:
tomcat/jk/trunk/native/iis/jk_isapi_plugin.c
tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml

Modified: tomcat/jk/trunk/native/iis/jk_isapi_plugin.c
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/native/iis/jk_isapi_plugin.c?rev=1159071&r1=1159070&r2=1159071&view=diff
==
--- tomcat/jk/trunk/native/iis/jk_isapi_plugin.c (original)
+++ tomcat/jk/trunk/native/iis/jk_isapi_plugin.c Thu Aug 18 07:59:02 2011
@@ -108,9 +108,6 @@ static char HTTP_QUERY_HEADER_NAME[MAX_P
 static char HTTP_WORKER_HEADER_NAME[MAX_PATH];
 static char HTTP_WORKER_HEADER_INDEX[MAX_PATH];
 
-/* DLL Handle - used to unique shared memory file */
-static char DLL_INSTANCE_ID[MAX_PATH];
-
 #define REGISTRY_LOCATION   ("Software\\Apache Software 
Foundation\\Jakarta Isapi Redirector\\1.0")
 #define W3SVC_REGISTRY_KEY  
("SYSTEM\\CurrentControlSet\\Services\\W3SVC\\Parameters")
 #define EXTENSION_URI_TAG   ("extension_uri")
@@ -2405,8 +2402,6 @@ BOOL WINAPI DllMain(HINSTANCE hInst,
 StringCbPrintf(HTTP_WORKER_HEADER_NAME, MAX_PATH, 
HTTP_HEADER_TEMPLATE, WORKER_HEADER_NAME_BASE, hInst);
 StringCbPrintf(HTTP_WORKER_HEADER_INDEX, MAX_PATH, 
HTTP_HEADER_TEMPLATE, WORKER_HEADER_INDEX_BASE, hInst);
 
-StringCbPrintf(DLL_INSTANCE_ID, MAX_PATH, "%p", hInst);
-
 JK_INIT_CS(&init_cs, rc);
 JK_INIT_CS(&log_cs, rc);
 
@@ -2606,9 +2601,6 @@ static int init_jk(char *serverName)
 
 jk_log(logger, JK_LOG_INFO, "Starting %s", (FULL_VERSION_STRING));
 
-StringCbCat(shm_name, MAX_PATH, "_");
-StringCbCat(shm_name, MAX_PATH, DLL_INSTANCE_ID);
-
 if (*serverName) {
 size_t i;
 StringCbCat(shm_name, MAX_PATH, "_");

Modified: tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml?rev=1159071&r1=1159070&r2=1159071&view=diff
==
--- tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml Thu Aug 18 07:59:02 2011
@@ -40,19 +40,6 @@
   new documentation project for JK was started.
   
 
-
-  
-  
-
-  
-IIS: Made the shared memory file name used by the ISAPI Redirector
-unique for each redirector DLL instance. Avoids issues caused by
-shared memory being corrupted by other redirectors on the same site.
-(timw)
-  
-
-  
-
 
   
   



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



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

2011-10-25 Thread timw
Author: timw
Date: Tue Oct 25 19:18:21 2011
New Revision: 1188865

URL: http://svn.apache.org/viewvc?rev=1188865&view=rev
Log:
Fixing mod_jk build on Windows with strict C style variable declarations.

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

Modified: tomcat/jk/trunk/native/apache-2.0/mod_jk.c
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/native/apache-2.0/mod_jk.c?rev=1188865&r1=1188864&r2=1188865&view=diff
==
--- tomcat/jk/trunk/native/apache-2.0/mod_jk.c (original)
+++ tomcat/jk/trunk/native/apache-2.0/mod_jk.c Tue Oct 25 19:18:21 2011
@@ -246,11 +246,13 @@ typedef struct
 /*
  * Request specific configuration
  */
-typedef struct
+struct jk_request_conf
 {
 rule_extension_t *rule_extensions;
 int jk_handled;
-} jk_request_conf_t;
+};
+
+typedef struct jk_request_conf jk_request_conf_t;
 
 struct apache_private_data
 {
@@ -750,6 +752,7 @@ static int init_ws_service(apache_privat
 const char *stateless = NULL;
 const char *route = NULL;
 rule_extension_t *e;
+jk_request_conf_t *rconf;
 
 /* Copy in function pointers (which are really methods) */
 s->start_response = ws_start_response;
@@ -792,8 +795,8 @@ static int init_ws_service(apache_privat
 if (conf->options & JK_OPT_FLUSHEADER)
 s->flush_header = 1;
 
-jk_request_conf_t *rconf = (jk_request_conf_t 
*)ap_get_module_config(r->request_config,
- 
&jk_module);
+rconf = (jk_request_conf_t *)ap_get_module_config(r->request_config, 
&jk_module);
+
 e = rconf->rule_extensions;
 if (e) {
 s->extension.reply_timeout = e->reply_timeout;



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r907390 - in /tomcat/site/trunk: docs/whoweare.html xdocs/whoweare.xml

2010-02-06 Thread timw
Author: timw
Date: Sun Feb  7 07:33:25 2010
New Revision: 907390

URL: http://svn.apache.org/viewvc?rev=907390&view=rev
Log:
Adding timw to committers list.

Modified:
tomcat/site/trunk/docs/whoweare.html
tomcat/site/trunk/xdocs/whoweare.xml

Modified: tomcat/site/trunk/docs/whoweare.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/whoweare.html?rev=907390&r1=907389&r2=907390&view=diff
==
--- tomcat/site/trunk/docs/whoweare.html (original)
+++ tomcat/site/trunk/docs/whoweare.html Sun Feb  7 07:33:25 2010
@@ -335,6 +335,11 @@
 
 
 
+
+Tim Whittington (timw at apache.org)
+
+
+
 
 
 

Modified: tomcat/site/trunk/xdocs/whoweare.xml
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/whoweare.xml?rev=907390&r1=907389&r2=907390&view=diff
==
--- tomcat/site/trunk/xdocs/whoweare.xml (original)
+++ tomcat/site/trunk/xdocs/whoweare.xml Sun Feb  7 07:33:25 2010
@@ -100,6 +100,9 @@
 Keith Wannamaker (keith at apache.org)
 
 
+Tim Whittington (timw at apache.org)
+
+
 
 
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r907560 - /tomcat/jk/trunk/native/common/jk_connect.c

2010-02-07 Thread timw
Author: timw
Date: Mon Feb  8 06:57:03 2010
New Revision: 907560

URL: http://svn.apache.org/viewvc?rev=907560&view=rev
Log:
Defining SHUT_RD on platforms that don't have it (i.e. Windows uses SD_RECEIVE).
r893452 started using this, which broke the build on Windows.

Modified:
tomcat/jk/trunk/native/common/jk_connect.c

Modified: tomcat/jk/trunk/native/common/jk_connect.c
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/native/common/jk_connect.c?rev=907560&r1=907559&r2=907560&view=diff
==
--- tomcat/jk/trunk/native/common/jk_connect.c (original)
+++ tomcat/jk/trunk/native/common/jk_connect.c Mon Feb  8 06:57:03 2010
@@ -671,6 +671,7 @@
 #define MAX_SECS_TO_LINGER 30
 #endif
 #define SECONDS_TO_LINGER  2
+
 #ifndef SHUT_WR
 #ifdef SD_SEND
 #define SHUT_WR SD_SEND
@@ -679,6 +680,14 @@
 #endif
 #endif
 
+#ifndef SHUT_RD
+#ifdef SD_RECEIVE
+#define SHUT_RD SD_RECEIVE
+#else
+#define SHUT_RD 0x00
+#endif
+#endif
+
 /** Drain and close the socket
  * @param sdsocket to close
  * @param l logger



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r920086 - in /tomcat/jk/trunk/native/apache-2.0: Makefile.vc mod_jk.rc

2010-03-07 Thread timw
Author: timw
Date: Sun Mar  7 20:17:04 2010
New Revision: 920086

URL: http://svn.apache.org/viewvc?rev=920086&view=rev
Log:
Adding version resource for mod_jk.so on Windows.
Partial fix for #43303

Added:
tomcat/jk/trunk/native/apache-2.0/mod_jk.rc
Modified:
tomcat/jk/trunk/native/apache-2.0/Makefile.vc

Modified: tomcat/jk/trunk/native/apache-2.0/Makefile.vc
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/native/apache-2.0/Makefile.vc?rev=920086&r1=920085&r2=920086&view=diff
==
--- tomcat/jk/trunk/native/apache-2.0/Makefile.vc (original)
+++ tomcat/jk/trunk/native/apache-2.0/Makefile.vc Sun Mar  7 20:17:04 2010
@@ -26,6 +26,7 @@
 
 
 CLEAN :
+   -...@erase "$(INTDIR)\mod_jk.res"
-...@erase "$(INTDIR)\jk_ajp12_worker.obj"
-...@erase "$(INTDIR)\jk_ajp13.obj"
-...@erase "$(INTDIR)\jk_ajp13_worker.obj"
@@ -86,6 +87,7 @@
"$(INTDIR)\jk_url.obj" \
"$(INTDIR)\jk_util.obj" \
"$(INTDIR)\jk_worker.obj" \
+   "$(INTDIR)\mod_jk.res" \
"$(INTDIR)\mod_jk.obj"
 
 "$(OUTDIR)\mod_jk.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
@@ -125,7 +127,14 @@
$(CPP_PROJ) $< 
 <<
 
-MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
+MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32
+RSC_PROJ=/l 0x809 /fo"$(INTDIR)\mod_jk.res" /d "NDEBUG"
+
+SOURCE=.\mod_jk.rc
+
+"$(INTDIR)\mod_jk.res" : $(SOURCE) "$(INTDIR)"
+   $(RSC) $(RSC_PROJ) $(SOURCE)
+
 
 SOURCE=..\common\jk_ajp12_worker.c
 

Added: tomcat/jk/trunk/native/apache-2.0/mod_jk.rc
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/native/apache-2.0/mod_jk.rc?rev=920086&view=auto
==
--- tomcat/jk/trunk/native/apache-2.0/mod_jk.rc (added)
+++ tomcat/jk/trunk/native/apache-2.0/mod_jk.rc Sun Mar  7 20:17:04 2010
@@ -0,0 +1,97 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/
+// English (New Zealand) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENZ)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_NZ
+#pragma code_page(1252)
+#endif //_WIN32
+
+/
+//
+// Version
+//
+
+1 VERSIONINFO
+ FILEVERSION 1,2,31,0
+ PRODUCTVERSION 1,2,31,0
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x40004L
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+BLOCK "StringFileInfo"
+BEGIN
+BLOCK "040904b0"
+BEGIN
+VALUE "Comments", "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\nhttp://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by 
applicable law or agreed to in writing, software distributed under the License 
is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
KIND, either express or implied.  See the License for the specific language 
governing permissions and limitations under the License."
+VALUE "CompanyName", "Apache Software Foundation"
+VALUE "FileDescription", "Apache Tomcat Connector for Apache 2.x"
+VALUE "FileVersion", "1.2.31"
+VALUE "InternalName", "mod_jk-1.2.31"
+VALUE "LegalCopyright", "Licensed to the Apache Software 
Foundation (ASF) under one or more contributor license agreements.  See the 
NOTICE file distributed with this work for additional information regarding 
copyright ownership."
+VALUE "OriginalFilename", "mod_jk-1.2.31.so"
+VALUE "ProductName", "Apache Tomcat Connectors project"
+VALUE "ProductVersion", "1.2.31"
+END
+END
+BLOCK "VarFileInfo"
+BEGIN
+VALUE "Translation", 0x409, 1200
+END
+END
+
+
+#ifdef APSTUDIO_INVOKED
+/
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE 
+BEGIN
+"resou

svn commit: r920087 - /tomcat/jk/trunk/HOWTO-RELEASE.txt

2010-03-07 Thread timw
Author: timw
Date: Sun Mar  7 20:20:03 2010
New Revision: 920087

URL: http://svn.apache.org/viewvc?rev=920087&view=rev
Log:
Adding mod_jk.rc to list of files needing version number updates on release.

Modified:
tomcat/jk/trunk/HOWTO-RELEASE.txt

Modified: tomcat/jk/trunk/HOWTO-RELEASE.txt
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/HOWTO-RELEASE.txt?rev=920087&r1=920086&r2=920087&view=diff
==
--- tomcat/jk/trunk/HOWTO-RELEASE.txt (original)
+++ tomcat/jk/trunk/HOWTO-RELEASE.txt Sun Mar  7 20:20:03 2010
@@ -137,6 +137,7 @@
 native/common/jk_version.h: Update variables JK_VERMAJOR, JK_VERMINOR, 
JK_VERFIX,
 JK_VERSTRING, and JK_VERISRELEASE.
 native/common/portable.h.sample: Update VERSION define.
+native/apache-2.0/mod_jk.rc: Update JK_VERSION_STR, FILEVERSION, and 
PRODUCTVERSION
 native/iis/isapi_redirect.rc: Update JK_VERSION_STR, FILEVERSION, and 
PRODUCTVERSION
 native/iis/installer/isapi-redirector-win32-msi.ism: Update ProductVersion.
 xdocs/miscellaneous/changelog.xml: Start a new section for the new version.



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r920093 - in /tomcat/jk/trunk: native/iis/jk_isapi_plugin.c xdocs/reference/iis.xml

2010-03-07 Thread timw
Author: timw
Date: Sun Mar  7 20:31:45 2010
New Revision: 920093

URL: http://svn.apache.org/viewvc?rev=920093&view=rev
Log:
Adding basic log rotation functionality to the ISAPI redirector - #48501
Config and functionality is modeled after the Apache HTTPD rotatelogs program 
for consistency.

Modified:
tomcat/jk/trunk/native/iis/jk_isapi_plugin.c
tomcat/jk/trunk/xdocs/reference/iis.xml

Modified: tomcat/jk/trunk/native/iis/jk_isapi_plugin.c
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/native/iis/jk_isapi_plugin.c?rev=920093&r1=920092&r2=920093&view=diff
==
--- tomcat/jk/trunk/native/iis/jk_isapi_plugin.c (original)
+++ tomcat/jk/trunk/native/iis/jk_isapi_plugin.c Sun Mar  7 20:31:45 2010
@@ -128,6 +128,9 @@
 #define ENABLE_CHUNKED_ENCODING_TAG ("enable_chunked_encoding")
 #define ERROR_PAGE_TAG  ("error_page")
 
+#define LOG_ROTATION_TIME_TAG   ("log_rotationtime")
+#define LOG_FILESIZE_TAG("log_filesize")
+
 /* HTTP standard headers */
 #define TRANSFER_ENCODING_CHUNKED_HEADER_COMPLETE ("Transfer-Encoding: 
chunked")
 #define TRANSFER_ENCODING_CHUNKED_HEADER_COMPLETE_LEN (26)
@@ -479,6 +482,7 @@
 static jk_map_t *jk_environment_map = NULL;
 
 static jk_logger_t *logger = NULL;
+static JK_CRIT_SEC log_cs;
 static char *SERVER_NAME = "SERVER_NAME";
 static char *SERVER_SOFTWARE = "SERVER_SOFTWARE";
 static char *INSTANCE_ID = "INSTANCE_ID";
@@ -487,7 +491,12 @@
 static char extension_uri[INTERNET_MAX_URL_LENGTH] =
 "/jakarta/isapi_redirect.dll";
 static char log_file[MAX_PATH * 2];
+static char log_file_effective[MAX_PATH * 2];
 static int  log_level = JK_LOG_DEF_LEVEL;
+static long log_rotationtime = 0;
+static time_t log_next_rotate_time = 0;
+static ULONGLONG log_filesize = 0;
+
 static char worker_file[MAX_PATH * 2];
 static char worker_mount_file[MAX_PATH * 2] = {0};
 static int  worker_mount_reload = JK_URIMAP_DEF_RELOAD;
@@ -557,6 +566,10 @@
 
 static int init_jk(char *serverName);
 
+
+static int JK_METHOD iis_log_to_file(jk_logger_t *l, int level,
+int used, char *what);
+
 static BOOL initialize_extension(void);
 
 static int read_registry_init_data(void);
@@ -2273,9 +2286,11 @@
 }
 wc_close(logger);
 jk_shm_close();
+JK_ENTER_CS(&(log_cs), rc);
 if (logger) {
 jk_close_file_logger(&logger);
 }
+JK_LEAVE_CS(&(log_cs), rc);
 }
 JK_LEAVE_CS(&(init_cs), rc);
 
@@ -2335,6 +2350,7 @@
 StringCbPrintf(HTTP_WORKER_HEADER_INDEX, MAX_PATH, 
HTTP_HEADER_TEMPLATE, WORKER_HEADER_INDEX_BASE, hInst);
 
 JK_INIT_CS(&init_cs, rc);
+JK_INIT_CS(&log_cs, rc);
 
 break;
 case DLL_PROCESS_DETACH:
@@ -2344,6 +2360,7 @@
 __except(1) {
 }
 JK_DELETE_CS(&init_cs, rc);
+JK_DELETE_CS(&log_cs, rc);
 break;
 
 default:
@@ -2387,17 +2404,147 @@
 return 0;
 }
 
+/*
+ * Reinitializes the logger, formatting the log file name if rotation is 
enabled,
+ * and calculating the next rotation time if applicable.
+ */
+static int init_logger(int rotate, jk_logger_t **l)
+{
+int rc = JK_TRUE;
+int log_open = rotate;  /* log is assumed open if a rotate is requested */
+char *log_file_name;
+char log_file_name_buf[MAX_PATH*2];
+
+/* If log rotation is enabled, format the log filename */
+if ((log_rotationtime > 0) || (log_filesize > 0)) {
+time_t t;
+t = time(NULL);
+
+if (log_rotationtime > 0) {
+/* Align time to rotationtime intervals */
+t = (t / log_rotationtime) * log_rotationtime;
+
+/* Calculate rotate time */
+log_next_rotate_time = t + log_rotationtime;
+}
+
+log_file_name = log_file_name_buf;
+if (strchr(log_file, '%')) {
+struct tm *tm_now;
+
+/* If there are %s in the log file name, treat it as a sprintf 
format */
+tm_now = localtime(&t);
+strftime(log_file_name, sizeof(log_file_name_buf), log_file, 
tm_now);
+} else {
+/* Otherwise append the number of seconds to the base name */  
  
+sprintf_s(log_file_name, sizeof(log_file_name_buf), "%s.%d", 
log_file, (long)t);
+}
+} else {
+log_file_name = log_file;
+}
+
+/* Close the current log file if required, and the effective log file name 
has changed */
+if (log_open && strncmp(log_file_name, log_file_effective, 
strlen(log_file_name)) != 0) {
+FILE* lf = ((jk_file_logger_t* )logger->logger_private)->logfile;
+fprintf_s(lf, "Log rotated to %s\r\n", log_file_name);
+fflush(lf);
+
+rc = jk_close_f

svn commit: r920111 - /tomcat/jk/trunk/native/STATUS.txt

2010-03-07 Thread timw
Author: timw
Date: Sun Mar  7 20:56:04 2010
New Revision: 920111

URL: http://svn.apache.org/viewvc?rev=920111&view=rev
Log:
Updating status with 1.2.29/30/31 details.

Modified:
tomcat/jk/trunk/native/STATUS.txt

Modified: tomcat/jk/trunk/native/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/native/STATUS.txt?rev=920111&r1=920110&r2=920111&view=diff
==
--- tomcat/jk/trunk/native/STATUS.txt (original)
+++ tomcat/jk/trunk/native/STATUS.txt Sun Mar  7 20:56:04 2010
@@ -18,7 +18,9 @@
 
 Release:
 
-1.2.29  : in development
+1.2.31  : in development
+1.2.30  : released March 1, 2010
+1.2.29  : released February 26, 2010, withdrawn February 27, 2010
 1.2.28  : released March 22, 2009
 1.2.27  : released October 28, 2008
 1.2.26  : released December 21, 2007



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r920112 - /tomcat/jk/trunk/native/TODO.txt

2010-03-07 Thread timw
Author: timw
Date: Sun Mar  7 20:57:35 2010
New Revision: 920112

URL: http://svn.apache.org/viewvc?rev=920112&view=rev
Log:
Updating todos

Modified:
tomcat/jk/trunk/native/TODO.txt

Modified: tomcat/jk/trunk/native/TODO.txt
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/native/TODO.txt?rev=920112&r1=920111&r2=920112&view=diff
==
--- tomcat/jk/trunk/native/TODO.txt (original)
+++ tomcat/jk/trunk/native/TODO.txt Sun Mar  7 20:57:35 2010
@@ -86,7 +86,7 @@
 
 a) Allow logging of request url or uuid in jk log to ease matching with access 
log.
 
-b) Implement log rotation for IIS.
+b) Implement log rotation for IIS. (done in 1.2.31)
 
 c) Allow adding of log notes for IIS like we do with Apache.
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r920119 - /tomcat/jk/trunk/native/iis/jk_isapi_plugin.c

2010-03-07 Thread timw
Author: timw
Date: Sun Mar  7 21:23:01 2010
New Revision: 920119

URL: http://svn.apache.org/viewvc?rev=920119&view=rev
Log:
Fix #38895 - use ALL_RAW to obtain HTTP headers by default, instead of 
ALL_HTTP, which obtains CGI style headers (and does lowercase and '_' -> '-' 
conversions on header names).
Old behaviour is available by defining USE_CGI_HEADERS.

Modified:
tomcat/jk/trunk/native/iis/jk_isapi_plugin.c

Modified: tomcat/jk/trunk/native/iis/jk_isapi_plugin.c
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/native/iis/jk_isapi_plugin.c?rev=920119&r1=920118&r2=920119&view=diff
==
--- tomcat/jk/trunk/native/iis/jk_isapi_plugin.c (original)
+++ tomcat/jk/trunk/native/iis/jk_isapi_plugin.c Sun Mar  7 21:23:01 2010
@@ -75,7 +75,7 @@
 #define WORKER_HEADER_NAME_BASE   ("TOMCATWORKER")
 #define WORKER_HEADER_INDEX_BASE  ("TOMCATWORKERIDX")
 #define TOMCAT_TRANSLATE_HEADER_NAME_BASE ("TOMCATTRANSLATE")
-#ifdef USE_RAW_HEADERS
+#ifndef USE_CGI_HEADERS
 #define CONTENT_LENGTH("CONTENT-LENGTH:")
 #else
 #define CONTENT_LENGTH("CONTENT_LENGTH:")
@@ -83,7 +83,7 @@
 
 /* The HTTP_ form of the header for use in ExtensionProc */
 #define HTTP_HEADER_PREFIX   "HTTP_"
-#ifndef USE_RAW_HEADERS
+#ifdef USE_CGI_HEADERS
 #define HTTP_HEADER_PREFIX_LEN   5
 #endif
 
@@ -436,7 +436,7 @@
 
 
 #define STRNULL_FOR_NULL(x) ((x) ? (x) : "(null)")
-#ifndef USE_RAW_HEADERS
+#ifdef USE_CGI_HEADERS
 #define JK_TOLOWER(x)   ((char)tolower((BYTE)(x)))
 #endif
 
@@ -3127,7 +3127,7 @@
 
 huge_buf_sz = MAX_PACKET_SIZE;
 if (get_server_value(private_data->lpEcb,
-#ifdef USE_RAW_HEADERS
+#ifndef USE_CGI_HEADERS
  "ALL_RAW", huge_buf, huge_buf_sz)) {
 #else
  "ALL_HTTP", huge_buf, huge_buf_sz)) {
@@ -3171,7 +3171,7 @@
 for (i = 0, tmp = headers_buf; *tmp && i < cnt;) {
 int real_header = JK_TRUE;
 
-#ifndef USE_RAW_HEADERS
+#ifdef USE_CGI_HEADERS
 /* Skip the HTTP_ prefix to the beginning of the header name */
 tmp += HTTP_HEADER_PREFIX_LEN;
 #endif
@@ -3218,7 +3218,7 @@
 }
 
 while (':' != *tmp && *tmp) {
-#ifndef USE_RAW_HEADERS
+#ifdef USE_CGI_HEADERS
 if (real_header) {
 if ('_' == *tmp) {
 *tmp = '-';



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



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

2010-03-07 Thread timw
Author: timw
Date: Sun Mar  7 21:26:58 2010
New Revision: 920121

URL: http://svn.apache.org/viewvc?rev=920121&view=rev
Log:
Updating changelog with recent commits.

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

Modified: tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml?rev=920121&r1=920120&r2=920121&view=diff
==
--- tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml Sun Mar  7 21:26:58 2010
@@ -26,6 +26,7 @@
 Mladen Turk
 Rainer Jung
 Henri Gomez
+Tim Whittington
 Changelog
   
 
@@ -39,6 +40,24 @@
   new documentation project for JK was started.
   
 
+
+  
+  
+
+  
+Apache: Added version number resource for mod_jk.so on Windows. (timw)
+  
+  
+IIS: Added rotatelogs style log rotation to ISAPI Redirector. (timw)
+  
+  
+38895: IIS: Use RAW headers instead of CGI headers by 
default
+   to prevent conversion of underscores '_' to hyphens '-' in 
header names.
+   Old behaviour can be enabled by defining USE_CGI_HEADERS. (timw)
+  
+
+  
+
 
   
   



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r920223 - /tomcat/jk/trunk/HOWTO-RELEASE.txt

2010-03-07 Thread timw
Author: timw
Date: Mon Mar  8 07:54:26 2010
New Revision: 920223

URL: http://svn.apache.org/viewvc?rev=920223&view=rev
Log:
Removing .rc files from list of files to modify on release (these now get 
version info from jk_version.h)

Modified:
tomcat/jk/trunk/HOWTO-RELEASE.txt

Modified: tomcat/jk/trunk/HOWTO-RELEASE.txt
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/HOWTO-RELEASE.txt?rev=920223&r1=920222&r2=920223&view=diff
==
--- tomcat/jk/trunk/HOWTO-RELEASE.txt (original)
+++ tomcat/jk/trunk/HOWTO-RELEASE.txt Mon Mar  8 07:54:26 2010
@@ -137,8 +137,6 @@
 native/common/jk_version.h: Update variables JK_VERMAJOR, JK_VERMINOR, 
JK_VERFIX,
 JK_VERSTRING, and JK_VERISRELEASE.
 native/common/portable.h.sample: Update VERSION define.
-native/apache-2.0/mod_jk.rc: Update JK_VERSION_STR, FILEVERSION, and 
PRODUCTVERSION
-native/iis/isapi_redirect.rc: Update JK_VERSION_STR, FILEVERSION, and 
PRODUCTVERSION
 native/iis/installer/isapi-redirector-win32-msi.ism: Update ProductVersion.
 xdocs/miscellaneous/changelog.xml: Start a new section for the new version.
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r920225 - /tomcat/jk/trunk/native/iis/jk_isapi_plugin.c

2010-03-08 Thread timw
Author: timw
Date: Mon Mar  8 08:08:46 2010
New Revision: 920225

URL: http://svn.apache.org/viewvc?rev=920225&view=rev
Log:
Fixing VC6 build by replacing uses of strcpy_s with StringCbCopy.

Modified:
tomcat/jk/trunk/native/iis/jk_isapi_plugin.c

Modified: tomcat/jk/trunk/native/iis/jk_isapi_plugin.c
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/native/iis/jk_isapi_plugin.c?rev=920225&r1=920224&r2=920225&view=diff
==
--- tomcat/jk/trunk/native/iis/jk_isapi_plugin.c (original)
+++ tomcat/jk/trunk/native/iis/jk_isapi_plugin.c Mon Mar  8 08:08:46 2010
@@ -2458,7 +2458,7 @@
 logger->log = iis_log_to_file;
 
 /* Remember the current log file name for the next potential 
rotate */
-strcpy_s(log_file_effective, sizeof(log_file_effective), 
log_file_name);
+StringCbCopy(log_file_effective, sizeof(log_file_effective), 
log_file_name);
 rc = JK_TRUE;
 } else {
 logger = NULL;



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



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

2010-03-09 Thread timw
Author: timw
Date: Tue Mar  9 20:50:37 2010
New Revision: 921118

URL: http://svn.apache.org/viewvc?rev=921118&view=rev
Log:
Fixing build on Visual Studio 2008 - ordering of mstcpip.h and ws2tcpip.h 
includes is important.

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

Modified: tomcat/jk/trunk/native/common/jk_global.h
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/native/common/jk_global.h?rev=921118&r1=921117&r2=921118&view=diff
==
--- tomcat/jk/trunk/native/common/jk_global.h (original)
+++ tomcat/jk/trunk/native/common/jk_global.h Tue Mar  9 20:50:37 2010
@@ -116,8 +116,8 @@ extern char *strdup(const char *str);
  */
 #include 
 #include 
-#include 
 #include 
+#include 
 #endif /* _WINDOWS_ */
 #ifdef _WINDOWS_
 #ifndef SIO_RCVALL



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r921121 - /tomcat/jk/trunk/native/iis/jk_isapi_plugin.c

2010-03-09 Thread timw
Author: timw
Date: Tue Mar  9 20:52:27 2010
New Revision: 921121

URL: http://svn.apache.org/viewvc?rev=921121&view=rev
Log:
Reverting http://svn.apache.org/viewvc?rev=920281&view=rev to avoid infinite 
recursion on log rotation.

Modified:
tomcat/jk/trunk/native/iis/jk_isapi_plugin.c

Modified: tomcat/jk/trunk/native/iis/jk_isapi_plugin.c
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/native/iis/jk_isapi_plugin.c?rev=921121&r1=921120&r2=921121&view=diff
==
--- tomcat/jk/trunk/native/iis/jk_isapi_plugin.c (original)
+++ tomcat/jk/trunk/native/iis/jk_isapi_plugin.c Tue Mar  9 20:52:27 2010
@@ -2445,7 +2445,9 @@ static int init_logger(int rotate, jk_lo
 
 /* Close the current log file if required, and the effective log file name 
has changed */
 if (log_open && strncmp(log_file_name, log_file_effective, 
strlen(log_file_name)) != 0) {
-jk_log(logger, JK_LOG_INFO, "Log rotated to %s", log_file_name);
+FILE* lf = ((jk_file_logger_t* )logger->logger_private)->logfile;
+fprintf(lf, "Log rotated to %s\r\n", log_file_name);
+fflush(lf);
 rc = jk_close_file_logger(&logger);
 log_open = JK_FALSE;
 }



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



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

2010-09-21 Thread timw
Author: timw
Date: Tue Sep 21 11:05:44 2010
New Revision: 999308

URL: http://svn.apache.org/viewvc?rev=999308&view=rev
Log:
Fix #49511 - track when we map a request into the ISAPI Redirector during 
filter notification, and only correct the IIS log information for individual 
requests within a multi-request session/connection that were actually mapped.

Modified:
tomcat/jk/trunk/native/iis/jk_isapi_plugin.c
tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml

Modified: tomcat/jk/trunk/native/iis/jk_isapi_plugin.c
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/native/iis/jk_isapi_plugin.c?rev=999308&r1=999307&r2=999308&view=diff
==
--- tomcat/jk/trunk/native/iis/jk_isapi_plugin.c (original)
+++ tomcat/jk/trunk/native/iis/jk_isapi_plugin.c Tue Sep 21 11:05:44 2010
@@ -536,6 +536,8 @@ typedef struct isapi_log_data_t isapi_lo
 struct isapi_log_data_t {
 char uri[INTERNET_MAX_URL_LENGTH];
 char query[INTERNET_MAX_URL_LENGTH];
+int request_matched;/* Whether this request (within a 
multi-request connection)
+   was handled and needs the log values 
adjusted */
 };
 
 typedef struct iis_info_t iis_info_t;
@@ -1856,6 +1858,12 @@ DWORD WINAPI HttpFilterProc(PHTTP_FILTER
 SetHeader(pfc, WORKER_HEADER_INDEX, NULL);
 SetHeader(pfc, TOMCAT_TRANSLATE_HEADER_NAME, NULL);
 
+// Suppress logging of original uri/query when we don't map a URL
+if (pfc->pFilterContext) {
+isapi_log_data_t *ld = (isapi_log_data_t *)pfc->pFilterContext;
+ld->request_matched = JK_FALSE;
+}
+
 if (!GetHeader(pfc, "url", (LPVOID) uri, (LPDWORD) & sz)) {
 jk_log(logger, JK_LOG_ERROR,
"error while getting the url");
@@ -2055,12 +2063,14 @@ DWORD WINAPI HttpFilterProc(PHTTP_FILTER
 memset(ld, 0, sizeof(isapi_log_data_t));
 StringCbCopy(ld->uri, INTERNET_MAX_URL_LENGTH, forwardURI);
 StringCbCopy(ld->query, INTERNET_MAX_URL_LENGTH, squery);
+ld->request_matched = JK_TRUE;
 pfc->pFilterContext = ld;
 } else {
 isapi_log_data_t *ld = (isapi_log_data_t 
*)pfc->pFilterContext;
 memset(ld, 0, sizeof(isapi_log_data_t));
 StringCbCopy(ld->uri, INTERNET_MAX_URL_LENGTH, forwardURI);
 StringCbCopy(ld->query, INTERNET_MAX_URL_LENGTH, squery);
+ld->request_matched = JK_TRUE;
 }
 }
 else {
@@ -2084,9 +2094,11 @@ DWORD WINAPI HttpFilterProc(PHTTP_FILTER
 else if (dwNotificationType == SF_NOTIFY_LOG) {
 if (pfc->pFilterContext) {
 isapi_log_data_t *ld = (isapi_log_data_t *)pfc->pFilterContext;
-HTTP_FILTER_LOG  *pl = (HTTP_FILTER_LOG *)pvNotification;
-pl->pszTarget = ld->uri;
-pl->pszParameters = ld->query;
+if (ld->request_matched) {
+HTTP_FILTER_LOG  *pl = (HTTP_FILTER_LOG *)pvNotification;
+pl->pszTarget = ld->uri;
+pl->pszParameters = ld->query;
+}
 }
 }
 return SF_STATUS_REQ_NEXT_NOTIFICATION;

Modified: tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml?rev=999308&r1=999307&r2=999308&view=diff
==
--- tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml Tue Sep 21 11:05:44 2010
@@ -60,6 +60,10 @@
 Old behaviour can be enabled by defining USE_CGI_HEADERS. (timw)
   
   
+   49511: IIS: Do not override IIS log information when 
subsequent
+   requests on a keep-alive connection are not mapped into the 
ISAPI Redirector. (timw)
+  
+  
 Docs: Document SSLOptions needed for SSL information forwarding. 
(rjung)
   
   



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1000391 - /tomcat/trunk/build.xml

2010-09-23 Thread timw
Author: timw
Date: Thu Sep 23 10:14:54 2010
New Revision: 1000391

URL: http://svn.apache.org/viewvc?rev=1000391&view=rev
Log:
Adding a description for build-docs task

Modified:
tomcat/trunk/build.xml

Modified: tomcat/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/build.xml?rev=1000391&r1=1000390&r2=1000391&view=diff
==
--- tomcat/trunk/build.xml (original)
+++ tomcat/trunk/build.xml Thu Sep 23 10:14:54 2010
@@ -599,7 +599,7 @@
 
   
 
-  
+  
 
 
   



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1000392 - in /tomcat/trunk: Start Tomcat.launch Stop Tomcat.launch webapps/docs/building.xml webapps/docs/changelog.xml

2010-09-23 Thread timw
Author: timw
Date: Thu Sep 23 10:15:16 2010
New Revision: 1000392

URL: http://svn.apache.org/viewvc?rev=1000392&view=rev
Log:
https://issues.apache.org/bugzilla/show_bug.cgi?id=49955

Improvements and corrections for the Building Tomcat guide, plus
sample Eclipse launch targets.

Based on contribution from Wesley Acheson.

Added:
tomcat/trunk/Start Tomcat.launch
tomcat/trunk/Stop Tomcat.launch
Modified:
tomcat/trunk/webapps/docs/building.xml
tomcat/trunk/webapps/docs/changelog.xml

Added: tomcat/trunk/Start Tomcat.launch
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/Start%20Tomcat.launch?rev=1000392&view=auto
==
--- tomcat/trunk/Start Tomcat.launch (added)
+++ tomcat/trunk/Start Tomcat.launch Thu Sep 23 10:15:16 2010
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+

Added: tomcat/trunk/Stop Tomcat.launch
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/Stop%20Tomcat.launch?rev=1000392&view=auto
==
--- tomcat/trunk/Stop Tomcat.launch (added)
+++ tomcat/trunk/Stop Tomcat.launch Thu Sep 23 10:15:16 2010
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+

Modified: tomcat/trunk/webapps/docs/building.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/building.xml?rev=1000392&r1=1000391&r2=1000392&view=diff
==
--- tomcat/trunk/webapps/docs/building.xml (original)
+++ tomcat/trunk/webapps/docs/building.xml Thu Sep 23 10:15:16 2010
@@ -23,7 +23,7 @@
 &project;
 
 
-  Remy Maucherat
+  Remy Maucherat, Tim Whittington
   Building Tomcat
 
 
@@ -36,16 +36,17 @@
 
 
 
-Building Apache Tomcat from SVN is very easy, and is the first step to 
contributing to
-Tomcat. The following is a step by step TODO list.
+Building Apache Tomcat from source is very easy, and is the first step to 
contributing to
+Tomcat. The following is a step by step guide.
 
 
 
 
-
+
 
 
-The Sun JDK can be downloaded
+Tomcat requires a JDK (version 1.6 or later) to be installed.
+The Sun JDK can be downloaded
 http://www.oracle.com/technetwork/java/javase/downloads/index.html";>here.
 
 
@@ -66,15 +67,15 @@ Download a binary distribution of Ant 1.
 
 Unpack the binary distribution into a convenient location so that the
 Ant release resides in its own directory (conventionally named
-"apache-ant-1.8.x").  For the purposes of the remainder of this document,
-the symbolic name "${ant.home}" is used to refer to the full pathname of
- the release directory.
+apache-ant-1.8.x).  For the remainder of this guide,
+the symbolic name ${ant.home} is used to refer to the full 
pathname of
+ the Ant installation directory directory.
 
 
 
-Create an ANT_HOME environment variable to point the directory ${ant.home}, 
+IMPORTANT: Create an ANT_HOME environment variable to point the 
directory ${ant.home}, 
 and modify the PATH environment variable to include directory
-"${ant.home}/bin" in its list.  This makes the "ant" command line script
+${ant.home}/bin in its list.  This makes the ant 
command line script
 available, which will be used to actually perform the build.
 
 
@@ -83,29 +84,27 @@ available, which will be used to actuall
 
 
   
-  Tomcat SVN repository URL:
-  http://svn.apache.org/repos/asf/tomcat/tc7.0.x/
+  Tomcat SVN repository URL: 
+  http://svn.apache.org/repos/asf/tomcat/trunk/";>http://svn.apache.org/repos/asf/tomcat/trunk/
   
-  
   
-  Download a source package from:
-  http://tomcat.apache.org/download-70.cgi
+  Tomcat source packages: 
+  http://tomcat.apache.org/download-70.cgi";>http://tomcat.apache.org/download-70.cgi.
   
-  
+
   
-  Checkout the source using SVN, selecting the desired version or
-  branch (current development source is at 
-  http://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk/), or 
-  unpack the source package. The location where the source has been
-  placed will be referred as ${tomcat.source}.
+  Checkout the source using SVN, or download and unpack a source package. 
+  For the remainder of this guide, the symbolic name 
${tomcat.source} is used to refer to the 
+  location where the source has been placed.
   
-
+ 
 
 
 
 
 
-Use the following commands:
+Use the following commands to build Tomcat:
+
 
 cd ${tomcat.source}
 ant
@@ -113,13 +112,13 @@ Use the following commands:
 
 
 
-NOTE: Users accessing the Internet through a proxy must use a properties
-  file to indicate to Ant the proxy configuration. Read below.
+NOTE: Users accessing the Internet through a proxy must use a properties
+  file to indicate to Ant the proxy configuration. Read below for details.
 
 
 
-WARNING: Running this command will download binaries to the 
-  /usr/share/java directory. 
+WARNING: Running this command will download binary binaries to the 
+  /usr/

svn commit: r1000400 - in /tomcat/trunk/java/org/apache/coyote/ajp: AjpAprProcessor.java AjpProcessor.java Constants.java

2010-09-23 Thread timw
Author: timw
Date: Thu Sep 23 10:38:56 2010
New Revision: 1000400

URL: http://svn.apache.org/viewvc?rev=1000400&view=rev
Log:
https://issues.apache.org/bugzilla/show_bug.cgi?id=49102

Protecting AJP code -> header/method lookup arrays with getters.
No measurable slowdown (especially after a profiling JIT gets done with it).

Modified:
tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java
tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java
tomcat/trunk/java/org/apache/coyote/ajp/Constants.java

Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java?rev=1000400&r1=1000399&r2=1000400&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java Thu Sep 23 
10:38:56 2010
@@ -713,7 +713,7 @@ public class AjpAprProcessor implements 
 // Translate the HTTP method code to a String.
 byte methodCode = requestHeaderMessage.getByte();
 if (methodCode != Constants.SC_M_JK_STORED) {
-String methodName = Constants.methodTransArray[methodCode - 1];
+String methodName = Constants.getMethodForCode(methodCode - 1);
 request.method().setString(methodName);
 }
 
@@ -747,7 +747,7 @@ public class AjpAprProcessor implements 
 isc &= 0xFF00;
 if(0xA000 == isc) {
 requestHeaderMessage.getInt(); // To advance the read position
-hName = Constants.headerTransArray[hId - 1];
+hName = Constants.getHeaderForCode(hId - 1);
 vMB = headers.addValue(hName);
 } else {
 // reset hId -- if the header currently being read

Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java?rev=1000400&r1=1000399&r2=1000400&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java Thu Sep 23 
10:38:56 2010
@@ -719,7 +719,7 @@ public class AjpProcessor implements Act
 // Translate the HTTP method code to a String.
 byte methodCode = requestHeaderMessage.getByte();
 if (methodCode != Constants.SC_M_JK_STORED) {
-String methodName = Constants.methodTransArray[methodCode - 1];
+String methodName = Constants.getMethodForCode(methodCode - 1);
 request.method().setString(methodName);
 }
 
@@ -753,7 +753,7 @@ public class AjpProcessor implements Act
 isc &= 0xFF00;
 if(0xA000 == isc) {
 requestHeaderMessage.getInt(); // To advance the read position
-hName = Constants.headerTransArray[hId - 1];
+hName = Constants.getHeaderForCode(hId - 1);
 vMB = headers.addValue(hName);
 } else {
 // reset hId -- if the header currently being read

Modified: tomcat/trunk/java/org/apache/coyote/ajp/Constants.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/Constants.java?rev=1000400&r1=1000399&r2=1000400&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/ajp/Constants.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/Constants.java Thu Sep 23 10:38:56 
2010
@@ -120,7 +120,7 @@ public final class Constants {
 public static final int  MAX_SEND_SIZE = MAX_PACKET_SIZE - SEND_HEAD_LEN;
 
 // Translates integer codes to names of HTTP methods
-public static final String []methodTransArray = {
+private static final String [] methodTransArray = {
 "OPTIONS",
 "GET",
 "HEAD",
@@ -149,6 +149,16 @@ public final class Constants {
 "BASELINE-CONTROL",
 "MKACTIVITY"
 };
+
+/**
+ * Converts an AJP coded HTTP method to the method name.
+ * @param code the coded value
+ * @return the string value of the method
+ */
+   public static final String getMethodForCode(final int code) {
+   return methodTransArray[code];
+   }
+
 public static final int SC_M_JK_STORED = (byte) 0xFF;
 
 // id's for common request headers
@@ -170,7 +180,7 @@ public final class Constants {
 public static final byte SC_A_SSL_KEY_SIZE  = 11; // XXX ???
 
 // Translates integer codes to request header names
-public static final String []headerTransArray = {
+private static final String [] headerTransArray = {
 "

svn commit: r1001383 - /tomcat/trunk/webapps/docs/building.xml

2010-09-26 Thread timw
Author: timw
Date: Sun Sep 26 07:46:27 2010
New Revision: 1001383

URL: http://svn.apache.org/viewvc?rev=1001383&view=rev
Log:
Fixing Tomcat startup class in building instructions.

Modified:
tomcat/trunk/webapps/docs/building.xml

Modified: tomcat/trunk/webapps/docs/building.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/building.xml?rev=1001383&r1=1001382&r2=1001383&view=diff
==
--- tomcat/trunk/webapps/docs/building.xml (original)
+++ tomcat/trunk/webapps/docs/building.xml Sun Sep 26 07:46:27 2010
@@ -222,7 +222,7 @@ these dependencies.
 root directory of the source tree and will be available in the Run->Run 
Configurations
 dialog. Use these to start and stop Tomcat from Eclipse. 
 If you want to configure these yourself (or are using a different IDE) 
-then use org.apache.catalina.startup.Catalina as the main class,
+then use org.apache.catalina.startup.Bootstrap as the main class,
 start/stop as program arguments, and specify 
-Dcatalina.home=... 
 (with the name of your build directory) as VM arguments.
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1002070 - /tomcat/trunk/webapps/docs/developers.xml

2010-09-28 Thread timw
Author: timw
Date: Tue Sep 28 09:28:30 2010
New Revision: 1002070

URL: http://svn.apache.org/viewvc?rev=1002070&view=rev
Log:
Adding myself to active devs list.

Modified:
tomcat/trunk/webapps/docs/developers.xml

Modified: tomcat/trunk/webapps/docs/developers.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/developers.xml?rev=1002070&r1=1002069&r2=1002070&view=diff
==
--- tomcat/trunk/webapps/docs/developers.xml (original)
+++ tomcat/trunk/webapps/docs/developers.xml Tue Sep 28 09:28:30 2010
@@ -57,6 +57,7 @@
   Rainer Jung (rjung): Catalina, Clustering, Connectors
   Remy Maucherat (remm): Catalina, Connectors, Docs
   Tim Funk (funkman): Catalina, Docs
+  Tim Whittington (timw): Connectors
 
 
   



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1002073 - in /tomcat/trunk: ./ res/ide-support/ res/ide-support/eclipse/ webapps/docs/

2010-09-28 Thread timw
Author: timw
Date: Tue Sep 28 09:36:08 2010
New Revision: 1002073

URL: http://svn.apache.org/viewvc?rev=1002073&view=rev
Log:
Moved all Eclipse specific files into res/ide-support/eclipse.
Removed spaces from launch target filenames.
Corrected launch targets to run in output/build instead of root directory 
(still not sure if they're a good idea)
Added an Ant ide-eclipse target to prepare the working copy to be built with 
Eclipse and create Eclipse project files.
Updated the Building docs to document new Eclipse setup method.
Added descriptions of how to configure Eclipse to respect Tomcat coding 
conventions to the Building guide.

Added:
tomcat/trunk/res/ide-support/
tomcat/trunk/res/ide-support/eclipse/
tomcat/trunk/res/ide-support/eclipse/eclipse.classpath
  - copied unchanged from r1001386, tomcat/trunk/eclipse.classpath
tomcat/trunk/res/ide-support/eclipse/eclipse.project
  - copied unchanged from r1001386, tomcat/trunk/eclipse.project
tomcat/trunk/res/ide-support/eclipse/start-tomcat.launch
  - copied, changed from r1001386, tomcat/trunk/Start Tomcat.launch
tomcat/trunk/res/ide-support/eclipse/stop-tomcat.launch
  - copied, changed from r1001386, tomcat/trunk/Stop Tomcat.launch
Removed:
tomcat/trunk/Start Tomcat.launch
tomcat/trunk/Stop Tomcat.launch
tomcat/trunk/eclipse.classpath
tomcat/trunk/eclipse.project
Modified:
tomcat/trunk/build.xml
tomcat/trunk/webapps/docs/building.xml

Modified: tomcat/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/build.xml?rev=1002073&r1=1002072&r2=1002073&view=diff
==
--- tomcat/trunk/build.xml (original)
+++ tomcat/trunk/build.xml Tue Sep 28 09:36:08 2010
@@ -1513,6 +1513,7 @@ Apache Tomcat ${version} native binaries
 
 
 
+
 
 
 
@@ -2242,6 +2243,19 @@ Apache Tomcat ${version} native binaries
 
   
 
+  
+
+  
+
+
+
+
+
+Eclipse project files created.
+Read the Building page on the Apache Tomcat documentation site for details on 
how to configure your Eclipse workplace.
+  
+
   
 
   

Copied: tomcat/trunk/res/ide-support/eclipse/start-tomcat.launch (from 
r1001386, tomcat/trunk/Start Tomcat.launch)
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/res/ide-support/eclipse/start-tomcat.launch?p2=tomcat/trunk/res/ide-support/eclipse/start-tomcat.launch&p1=tomcat/trunk/Start%20Tomcat.launch&r1=1001386&r2=1002073&rev=1002073&view=diff
==
--- tomcat/trunk/Start Tomcat.launch (original)
+++ tomcat/trunk/res/ide-support/eclipse/start-tomcat.launch Tue Sep 28 
09:36:08 2010
@@ -9,5 +9,5 @@
 
 
 
-
+
 

Copied: tomcat/trunk/res/ide-support/eclipse/stop-tomcat.launch (from r1001386, 
tomcat/trunk/Stop Tomcat.launch)
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/res/ide-support/eclipse/stop-tomcat.launch?p2=tomcat/trunk/res/ide-support/eclipse/stop-tomcat.launch&p1=tomcat/trunk/Stop%20Tomcat.launch&r1=1001386&r2=1002073&rev=1002073&view=diff
==
--- tomcat/trunk/Stop Tomcat.launch (original)
+++ tomcat/trunk/res/ide-support/eclipse/stop-tomcat.launch Tue Sep 28 09:36:08 
2010
@@ -9,5 +9,5 @@
 
 
 
-
+
 

Modified: tomcat/trunk/webapps/docs/building.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/building.xml?rev=1002073&r1=1002072&r2=1002073&view=diff
==
--- tomcat/trunk/webapps/docs/building.xml (original)
+++ tomcat/trunk/webapps/docs/building.xml Tue Sep 28 09:36:08 2010
@@ -161,11 +161,6 @@ and the following steps have been used b
 
 
 
-NOTE: You must complete all the above steps to fetch
-dependency libraries and build Tomcat before you can setup an Eclipse project 
and start
-using it.
-
-
 NOTE: This will not let you build everything under Eclipse;
 the build process requires use of Ant for the many stages that aren't
 simple Java compilations.
@@ -174,19 +169,19 @@ get warnings, reformat code, perform ref
 under the IDE, and so on.
 
 
-Complete the download of all third party dependencies required to compile the 
Tomcat
-source in Eclipse:
+Sample Eclipse project files and launch targets are provided in the 
+res/ide-support/eclipse directory of the source tree.
+The instructions below will automatically copy these into the required 
locations.
+
+
+An Ant target is provided as a convenience to download all binary 
dependencies, and to create
+the Eclipse project and classpath files in the root of the source tree.
 
 
 cd ${tomcat.source}
-ant extras
+ant ide-eclipse
 
 
-
-Sample Eclipse project and classpath files are provided in the root directory 
of the source tree.
-The sample files are named eclipse.

svn commit: r1002076 - in /tomcat/site/trunk: docs/getinvolved.html xdocs/getinvolved.xml

2010-09-28 Thread timw
Author: timw
Date: Tue Sep 28 09:46:24 2010
New Revision: 1002076

URL: http://svn.apache.org/viewvc?rev=1002076&view=rev
Log:
Adding some content to the getting involved overview to give new contributors 
some guidance.

Modified:
tomcat/site/trunk/docs/getinvolved.html
tomcat/site/trunk/xdocs/getinvolved.xml

Modified: tomcat/site/trunk/docs/getinvolved.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/getinvolved.html?rev=1002076&r1=1002075&r2=1002076&view=diff
==
--- tomcat/site/trunk/docs/getinvolved.html (original)
+++ tomcat/site/trunk/docs/getinvolved.html Tue Sep 28 09:46:24 2010
@@ -3,17 +3,17 @@
 
 
 Apache Tomcat - Get Involved
-
-
+
+
 
-
-
+
+
 
 
 
 
 http://tomcat.apache.org/";>
-
+
 
 
 
@@ -24,28 +24,28 @@
 
 
 http://www.apache.org/";>
-http://www.apache.org/images/asf-logo.gif"; />
+http://www.apache.org/images/asf-logo.gif"; align="right" alt="Apache 
Logo" border="0"/>
 
 
 
 
 
-http://www.google.com/search";>
-
-
-
+http://www.google.com/search"; method="get">
+
+
+
 
 
-
+
 
 
 
-
+
 
 
 
 
-
+
 
 Apache Tomcat
 
@@ -177,11 +177,11 @@
 
 
 
-
-
+
+
 
 
-
+
 
 
 
@@ -225,7 +225,88 @@ You should also read
 
 
 
-
+
+
+
+
+
+
+
+
+
+
+
+
+Contributing Changes
+
+
+
+
+
+
+
+
+
+
+If you want to start contributing changes, then the first step is to checkout 
the source
+code and build Apache Tomcat. See the Building page in the 
documentation area for the
+version of Apache Tomcat you want to work with for detailed instructions.
+
+
+
+When making a contribution, minimize unnecessary or unrelated changes (such as 
formatting).
+Apache Tomcat has many contributors, and being able to diff changes throughout 
the source history is important.
+Making small gradual changes and respecting the conventions of the existing 
source code
+will make it much more likely that your patch will be accepted.
+
+
+
+Once you've got Apache Tomcat up and running, then the Apache 
+http://www.apache.org/dev/contributors.html";>Contributors Tech 
Guide is a good place
+to learn how to create and submit patches.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Coding Conventions
+
+
+
+
+
+
+
+
+Apache Tomcat has very loosely defined coding conventions, but the following 
guidelines will be useful:
+
+  Use spaces for indenting, not tabs
+  80 char line width
+  Java source: { at end of line, 4 space indents
+  XML source: 2 space indents
+
+
+
+
+
+
+
+
 
 
 
@@ -234,17 +315,17 @@ You should also read
 
 
 
-
+
 
 
 
 
 
 
-
+
 
 Copyright © 1999-2010, The Apache Software Foundation
-
+
 "Apache", the Apache feather, and the Apache Tomcat logo are
 trademarks of the Apache Software Foundation for our open source
 software.

Modified: tomcat/site/trunk/xdocs/getinvolved.xml
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/getinvolved.xml?rev=1002076&r1=1002075&r2=1002076&view=diff
==
--- tomcat/site/trunk/xdocs/getinvolved.xml (original)
+++ tomcat/site/trunk/xdocs/getinvolved.xml Tue Sep 28 09:46:24 2010
@@ -33,5 +33,38 @@ You should also read
 
 
 
+
+
+
+If you want to start contributing changes, then the first step is to checkout 
the source
+code and build Apache Tomcat. See the Building page in the 
documentation area for the
+version of Apache Tomcat you want to work with for detailed instructions.
+
+
+
+When making a contribution, minimize unnecessary or unrelated changes (such as 
formatting).
+Apache Tomcat has many contributors, and being able to diff changes throughout 
the source history is important.
+Making small gradual changes and respecting the conventions of the existing 
source code
+will make it much more likely that your patch will be accepted.
+
+
+
+Once you've got Apache Tomcat up and running, then the Apache 
+http://www.apache.org/dev/contributors.html";>Contributors Tech 
Guide is a good place
+to learn how to create and submit patches.
+
+
+
+
+
+Apache Tomcat has very loosely defined coding conventions, but the following 
guidelines will be useful:
+
+  Use spaces for indenting, not tabs
+  80 char line width
+  Java source: { at end of line, 4 space indents
+  XML source: 2 space indents
+
+
+
 
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1002509 - in /tomcat/trunk: java/org/apache/jasper/compiler/ParserController.java java/org/apache/jasper/compiler/TagFileProcessor.java webapps/docs/changelog.xml

2010-09-29 Thread timw
Author: timw
Date: Wed Sep 29 08:08:32 2010
New Revision: 1002509

URL: http://svn.apache.org/viewvc?rev=1002509&view=rev
Log:
https://issues.apache.org/bugzilla/show_bug.cgi?id=50018
Minor javadoc corrections in Jasper.

Modified:
tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java
tomcat/trunk/java/org/apache/jasper/compiler/TagFileProcessor.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java?rev=1002509&r1=1002508&r2=1002509&view=diff
==
--- tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java 
(original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java Wed Sep 
29 08:08:32 2010
@@ -125,7 +125,7 @@ class ParserController implements TagCon
  *
  * @param inFileName The path to the resource to be included.
  * @param parent The parent node of the include directive.
- * @param jarFileUrl The JAR file from which to read the included resource,
+ * @param jarResource The JAR file from which to read the included 
resource,
  * or null of the included resource is to be read from the filesystem
  */
 public Node.Nodes parse(String inFileName, Node parent,
@@ -142,7 +142,7 @@ class ParserController implements TagCon
  * This is invoked by the compiler 
  *
  * @param inFileNameThe name of the tag file to be parsed.
- * @param tagFileJarUrl The location of the tag file.
+ * @param jarResource The location of the tag file.
  */
 public Node.Nodes parseTagFileDirectives(String inFileName,
 JarResource jarResource)
@@ -168,7 +168,7 @@ class ParserController implements TagCon
  * @param directivesOnly true if the file to be parsed is a tag file and
  * we are only interested in the directives needed for constructing a
  * TagFileInfo.
- * @param jarFile The JAR file from which to read the JSP page or tag file,
+ * @param jarResource The JAR file from which to read the JSP page or tag 
file,
  * or null if the JSP page or tag file is to be read from the filesystem
  */
 private Node.Nodes doParse(String inFileName,

Modified: tomcat/trunk/java/org/apache/jasper/compiler/TagFileProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/TagFileProcessor.java?rev=1002509&r1=1002508&r2=1002509&view=diff
==
--- tomcat/trunk/java/org/apache/jasper/compiler/TagFileProcessor.java 
(original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/TagFileProcessor.java Wed Sep 
29 08:08:32 2010
@@ -480,8 +480,8 @@ class TagFileProcessor {
  *the tag name as specified in the TLD
  * @param path
  *the path for the tagfile
- * @param tagFileJarUrl
- *the url for the Jar containing the tag file 
+ * @param jarResource
+ *the Jar resource containing the tag file 
  * @param tagLibInfo
  *the TagLibraryInfo object associated with this TagInfo
  * @return a TagInfo object assembled from the directives in the tag file.

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1002509&r1=1002508&r2=1002509&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Wed Sep 29 08:08:32 2010
@@ -171,6 +171,10 @@
 49909: Fix a regression introduced with the fix for
 47950 that prevented JSTL classes being loaded. (markt)
   
+  
+50018: Fix some minor Javadoc errors in Jasper source.
+Based on a patch by sebb. (timw)
+  
 
   
   



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1003923 - in /tomcat/trunk: java/org/apache/jasper/compiler/ParserController.java webapps/docs/changelog.xml

2010-10-02 Thread timw
Author: timw
Date: Sun Oct  3 06:53:15 2010
New Revision: 1003923

URL: http://svn.apache.org/viewvc?rev=1003923&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49998
Handle single quoted attributes in detection of jsp:root element in XML syntax 
JSP files.

Modified:
tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java?rev=1003923&r1=1003922&r2=1003923&view=diff
==
--- tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java 
(original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java Sun Oct  
3 06:53:15 2010
@@ -598,10 +598,12 @@ class ParserController implements TagCon
 && Character.isWhitespace(root.charAt(index))) {
 index++;
 }
-if (index < root.length() && root.charAt(index++) == '"'
-&& root.regionMatches(index, JSP_URI, 0,
-JSP_URI.length())) {
-return true;
+if (index < root.length() 
+&& (root.charAt(index) == '"' || root.charAt(index) == '\'')) {
+index++;
+if (root.regionMatches(index, JSP_URI, 0, JSP_URI.length())) {
+return true;
+}
 }
 }
 

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1003923&r1=1003922&r2=1003923&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Sun Oct  3 06:53:15 2010
@@ -244,6 +244,10 @@
 49860: Add support for trailing headers in chunked HTTP
 requests. (markt)
   
+  
+49987: Make jsp:root detection work with single quoted
+attributes as well. (timw)
+  
 
   
   



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1003925 - /tomcat/tc6.0.x/trunk/STATUS.txt

2010-10-03 Thread timw
Author: timw
Date: Sun Oct  3 07:18:39 2010
New Revision: 1003925

URL: http://svn.apache.org/viewvc?rev=1003925&view=rev
Log:
Proposing fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=49998 + 
some votes on minor changes.

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1003925&r1=1003924&r2=1003925&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Sun Oct  3 07:18:39 2010
@@ -236,18 +236,18 @@ PATCHES PROPOSED TO BACKPORT:
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49667
   Ensure JDBC leak prevention code doesn't trigger a leak.
   http://svn.apache.org/viewvc?rev=1003481&view=rev
-  +1: markt, kkolinko
+  +1: markt, kkolinko. timw
   -1:
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49861
   Don't log RMI port values formatted with commas
   http://svn.apache.org/viewvc?rev=1003488&view=rev
-  +1: markt, kkolinko
+  +1: markt, kkolinko, timw
   -1:
 
 * Make recent catalina.sh changes work on Solaris
   http://svn.apache.org/viewvc?rev=1003556&view=rev
-  +1: markt, kkolinko
+  +1: markt, kkolinko, timw
   -1:
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49905
@@ -265,5 +265,11 @@ PATCHES PROPOSED TO BACKPORT:
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49985
   Fix thread safety issue in EL Parser
   http://svn.apache.org/viewvc?rev=1003861&view=rev
-  +1: markt
+  +1: markt, timw
+  -1:
+
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49998
+  Handle single quoted attributes in detection of jsp:root element in XML 
syntax JSP files.
+  http://svn.apache.org/viewvc?view=revision&revision=1003923
+  +1: timw
   -1:



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1004039 - in /tomcat/tc6.0.x/trunk: STATUS.txt java/org/apache/jasper/compiler/ParserController.java webapps/docs/changelog.xml

2010-10-03 Thread timw
Author: timw
Date: Sun Oct  3 20:27:12 2010
New Revision: 1004039

URL: http://svn.apache.org/viewvc?rev=1004039&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49998
Handle single quoted attributes in detection of jsp:root element in XML syntax 
JSP files.

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt
tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/ParserController.java
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1004039&r1=1004038&r2=1004039&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Sun Oct  3 20:27:12 2010
@@ -252,9 +252,3 @@ PATCHES PROPOSED TO BACKPORT:
   http://svn.apache.org/viewvc?rev=1003861&view=rev
   +1: markt, timw, kkolinko
   -1:
-
-* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49998
-  Handle single quoted attributes in detection of jsp:root element in XML 
syntax JSP files.
-  http://svn.apache.org/viewvc?view=revision&revision=1003923
-  +1: timw, kkolinko, markt
-  -1:

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/ParserController.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/ParserController.java?rev=1004039&r1=1004038&r2=1004039&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/ParserController.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/ParserController.java 
Sun Oct  3 20:27:12 2010
@@ -612,10 +612,12 @@ class ParserController implements TagCon
 && Character.isWhitespace(root.charAt(index))) {
 index++;
 }
-if (index < root.length() && root.charAt(index++) == '"'
-&& root.regionMatches(index, JSP_URI, 0,
-JSP_URI.length())) {
-return true;
+if (index < root.length() 
+&& (root.charAt(index) == '"' || root.charAt(index) == '\'')) {
+index++;
+if (root.regionMatches(index, JSP_URI, 0, JSP_URI.length())) {
+return true;
+}
 }
 }
 

Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=1004039&r1=1004038&r2=1004039&view=diff
==
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Sun Oct  3 20:27:12 2010
@@ -145,6 +145,15 @@
   
 
   
+  
+
+  
+49987: Make jsp:root detection work with single quoted
+attributes as well. (timw)
+  
+
+  
+  
   
 
   



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1004393 - /tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java

2010-10-04 Thread timw
Author: timw
Date: Mon Oct  4 20:19:09 2010
New Revision: 1004393

URL: http://svn.apache.org/viewvc?rev=1004393&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50026
Always calculate path of resource to be served relative to the context root.
This invokes the standard protection of WEB-INF and META-INF directories.
This is a breaking change for the unofficial use of DefaultServlet to remount 
the webapp base under a new path.

Modified:
tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java

Modified: tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java?rev=1004393&r1=1004392&r2=1004393&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java Mon Oct  
4 20:19:09 2010
@@ -70,9 +70,44 @@ import org.apache.tomcat.util.res.String
 
 
 /**
- * The default resource-serving servlet for most web applications,
+ * The default resource-serving servlet for most web applications,
  * used to serve static resources such as HTML pages and images.
- *
+ * 
+ * 
+ * This servlet is intended to be mapped to / e.g.:
+ * 
+ * 
+ *   <servlet-mapping>
+ *   <servlet-name>default</servlet-name>
+ *   <url-pattern>/</url-pattern>
+ *   </servlet-mapping>
+ * 
+ * It can be mapped to sub-paths, however in all cases resources are served
+ * from the web appplication resource root using the full path from the root
+ * of the web application context.
+ * e.g. given a web application structure:
+ *
+ * 
+ * /context
+ *   /images
+ * tomcat2.jpg
+ *   /static
+ * /images
+ *   tomcat.jpg
+ * 
+ * 
+ * ... and a servlet mapping that maps only /static/* to the 
default servlet:
+ * 
+ * 
+ *   <servlet-mapping>
+ *   <servlet-name>default</servlet-name>
+ *   <url-pattern>/static/*</url-pattern>
+ *   </servlet-mapping>
+ * 
+ * 
+ * Then a request to /context/static/images/tomcat.jpg will 
succeed
+ * while a request to /context/images/tomcat2.jpg will fail. 
+ * 
  * @author Craig R. McClanahan
  * @author Remy Maucherat
  * @version $Id$
@@ -303,6 +338,11 @@ public class DefaultServlet
  * @param request The servlet request we are processing
  */
 protected String getRelativePath(HttpServletRequest request) {
+// IMPORTANT: DefaultServlet can be mapped to '/' or '/path/*' but 
always
+// serves resources from the web app root with context rooted paths.
+// i.e. it can not be used to mount the web app root under a sub-path
+// This method must construct a complete context rooted path, although
+// subclasses can change this behaviour.
 
 // Are we being processed by a RequestDispatcher.include()?
 if (request.getAttribute(Globals.INCLUDE_REQUEST_URI_ATTR) != null) {
@@ -319,7 +359,11 @@ public class DefaultServlet
 // No, extract the desired path directly from the request
 String result = request.getPathInfo();
 if (result == null) {
+// Mapped to '/'
 result = request.getServletPath();
+} else {
+// Mapped to '/path/*' so get entire path under context
+result = request.getServletPath() + result;
 }
 if ((result == null) || (result.equals(""))) {
 result = "/";



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1004409 - /tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java

2010-10-04 Thread timw
Author: timw
Date: Mon Oct  4 20:33:57 2010
New Revision: 1004409

URL: http://svn.apache.org/viewvc?rev=1004409&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50026 for WebdavServlet
Factored checking of special WEB-INF and META-INF paths into service to trap 
requests for GET methods handled by DefaultServlet (which does not check 
access).
Retained checking of special paths in handlers for copy, delete, move (copy + 
delete), and in enumeration of resources (propfind).

Modified:
tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java

Modified: tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java?rev=1004409&r1=1004408&r2=1004409&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java (original)
+++ tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java Mon Oct  
4 20:33:57 2010
@@ -71,42 +71,46 @@ import org.xml.sax.SAXException;
  * Servlet which adds support for WebDAV level 2. All the basic HTTP requests
  * are handled by the DefaultServlet. The WebDAVServlet must not be used as the
  * default servlet (ie mapped to '/') as it will not work in this 
configuration.
- * To enable WebDAV for a context add the following to web.xml:
- * <servlet>
- *  <servlet-name>webdav</servlet-name>
- *  
<servlet-class>org.apache.catalina.servlets.WebdavServlet</servlet-class>
- *<init-param>
- *  <param-name>debug</param-name>
- *  <param-value>0</param-value>
- *</init-param>
- *<init-param>
- *  <param-name>listings</param-name>
- *  <param-value>true</param-value>
- *</init-param>
- *  </servlet>
- *  <servlet-mapping>
- *<servlet-name>webdav</servlet-name>
- *<url-pattern>/*</url-pattern>
- *  </servlet-mapping>
- * 
  * 
- * This will enable read only access. To enable read-write access add:
- * 
- *<init-param>
- *  <param-name>readonly</param-name>
- *  <param-value>false</param-value>
- *</init-param>
- * 
+ * Mapping a subpath (e.g. /webdav/* to this servlet has the 
effect
+ * of re-mounting the entire web application under that sub-path, with WebDAV
+ * access to all the resources. This WEB-INF and 
META-INF
+ * directories are protected in this re-mounted resource tree.
  * 
- * To make the content editable via a different URL, using the following
- * mapping:
- * 
- *  <servlet-mapping>
- *<servlet-name>webdav</servlet-name>
- *<url-pattern>/webdavedit/*</url-pattern>
+ * To enable WebDAV for a context add the following to web.xml:
+ * 
+ * <servlet>
+ *  <servlet-name>webdav</servlet-name>
+ *  
<servlet-class>org.apache.catalina.servlets.WebdavServlet</servlet-class>
+ *<init-param>
+ *  <param-name>debug</param-name>
+ *  <param-value>0</param-value>
+ *</init-param>
+ *<init-param>
+ *  <param-name>listings</param-name>
+ *  <param-value>false</param-value>
+ *</init-param>
+ *  </servlet>
+ *  <servlet-mapping>
+ *<servlet-name>webdav</servlet-name>
+ *<url-pattern>/*</url-pattern>
  *  </servlet-mapping>
- * 
- * 
+ * 
+ * This will enable read only access. To enable read-write access add:
+ * 
+ *  <init-param>
+ *<param-name>readonly</param-name>
+ *<param-value>false</param-value>
+ *  </init-param>
+ * 
+ * To make the content editable via a different URL, use the following
+ * mapping:
+ * 
+ *  <servlet-mapping>
+ *<servlet-name>webdav</servlet-name>
+ *<url-pattern>/webdavedit/*</url-pattern>
+ *  </servlet-mapping>
+ * 
  * Don't forget to secure access appropriately to the editing URLs. With this
  * configuration the context will be accessible to normal users as before. 
Those
  * users with the necessary access will be able to edit content available via
@@ -315,10 +319,21 @@ public class WebdavServlet
 protected void service(HttpServletRequest req, HttpServletResponse resp)
 throws ServletException, IOException {
 
-String method = req.getMethod();
+final String path = getRelativePath(req);
+
+// Block access to special subdirectories.
+// DefaultServlet assumes it services resources from the root of the 
web app
+// and doesn't add any special path protection
+// WebdavServlet remounts the webapp under a new path, so this check is
+// necessary on all methods (including GET).

svn commit: r1004415 - in /tomcat/trunk/java/org/apache/catalina/servlets: DefaultServlet.java WebdavServlet.java

2010-10-04 Thread timw
Author: timw
Date: Mon Oct  4 20:37:11 2010
New Revision: 1004415

URL: http://svn.apache.org/viewvc?rev=1004415&view=rev
Log:
More fixes for https://issues.apache.org/bugzilla/show_bug.cgi?id=50026
Calculating path prefix used in listings correctly so links in listings 
produced by WebdavServlet mounted to a subpath are correct.

Modified:
tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java
tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java

Modified: tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java?rev=1004415&r1=1004414&r2=1004415&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java Mon Oct  
4 20:37:11 2010
@@ -374,6 +374,18 @@ public class DefaultServlet
 
 
 /**
+ * Determines the appropriate path to prepend resources with
+ * when generating directory listings. Depending on the behaviour of 
+ * {...@link #getRelativePath(HttpServletRequest)} this will change.
+ * @param request the request to determine the path for
+ * @return the prefix to apply to all resources in the listing.
+ */
+protected String getPathPrefix(final HttpServletRequest request) {
+return request.getContextPath();
+}
+
+
+/**
  * Process a GET request for the specified resource.
  *
  * @param request The servlet request we are processing
@@ -890,8 +902,7 @@ public class DefaultServlet
 
 if (serveContent) {
 // Serve the directory browser
-renderResult =
-render(request.getContextPath(), cacheEntry);
+renderResult = render(getPathPrefix(request), cacheEntry);
 }
 
 }

Modified: tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java?rev=1004415&r1=1004414&r2=1004415&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java (original)
+++ tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java Mon Oct  
4 20:37:11 2010
@@ -428,6 +428,20 @@ public class WebdavServlet
 
 
 /**
+ * Determines the prefix for standard directory GET listings.
+ */
+@Override
+protected String getPathPrefix(final HttpServletRequest request) {
+// Repeat the servlet path (e.g. /webdav/) in the listing path
+String contextPath = request.getContextPath();
+if (request.getServletPath() !=  null) {
+contextPath = contextPath + request.getServletPath();
+}
+return contextPath;
+}
+
+
+/**
  * OPTIONS Method.
  *
  * @param req The request



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1004513 - /tomcat/trunk/webapps/docs/changelog.xml

2010-10-04 Thread timw
Author: timw
Date: Tue Oct  5 02:57:25 2010
New Revision: 1004513

URL: http://svn.apache.org/viewvc?rev=1004513&view=rev
Log:
Updating changelog with fix for 
https://issues.apache.org/bugzilla/show_bug.cgi?id=50026

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

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1004513&r1=1004512&r2=1004513&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Tue Oct  5 02:57:25 2010
@@ -245,6 +245,15 @@
 that may have caused additional problems during a failure at start up.
 (markt) 
   
+  
+50026: Prevent serving of resources from WEB-INF and
+META-INF directories when DefaultServlet or WebdavServlet is mapped
+to a sub-path of the context. This changes DefaultServlet to always
+serve resources with paths relative to the root of the context
+regardless of where it is mapped, which is a breaking change for
+current servlet-mappings that map the default servlet to a subpath.
+(timw)
+  
 
   
   



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1004515 - /tomcat/tc6.0.x/trunk/STATUS.txt

2010-10-04 Thread timw
Author: timw
Date: Tue Oct  5 03:03:44 2010
New Revision: 1004515

URL: http://svn.apache.org/viewvc?rev=1004515&view=rev
Log:
Proposing fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=50026 in 
6.0.x

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1004515&r1=1004514&r2=1004515&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Oct  5 03:03:44 2010
@@ -221,3 +221,19 @@ PATCHES PROPOSED TO BACKPORT:
   http://svn.apache.org/viewvc?rev=1003572&view=rev
   +1: markt, kfujino
   -1:
+
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50026
+  Force DefaultServlet to serve all resources relative to context root
+  regardless of mappings/mount point.
+  Prevents access to WEB-INF and META-INF when the default servlet is
+  mapped to a sub-path. Also fixes WebdavServlet, which is affected for GET
+  requests.
+  This is a breaking change for anyone re-mapping DefaultServlet to a sub-path
+  (current behaviour is to remount the entire web application under the path,
+  which exposes WEB-INF/META-INF).
+  http://svn.apache.org/viewvc?rev=1004393&view=rev
+  http://svn.apache.org/viewvc?rev=1004409&view=rev
+  http://svn.apache.org/viewvc?rev=1004415&view=rev
+  +1: timw
+  -1:
+



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1004912 - /tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java

2010-10-06 Thread timw
Author: timw
Date: Wed Oct  6 07:22:46 2010
New Revision: 1004912

URL: http://svn.apache.org/viewvc?rev=1004912&view=rev
Log:
More fixes for https://issues.apache.org/bugzilla/show_bug.cgi?id=50026
Calculating complete resource path when accessed via RequestDispatcher.include()

Modified:
tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java

Modified: tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java?rev=1004912&r1=1004911&r2=1004912&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java Wed Oct  
6 07:22:46 2010
@@ -348,21 +348,24 @@ public class DefaultServlet
 if (request.getAttribute(Globals.INCLUDE_REQUEST_URI_ATTR) != null) {
 String result = (String) request.getAttribute(
 Globals.INCLUDE_PATH_INFO_ATTR);
-if (result == null)
+if (result == null) {
 result = (String) request.getAttribute(
 Globals.INCLUDE_SERVLET_PATH_ATTR);
-if ((result == null) || (result.equals("")))
+} else {
+result = (String) request.getAttribute(
+  Globals.INCLUDE_SERVLET_PATH_ATTR) + result;
+}
+if ((result == null) || (result.equals(""))) {
 result = "/";
+}
 return (result);
 }
 
 // No, extract the desired path directly from the request
 String result = request.getPathInfo();
 if (result == null) {
-// Mapped to '/'
 result = request.getServletPath();
 } else {
-// Mapped to '/path/*' so get entire path under context
 result = request.getServletPath() + result;
 }
 if ((result == null) || (result.equals(""))) {



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1004914 - in /tomcat/trunk/java/org/apache/catalina/servlets: DefaultServlet.java WebdavServlet.java

2010-10-06 Thread timw
Author: timw
Date: Wed Oct  6 07:24:46 2010
New Revision: 1004914

URL: http://svn.apache.org/viewvc?rev=1004914&view=rev
Log:
Correcting JavaDoc for HTTP methods.
No functional change

Modified:
tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java
tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java

Modified: tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java?rev=1004914&r1=1004913&r2=1004914&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java Wed Oct  
6 07:24:46 2010
@@ -490,7 +490,7 @@ public class DefaultServlet
 
 
 /**
- * Process a POST request for the specified resource.
+ * Process a PUT request for the specified resource.
  *
  * @param req The servlet request we are processing
  * @param resp The servlet response we are creating
@@ -630,7 +630,7 @@ public class DefaultServlet
 
 
 /**
- * Process a POST request for the specified resource.
+ * Process a DELETE request for the specified resource.
  *
  * @param req The servlet request we are processing
  * @param resp The servlet response we are creating

Modified: tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java?rev=1004914&r1=1004913&r2=1004914&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java (original)
+++ tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java Wed Oct  
6 07:24:46 2010
@@ -642,7 +642,7 @@ public class WebdavServlet
 
 // Stack of the objects one level below
 Stack stackBelow = new Stack();
-
+ 
 while ((!stack.isEmpty()) && (depth >= 0)) {
 
 String currentPath = stack.pop();
@@ -834,7 +834,7 @@ public class WebdavServlet
 
 
 /**
- * Process a POST request for the specified resource.
+ * Process a PUT request for the specified resource.
  *
  * @param req The servlet request we are processing
  * @param resp The servlet response we are creating



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1004927 - /tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java

2010-10-06 Thread timw
Author: timw
Date: Wed Oct  6 08:36:20 2010
New Revision: 1004927

URL: http://svn.apache.org/viewvc?rev=1004927&view=rev
Log:
Making TomcatBaseTest.getUrl() work for get requests that return 404 responses

Modified:
tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java

Modified: tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java?rev=1004927&r1=1004926&r2=1004927&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java (original)
+++ tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java Wed Oct  
6 08:36:20 2010
@@ -191,21 +191,23 @@ public abstract class TomcatBaseTest ext
 Map> head = connection.getHeaderFields();
 resHead.putAll(head);
 }
-InputStream is = connection.getInputStream();
-BufferedInputStream bis = null;
-try {
-bis = new BufferedInputStream(is);
-byte[] buf = new byte[2048];
-int rd = 0;
-while((rd = bis.read(buf)) > 0) {
-out.append(buf, 0, rd);
-}
-} finally {
-if (bis != null) {
-try {
-bis.close();
-} catch (IOException e) {
-// Ignore
+if (rc == HttpServletResponse.SC_OK) {
+InputStream is = connection.getInputStream();
+BufferedInputStream bis = null;
+try {
+bis = new BufferedInputStream(is);
+byte[] buf = new byte[2048];
+int rd = 0;
+while((rd = bis.read(buf)) > 0) {
+out.append(buf, 0, rd);
+}
+} finally {
+if (bis != null) {
+try {
+bis.close();
+} catch (IOException e) {
+// Ignore
+}
 }
 }
 }



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1004928 - in /tomcat/trunk/test/org/apache/catalina/servlets: ./ TestDefaultServlet.java TestWebdavServlet.java

2010-10-06 Thread timw
Author: timw
Date: Wed Oct  6 08:37:56 2010
New Revision: 1004928

URL: http://svn.apache.org/viewvc?rev=1004928&view=rev
Log:
Adding unit tests for DefaultServlet and WebdavServlet to test basic 
serving/mounting behaviour and protection of special paths

Added:
tomcat/trunk/test/org/apache/catalina/servlets/
tomcat/trunk/test/org/apache/catalina/servlets/TestDefaultServlet.java
tomcat/trunk/test/org/apache/catalina/servlets/TestWebdavServlet.java

Added: tomcat/trunk/test/org/apache/catalina/servlets/TestDefaultServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/servlets/TestDefaultServlet.java?rev=1004928&view=auto
==
--- tomcat/trunk/test/org/apache/catalina/servlets/TestDefaultServlet.java 
(added)
+++ tomcat/trunk/test/org/apache/catalina/servlets/TestDefaultServlet.java Wed 
Oct  6 08:37:56 2010
@@ -0,0 +1,145 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.catalina.servlets;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.catalina.startup.Tomcat;
+import org.apache.catalina.startup.TomcatBaseTest;
+import org.apache.tomcat.util.buf.ByteChunk;
+
+public class TestDefaultServlet extends TomcatBaseTest {
+
+/**
+ * Test attempting to access special paths (WEB-INF/META-INF) using 
DefaultServlet 
+ */
+public void testGetSpecials() throws Exception {
+Tomcat tomcat = getTomcatInstance();
+
+String contextPath = "/examples";
+
+File appDir = new File(getBuildDirectory(), "webapps" + contextPath);
+// app dir is relative to server home
+tomcat.addWebapp(null, "/examples", appDir.getAbsolutePath());
+
+tomcat.start();
+
+final ByteChunk res = new ByteChunk();
+
+int rc =getUrl("http://localhost:"; + getPort() + contextPath +
+"/WEB-INF/web.xml", res, null);
+assertEquals(HttpServletResponse.SC_NOT_FOUND, rc);
+
+rc =getUrl("http://localhost:"; + getPort() + contextPath +
+"/WEB-INF/doesntexistanywhere", res, null);
+assertEquals(HttpServletResponse.SC_NOT_FOUND, rc);
+ 
+rc =getUrl("http://localhost:"; + getPort() + contextPath +
+"/WEB-INF/", res, null);
+assertEquals(HttpServletResponse.SC_NOT_FOUND, rc);
+ 
+rc =getUrl("http://localhost:"; + getPort() + contextPath +
+"/META-INF/MANIFEST.MF", res, null);
+assertEquals(HttpServletResponse.SC_NOT_FOUND, rc);
+
+rc =getUrl("http://localhost:"; + getPort() + contextPath +
+"/META-INF/doesntexistanywhere", res, null);
+assertEquals(HttpServletResponse.SC_NOT_FOUND, rc);
+
+}
+
+/**
+ * Test https://issues.apache.org/bugzilla/show_bug.cgi?id=50026
+ * Verify serving of resources from context root with subpath mapping.
+ */
+public void testGetWithSubpathmount() throws Exception {
+Tomcat tomcat = getTomcatInstance();
+
+String contextPath = "/examples";
+
+File appDir = new File(getBuildDirectory(), "webapps" + contextPath);
+// app dir is relative to server home
+org.apache.catalina.Context ctx =
+tomcat.addWebapp(null, "/examples", appDir.getAbsolutePath());
+
+// Override the default servlet with our own mappings
+Tomcat.addServlet(ctx, "default2", new DefaultServlet());
+ctx.addServletMapping("/", "default2");
+ctx.addServletMapping("/servlets/*", "default2");
+ctx.addServletMapping("/static/*", "default2");
+
+tomcat.start();
+
+final ByteChunk res = new ByteChunk();
+
+   

svn commit: r1004929 - /tomcat/tc6.0.x/trunk/STATUS.txt

2010-10-06 Thread timw
Author: timw
Date: Wed Oct  6 08:41:25 2010
New Revision: 1004929

URL: http://svn.apache.org/viewvc?rev=1004929&view=rev
Log:
Adding fix for protecting includes to proposed DefaultServlet protection of 
WEB-INF fix

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1004929&r1=1004928&r2=1004929&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Oct  6 08:41:25 2010
@@ -217,6 +217,7 @@ PATCHES PROPOSED TO BACKPORT:
   http://svn.apache.org/viewvc?rev=1004393&view=rev
   http://svn.apache.org/viewvc?rev=1004409&view=rev
   http://svn.apache.org/viewvc?rev=1004415&view=rev
+  http://svn.apache.org/viewvc?rev=1004912&view=rev (fix for includes)
   +1: timw
   -1:
kkolinko: See Re:r1004393 on dev@



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1005308 - in /tomcat/trunk/test/org/apache/coyote/http11: TestAbstractHttp11Processor.java TestGzipOutputFilter.java filters/TestChunkedInputFilter.java

2010-10-06 Thread timw
Author: timw
Date: Thu Oct  7 00:50:28 2010
New Revision: 1005308

URL: http://svn.apache.org/viewvc?rev=1005308&view=rev
Log:
Adding license headers.
No functional change

Modified:
tomcat/trunk/test/org/apache/coyote/http11/TestAbstractHttp11Processor.java
tomcat/trunk/test/org/apache/coyote/http11/TestGzipOutputFilter.java

tomcat/trunk/test/org/apache/coyote/http11/filters/TestChunkedInputFilter.java

Modified: 
tomcat/trunk/test/org/apache/coyote/http11/TestAbstractHttp11Processor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/coyote/http11/TestAbstractHttp11Processor.java?rev=1005308&r1=1005307&r2=1005308&view=diff
==
--- tomcat/trunk/test/org/apache/coyote/http11/TestAbstractHttp11Processor.java 
(original)
+++ tomcat/trunk/test/org/apache/coyote/http11/TestAbstractHttp11Processor.java 
Thu Oct  7 00:50:28 2010
@@ -1,3 +1,20 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
 package org.apache.coyote.http11;
 
 import java.io.File;

Modified: tomcat/trunk/test/org/apache/coyote/http11/TestGzipOutputFilter.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/coyote/http11/TestGzipOutputFilter.java?rev=1005308&r1=1005307&r2=1005308&view=diff
==
--- tomcat/trunk/test/org/apache/coyote/http11/TestGzipOutputFilter.java 
(original)
+++ tomcat/trunk/test/org/apache/coyote/http11/TestGzipOutputFilter.java Thu 
Oct  7 00:50:28 2010
@@ -1,3 +1,20 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
 package org.apache.coyote.http11;
 
 import java.io.ByteArrayOutputStream;

Modified: 
tomcat/trunk/test/org/apache/coyote/http11/filters/TestChunkedInputFilter.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/coyote/http11/filters/TestChunkedInputFilter.java?rev=1005308&r1=1005307&r2=1005308&view=diff
==
--- 
tomcat/trunk/test/org/apache/coyote/http11/filters/TestChunkedInputFilter.java 
(original)
+++ 
tomcat/trunk/test/org/apache/coyote/http11/filters/TestChunkedInputFilter.java 
Thu Oct  7 00:50:28 2010
@@ -1,3 +1,20 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
 package org.apache.coyote.http11.filters;
 
 import java.io.IOException;



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1005309 - in /tomcat/trunk/test/org/apache/catalina/servlets: TestDefaultServlet.java TestWebdavServlet.java

2010-10-06 Thread timw
Author: timw
Date: Thu Oct  7 00:53:21 2010
New Revision: 1005309

URL: http://svn.apache.org/viewvc?rev=1005309&view=rev
Log:
Setting native line encoding.
No functional change

Modified:
tomcat/trunk/test/org/apache/catalina/servlets/TestDefaultServlet.java   
(props changed)
tomcat/trunk/test/org/apache/catalina/servlets/TestWebdavServlet.java   
(props changed)

Propchange: 
tomcat/trunk/test/org/apache/catalina/servlets/TestDefaultServlet.java
--
svn:eol-style = native

Propchange: 
tomcat/trunk/test/org/apache/catalina/servlets/TestWebdavServlet.java
--
svn:eol-style = native



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1005722 - /tomcat/trunk/webapps/docs/default-servlet.xml

2010-10-08 Thread timw
Author: timw
Date: Fri Oct  8 08:11:24 2010
New Revision: 1005722

URL: http://svn.apache.org/viewvc?rev=1005722&view=rev
Log:
Minor fixes to DefaultServlet docs

Modified:
tomcat/trunk/webapps/docs/default-servlet.xml

Modified: tomcat/trunk/webapps/docs/default-servlet.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/default-servlet.xml?rev=1005722&r1=1005721&r2=1005722&view=diff
==
--- tomcat/trunk/webapps/docs/default-servlet.xml (original)
+++ tomcat/trunk/webapps/docs/default-servlet.xml Fri Oct  8 08:11:24 2010
@@ -54,7 +54,7 @@ By default here is it's declaration:
 </init-param>
 <init-param>
 <param-name>listings</param-name>
-<param-value>true</param-value>
+<param-value>false</param-value>
 </init-param>
 <load-on-startup>1</load-on-startup>
 </servlet>
@@ -69,7 +69,7 @@ By default here is it's declaration:
 
 
 So by default, the default servlet is loaded at webapp startup and
-directory listings are enabled and debugging is turned off.
+directory listings are disabled and debugging is turned off.
 
 
 
@@ -81,7 +81,7 @@ The DefaultServlet allows the following 
 
 Debugging level. It is not very useful unless you are a tomcat
 developer. As
-of this writing, useful values are 0, 1, 11, 1000.
+of this writing, useful values are 0, 1, 11, 1000. [0]
 
   
   
@@ -89,7 +89,7 @@ The DefaultServlet allows the following 
 
 If no welcome file is present, can a directory listing be
 shown?
-value may be true or false
+value may be true or false [false]
 
 Welcome files are part of the servlet api.
 
@@ -103,7 +103,7 @@ The DefaultServlet allows the following 
 
 If a directory listing is presented, a readme file may also
 be presented with the listing. This file is inserted as is
-so it may contain HTML. default value is null
+so it may contain HTML.
 
   
   



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1021910 - /tomcat/tc6.0.x/trunk/STATUS.txt

2010-10-12 Thread timw
Author: timw
Date: Tue Oct 12 20:11:02 2010
New Revision: 1021910

URL: http://svn.apache.org/viewvc?rev=1021910&view=rev
Log:
Some backport votes.

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1021910&r1=1021909&r2=1021910&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Oct 12 20:11:02 2010
@@ -207,6 +207,7 @@ PATCHES PROPOSED TO BACKPORT:
   +1: timw
   -1:
kkolinko: See Re:r1004393 on dev@
+timw: fixed in http://svn.apache.org/viewvc?rev=1004912&view=rev
 
 * Backport all JRE leak prevention listener changes to tc6
   http://people.apache.org/~markt/patches/2010-10-05-leak-preotection-tc6.patch
@@ -250,20 +251,21 @@ PATCHES PROPOSED TO BACKPORT:
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49972
   Potential thread safety issues in FastHttpDateFormat
   http://svn.apache.org/viewvc?rev=1005452&view=rev
-  +1: markt, kkolinko
+  +1: markt, kkolinko, timw
   -1:
+  timw: Minor issue: the synchronized (parseCache) in parseDate() is probably 
unnecessary
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49986
   Thread safety for JSP reload.
   http://svn.apache.org/viewvc?rev=1005467&view=rev (timw)
-  +1: markt, kfujino, kkolinko
+  +1: markt, kfujino, kkolinko, timw
   -1:
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49987
   Thread safety issue with population of servlet context initialization
   parameters.
   http://svn.apache.org/viewvc?rev=1005647&view=rev
-  +1: markt, kfujino, kkolinko
+  +1: markt, kfujino, kkolinko, timw
   -1:
 
   Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50066



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1022414 - /tomcat/tc6.0.x/trunk/STATUS.txt

2010-10-14 Thread timw
Author: timw
Date: Thu Oct 14 08:30:41 2010
New Revision: 1022414

URL: http://svn.apache.org/viewvc?rev=1022414&view=rev
Log:
More backport votes.

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1022414&r1=1022413&r2=1022414&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Thu Oct 14 08:30:41 2010
@@ -251,19 +251,19 @@ PATCHES PROPOSED TO BACKPORT:
   Compile recursive tag file if it depends on a JAR. Patch provided by Sylvain
   Laurent.
   https://issues.apache.org/bugzilla/attachment.cgi?id=26149
-  +1: markt, kkolinko
+  +1: markt, kkolinko, timw
   -1:
 
 * Avoid unnecessary cast
   http://svn.apache.org/viewvc?rev=1022134&view=rev
-  +1: markt, kkolinko, rjung
+  +1: markt, kkolinko, rjung, timw
   -1:
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49428
   Add a work-around for the known namespace issues for some Microsoft WebDAV
   clients. Based on the patch provided by Panagiotis Astithas.
   http://svn.apache.org/viewvc?rev=1022120&view=rev
-  +1: kkolinko, markt
+  +1: kkolinko, markt, timw
   -1:
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50072



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1022418 - /tomcat/tc5.5.x/trunk/STATUS.txt

2010-10-14 Thread timw
Author: timw
Date: Thu Oct 14 08:38:37 2010
New Revision: 1022418

URL: http://svn.apache.org/viewvc?rev=1022418&view=rev
Log:
More backport votes.

Modified:
tomcat/tc5.5.x/trunk/STATUS.txt

Modified: tomcat/tc5.5.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/STATUS.txt?rev=1022418&r1=1022417&r2=1022418&view=diff
==
--- tomcat/tc5.5.x/trunk/STATUS.txt (original)
+++ tomcat/tc5.5.x/trunk/STATUS.txt Thu Oct 14 08:38:37 2010
@@ -58,7 +58,7 @@ PATCHES PROPOSED TO BACKPORT:
 for channelSocket.maxPort
   +1: kkolinko, markt
   -1:
-  -0: rjung, jim
+  -0: rjung, jim, timw
   rjung: Should we really change default behaviour for a mature version?
   kkolinko: (I think that hardly anyone uses that feature, and if it is needed,
   one can reenable it now by setting the maxPort attribute.
@@ -66,15 +66,18 @@ PATCHES PROPOSED TO BACKPORT:
   -- see attachment 25657 in BZ 49521, but I do not think that it is worth it.)
   jim: Also not comfortable with such a change this late in the game
regarding default behavior of a stable branch.
+  timw: This caused major pain embedding 5.5 (so I'm sorely tempted to +1)
+, but moving to 6.0 is a decent soln.
+Probably not worth changing this late in the evolution of 5.5.
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49935
   Handle compilation of recursive tag files. Port fix from tc6. 
   http://people.apache.org/~markt/patches/2010-09-27-bug49935-tc5.patch
-  +1: markt, kkolinko
+  +1: markt, kkolinko, timw
   -1:
 
 * Avoid unnecessary cast
   http://svn.apache.org/viewvc?rev=1022134&view=rev
-  +1: markt, kkolinko, rjung
+  +1: markt, kkolinko, rjung, timw
   -1:
   



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



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

2010-10-21 Thread timw
Author: timw
Date: Thu Oct 21 10:52:06 2010
New Revision: 1025936

URL: http://svn.apache.org/viewvc?rev=1025936&view=rev
Log:
Fixing build for VS 2005 with Apache 2.0
The Apache 2.0 apr.h includes  but doesn't include , so 
we have to explicitly include it.

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

Modified: tomcat/jk/trunk/native/common/jk_global.h
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/native/common/jk_global.h?rev=1025936&r1=1025935&r2=1025936&view=diff
==
--- tomcat/jk/trunk/native/common/jk_global.h (original)
+++ tomcat/jk/trunk/native/common/jk_global.h Thu Oct 21 10:52:06 2010
@@ -117,7 +117,6 @@ extern char *strdup(const char *str);
 #include 
 #include 
 #include 
-#include 
 #endif /* _WINDOWS_ */
 #ifdef _WINDOWS_
 #ifndef SIO_RCVALL
@@ -127,6 +126,7 @@ extern char *strdup(const char *str);
 #include 
 #include 
 #include 
+#include 
 #else /* WIN32 */
 #include 
 #if defined(NETWARE) && defined(__NOVELL_LIBC__)
@@ -396,3 +396,4 @@ typedef int jk_sock_t;
 #endif  /* __cplusplus */
 
 #endif  /* JK_GLOBAL_H */
+



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1040059 - /tomcat/jk/trunk/native/iis/jk_isapi_plugin.c

2010-11-29 Thread timw
Author: timw
Date: Mon Nov 29 10:42:15 2010
New Revision: 1040059

URL: http://svn.apache.org/viewvc?rev=1040059&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50363
Handle 204, 205 and 304 responses with empty message bodies correctly (by not 
chunk encoding the body).

Modified:
tomcat/jk/trunk/native/iis/jk_isapi_plugin.c

Modified: tomcat/jk/trunk/native/iis/jk_isapi_plugin.c
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/native/iis/jk_isapi_plugin.c?rev=1040059&r1=1040058&r2=1040059&view=diff
==
--- tomcat/jk/trunk/native/iis/jk_isapi_plugin.c (original)
+++ tomcat/jk/trunk/native/iis/jk_isapi_plugin.c Mon Nov 29 10:42:15 2010
@@ -993,10 +993,19 @@ static int JK_METHOD start_response(jk_w
 len_of_headers += 4;   /* extra for colon, space and crlf */
 }
 
+/*
+ * Exclude status codes that MUST NOT include message bodies
+ */
+if ((status == 204) || (status == 205) || (status == 304)) {
+p->chunk_content = JK_FALSE;
+/* Keep alive is still possible */
+if (JK_IS_DEBUG_LEVEL(logger))
+jk_log(logger, JK_LOG_DEBUG, "Response status %d implies 
no message body", status );
+}
 if (p->chunk_content) {
 for (i = 0; i < num_of_headers; i++) {
 /* Check the downstream response to see whether
- * it's appropriate the chunk the response content
+ * it's appropriate to chunk the response content
  * and whether it supports keeping the connection open.
 
  * This implements the rules for HTTP/1.1 message length 
determination



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



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

2010-11-29 Thread timw
Author: timw
Date: Mon Nov 29 10:47:46 2010
New Revision: 1040061

URL: http://svn.apache.org/viewvc?rev=1040061&view=rev
Log:
Changelog for https://issues.apache.org/bugzilla/show_bug.cgi?id=50363

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

Modified: tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml?rev=1040061&r1=1040060&r2=1040061&view=diff
==
--- tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml Mon Nov 29 10:47:46 2010
@@ -49,6 +49,10 @@
 multiple occurances of the route separator character '.' in
 the session id. (rjung)
   
+  
+50363: IIS: Prevent chunk encoding of empty message
+   bodies for 204, 205 and 304 responses. (timw)
+  
 
   
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1088925 - in /tomcat/trunk/webapps/docs/config: ajp.xml http.xml

2011-04-05 Thread timw
Author: timw
Date: Tue Apr  5 08:48:30 2011
New Revision: 1088925

URL: http://svn.apache.org/viewvc?rev=1088925&view=rev
Log:
Clarifying that pollTime parameter is in microseconds, and correcting the ms 
equivalent for HTTP connector use of it.

Modified:
tomcat/trunk/webapps/docs/config/ajp.xml
tomcat/trunk/webapps/docs/config/http.xml

Modified: tomcat/trunk/webapps/docs/config/ajp.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/ajp.xml?rev=1088925&r1=1088924&r2=1088925&view=diff
==
--- tomcat/trunk/webapps/docs/config/ajp.xml (original)
+++ tomcat/trunk/webapps/docs/config/ajp.xml Tue Apr  5 08:48:30 2011
@@ -457,9 +457,10 @@
   
 
   
-Duration of a poll call. Lowering this value will slightly decrease
-latency of connections being kept alive in some cases, but will use 
more
-CPU as more poll calls are being made. The default value is 2000 (2ms).
+Duration of a poll call in microseconds. Lowering this value will
+slightly decrease latency of connections being kept alive in some cases
+, but will use more CPU as more poll calls are being made. The default
+value is 2000 (2ms).
 
 
 

Modified: tomcat/trunk/webapps/docs/config/http.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/http.xml?rev=1088925&r1=1088924&r2=1088925&view=diff
==
--- tomcat/trunk/webapps/docs/config/http.xml (original)
+++ tomcat/trunk/webapps/docs/config/http.xml Tue Apr  5 08:48:30 2011
@@ -736,9 +736,9 @@
   
 
   
-Duration of a poll call. Lowering this value will slightly decrease
-latency of connections being kept alive in some cases, but will use 
more
-CPU as more poll calls are being made. The default value is 2000 (5ms).
+Duration of a poll call in microseconds. Lowering this value will 
slightly
+decrease latency of connections being kept alive in some cases, but 
will use
+more CPU as more poll calls are being made. The default value is 2000 
(2ms).
 
   
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1090958 - /tomcat/jk/trunk/native/iis/jk_isapi_plugin.c

2011-04-11 Thread timw
Author: timw
Date: Mon Apr 11 07:49:28 2011
New Revision: 1090958

URL: http://svn.apache.org/viewvc?rev=1090958&view=rev
Log:
Some debug logging and comments for transfer-encoding: chunked requests

Modified:
tomcat/jk/trunk/native/iis/jk_isapi_plugin.c

Modified: tomcat/jk/trunk/native/iis/jk_isapi_plugin.c
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/native/iis/jk_isapi_plugin.c?rev=1090958&r1=1090957&r2=1090958&view=diff
==
--- tomcat/jk/trunk/native/iis/jk_isapi_plugin.c (original)
+++ tomcat/jk/trunk/native/iis/jk_isapi_plugin.c Mon Apr 11 07:49:28 2011
@@ -1180,6 +1180,8 @@ static int JK_METHOD iis_read(jk_ws_serv
"Attempting to read %d bytes from client", l);
 }
 if (p->lpEcb->ReadClient(p->lpEcb->ConnID, buf, (LPDWORD)&l)) {
+/* ReadClient will succeed with dwSize == 0 for last chunk 
+   if request chunk encoded */
 *a += l;
 }
 else {
@@ -3024,8 +3026,12 @@ static int init_ws_service(isapi_private
  "HTTP_TRANSFER_ENCODING",
  temp_buf,
  (DWORD)sizeof(temp_buf))) {
-if (strcasecmp(temp_buf, TRANSFER_ENCODING_CHUNKED_VALUE) == 0)
+if (strcasecmp(temp_buf, TRANSFER_ENCODING_CHUNKED_VALUE) == 0) {
 s->is_chunked = JK_TRUE;
+if (JK_IS_DEBUG_LEVEL(logger)) {
+jk_log(logger, JK_LOG_DEBUG, "Request is Transfer-Encoding: 
chunked");
+}
+}
 else {
 /* XXX: What to do with non chunked T-E ?
  */
@@ -3277,6 +3283,10 @@ static int init_ws_service(isapi_private
 
 if (real_header) {
 i++;
+if (JK_IS_DEBUG_LEVEL(logger)) {
+jk_log(logger, JK_LOG_DEBUG, "Forwarding request 
header %s : %s",
+   s->headers_names[i], s->headers_values[i]);
+}
 }
 }
 /* Add a content-length = 0 header if needed.



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1090965 - /tomcat/jk/trunk/native/iis/jk_isapi_plugin.c

2011-04-11 Thread timw
Author: timw
Date: Mon Apr 11 08:03:18 2011
New Revision: 1090965

URL: http://svn.apache.org/viewvc?rev=1090965&view=rev
Log:
Fix header processing when ISAPI Redirector is used in extension only mode 
(legacy).
Redirector headers are not present when HttpFilterProc is bypassed, but the 
code assumes they are.
Fixes https://issues.apache.org/bugzilla/show_bug.cgi?id=47679

Modified:
tomcat/jk/trunk/native/iis/jk_isapi_plugin.c

Modified: tomcat/jk/trunk/native/iis/jk_isapi_plugin.c
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/native/iis/jk_isapi_plugin.c?rev=1090965&r1=1090964&r2=1090965&view=diff
==
--- tomcat/jk/trunk/native/iis/jk_isapi_plugin.c (original)
+++ tomcat/jk/trunk/native/iis/jk_isapi_plugin.c Mon Apr 11 08:03:18 2011
@@ -3180,11 +3180,6 @@ static int init_ws_service(isapi_private
 need_content_length_header = TRUE;
 }
 
-cnt -= 3;   /* For our three special headers:
- * HTTP_TOMCATURI_
- * HTTP_TOMCATWORKER_
- * HTTP_TOMCATWORKERIDX_
- */
 /* allocate an extra header slot in case we need to add a 
content-length header */
 s->headers_names =
 jk_pool_alloc(&private_data->p, (cnt + 1) * sizeof(char *));
@@ -3206,15 +3201,9 @@ static int init_ws_service(isapi_private
 
 if (!strnicmp(tmp, URI_HEADER_NAME, strlen(URI_HEADER_NAME))
 || !strnicmp(tmp, WORKER_HEADER_NAME, 
strlen(WORKER_HEADER_NAME))
-|| !strnicmp(tmp, WORKER_HEADER_INDEX, 
strlen(WORKER_HEADER_INDEX))) {
+|| !strnicmp(tmp, WORKER_HEADER_INDEX, 
strlen(WORKER_HEADER_INDEX))
+|| !strnicmp(tmp, QUERY_HEADER_NAME, 
strlen(QUERY_HEADER_NAME))) {
 /* Skip redirector headers */
-real_header = JK_FALSE;
-}
-else if (!strnicmp(tmp, QUERY_HEADER_NAME,
-   strlen(QUERY_HEADER_NAME))) {
-/* HTTP_TOMCATQUERY_ was supplied,
- * remove it from the count and skip
- */
 cnt--;
 real_header = JK_FALSE;
 }



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1090973 - /tomcat/jk/trunk/native/iis/jk_isapi_plugin.c

2011-04-11 Thread timw
Author: timw
Date: Mon Apr 11 08:23:46 2011
New Revision: 1090973

URL: http://svn.apache.org/viewvc?rev=1090973&view=rev
Log:
Suppressing sending of Content-Length header at all times that it shouldn't be 
sent (Content-Length > 4GB and Transfer-Encoding:chunked).
IIS appears to provide a Content-Length header under some circumstances when 
the chunk encoded request can be entirely decoded into the available buffer.
Fixes https://issues.apache.org/bugzilla/show_bug.cgi?id=50975

Modified:
tomcat/jk/trunk/native/iis/jk_isapi_plugin.c

Modified: tomcat/jk/trunk/native/iis/jk_isapi_plugin.c
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/native/iis/jk_isapi_plugin.c?rev=1090973&r1=1090972&r2=1090973&view=diff
==
--- tomcat/jk/trunk/native/iis/jk_isapi_plugin.c (original)
+++ tomcat/jk/trunk/native/iis/jk_isapi_plugin.c Mon Apr 11 08:23:46 2011
@@ -3209,22 +3209,27 @@ static int init_ws_service(isapi_private
 }
 else if (!strnicmp(tmp, CONTENT_LENGTH,
sizeof(CONTENT_LENGTH) - 1)) {
-if (need_content_length_header) {
-need_content_length_header = FALSE;
-/* If the content-length is unknown
- * or larger then 4Gb do not send it.
- */
-if (unknown_content_length || s->is_chunked) {
-if (JK_IS_DEBUG_LEVEL(logger)) {
-jk_log(logger, JK_LOG_DEBUG,
-   "Header Content-Length is %s",
-   s->is_chunked ? "chunked" : "unknown");
-}
-real_header = JK_FALSE;
+need_content_length_header = FALSE;
+
+/* If the content-length is unknown
+ * or larger then 4Gb do not send it.
+ * IIS can also create a synthetic Content-Length header 
to make
+ * lpcbTotalBytes and the CONTENT_LENGTH server variable 
agree
+ * on small requests where the entire chunk encoded 
message is
+ * read into the available buffer.
+ */
+if (unknown_content_length || s->is_chunked) {
+if (JK_IS_DEBUG_LEVEL(logger)) {
+jk_log(logger, JK_LOG_DEBUG,
+   "Disregarding Content-Length in request - 
content is %s",
+   s->is_chunked ? "chunked" : "unknown 
length");
 }
+cnt--;
+real_header = JK_FALSE;
 }
-if (real_header)
+else {
 s->headers_names[i] = tmp;
+}
 }
 else if (!strnicmp(tmp, TOMCAT_TRANSLATE_HEADER_NAME,
strlen(TOMCAT_TRANSLATE_HEADER_NAME))) {



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1090984 - /tomcat/jk/trunk/native/iis/jk_isapi_plugin.c

2011-04-11 Thread timw
Author: timw
Date: Mon Apr 11 09:13:47 2011
New Revision: 1090984

URL: http://svn.apache.org/viewvc?rev=1090984&view=rev
Log:
Fixing debug logging for forwarded headers to not crash, and to include 
explicit Content-Length: 0 added for AJP13.

Modified:
tomcat/jk/trunk/native/iis/jk_isapi_plugin.c

Modified: tomcat/jk/trunk/native/iis/jk_isapi_plugin.c
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/native/iis/jk_isapi_plugin.c?rev=1090984&r1=1090983&r2=1090984&view=diff
==
--- tomcat/jk/trunk/native/iis/jk_isapi_plugin.c (original)
+++ tomcat/jk/trunk/native/iis/jk_isapi_plugin.c Mon Apr 11 09:13:47 2011
@@ -3276,11 +3276,11 @@ static int init_ws_service(isapi_private
 }
 
 if (real_header) {
-i++;
 if (JK_IS_DEBUG_LEVEL(logger)) {
 jk_log(logger, JK_LOG_DEBUG, "Forwarding request 
header %s : %s",
s->headers_names[i], s->headers_values[i]);
 }
+i++;
 }
 }
 /* Add a content-length = 0 header if needed.
@@ -3288,6 +3288,9 @@ static int init_ws_service(isapi_private
  * but non-zero length body.
  */
 if (need_content_length_header) {
+if (JK_IS_DEBUG_LEVEL(logger)) {
+jk_log(logger, JK_LOG_DEBUG, "Incoming request needs 
explicit Content-Length: 0 in AJP13");
+}
 s->headers_names[cnt] = "Content-Length";
 s->headers_values[cnt] = "0";
 cnt++;



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



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

2011-04-11 Thread timw
Author: timw
Date: Mon Apr 11 09:51:55 2011
New Revision: 1090995

URL: http://svn.apache.org/viewvc?rev=1090995&view=rev
Log:
Updating changelog with fixes for 47679 and 50975

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

Modified: tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml?rev=1090995&r1=1090994&r2=1090995&view=diff
==
--- tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml Mon Apr 11 09:51:55 2011
@@ -70,6 +70,18 @@
 50339: Fix whitespace trimming when parsing attribute
 lists. (rjung)
   
+  
+50975: IIS: Fix hanging of Transfer-Encoding: chunked
+requests when Content-Length header is present in request as well.
+Also addresses situation where IIS appears to create a Content-Length
+header for a small chunk encoded request when none was present in the
+original request. (timw)
+  
+  
+47679: IIS: stop truncation of request headers when
+ISAPI redirector used as an extension without the corresponding
+filter installed. (timw)
+  
 
   
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1124474 - /tomcat/jk/trunk/native/common/jk_connect.c

2011-05-18 Thread timw
Author: timw
Date: Thu May 19 00:15:59 2011
New Revision: 1124474

URL: http://svn.apache.org/viewvc?rev=1124474&view=rev
Log:
https://issues.apache.org/bugzilla/show_bug.cgi?id=50839

Cap the lingering bytes read when shutting down an AJP socket at 32k to prevent 
CPU spikes reading very large response bodies when a client aborts.
Also reduce the total linger time to 2s by default.

Modified:
tomcat/jk/trunk/native/common/jk_connect.c

Modified: tomcat/jk/trunk/native/common/jk_connect.c
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/native/common/jk_connect.c?rev=1124474&r1=1124473&r2=1124474&view=diff
==
--- tomcat/jk/trunk/native/common/jk_connect.c (original)
+++ tomcat/jk/trunk/native/common/jk_connect.c Thu May 19 00:15:59 2011
@@ -672,9 +672,14 @@ int jk_close_socket(jk_sock_t sd, jk_log
 }
 
 #ifndef MAX_SECS_TO_LINGER
-#define MAX_SECS_TO_LINGER 30
+#define MAX_SECS_TO_LINGER 2
+#endif
+#define MS_TO_LINGER  500
+#define MS_TO_LINGER_LAST 2
+
+#ifndef MAX_LINGER_BYTES
+#define MAX_LINGER_BYTES 32768
 #endif
-#define SECONDS_TO_LINGER  2
 
 #ifndef SHUT_WR
 #ifdef SD_SEND
@@ -710,7 +715,7 @@ int jk_shutdown_socket(jk_sock_t sd, jk_
 int rd = 0;
 int rp = 0;
 int save_errno;
-int timeout = SECONDS_TO_LINGER * 1000;
+int timeout = MS_TO_LINGER;
 time_t start = time(NULL);
 
 JK_TRACE_ENTER(l);
@@ -741,6 +746,7 @@ int jk_shutdown_socket(jk_sock_t sd, jk_
 }
 
 do {
+rp = 0;
 if (jk_is_input_event(sd, timeout, l)) {
 /* Do a restartable read on the socket
  * draining out all the data currently in the socket buffer.
@@ -772,11 +778,10 @@ int jk_shutdown_socket(jk_sock_t sd, jk_
 }
 rd += rp;
 if (rp < sizeof(dummy)) {
-if (timeout > SECONDS_TO_LINGER) {
-/* Try once again with 1000 times smaller timeout
- * In our case 2 msec.
- */
-timeout = SECONDS_TO_LINGER;
+if (timeout > MS_TO_LINGER_LAST) {
+/* Try one last time with a short timeout 
+*/
+timeout = MS_TO_LINGER_LAST;
 continue;
 }
 /* We have read less then size of buffer
@@ -800,8 +805,8 @@ int jk_shutdown_socket(jk_sock_t sd, jk_
 shutdown(sd, SHUT_RD);
 break;
 }
-timeout = SECONDS_TO_LINGER * 1000;
-} while (difftime(time(NULL), start) < MAX_SECS_TO_LINGER);
+timeout = MS_TO_LINGER;
+} while ((rd < MAX_LINGER_BYTES) && (difftime(time(NULL), start) < 
MAX_SECS_TO_LINGER));
 
 rc = jk_close_socket(sd, l);
 if (JK_IS_DEBUG_LEVEL(l))



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



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

2011-05-18 Thread timw
Author: timw
Date: Thu May 19 00:20:25 2011
New Revision: 1124476

URL: http://svn.apache.org/viewvc?rev=1124476&view=rev
Log:
Updating changelog for bug #50839

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

Modified: tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml?rev=1124476&r1=1124475&r2=1124476&view=diff
==
--- tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml Thu May 19 00:20:25 2011
@@ -44,6 +44,12 @@
   
   
 
+  
+50839: Cap the lingering bytes that will be read
+when shutting down an AJP socket at 32k to prevent CPU spikes
+in the web server when a client aborts on a large response body.
+Also reduce total linger time to 2s.(timw)
+  
   
 Docs: Improve load balancer documentation. (rjung)
   



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1125651 - /tomcat/jk/trunk/native/common/jk_connect.c

2011-05-21 Thread timw
Author: timw
Date: Sat May 21 08:57:48 2011
New Revision: 1125651

URL: http://svn.apache.org/viewvc?rev=1125651&view=rev
Log:
Switching read byte counters to unsigned types to ensure we don't get int 
wrapping when counting the bytes read.
Previously MAX_LINGER_BYTES (32768) was > INT_MAX.

Modified:
tomcat/jk/trunk/native/common/jk_connect.c

Modified: tomcat/jk/trunk/native/common/jk_connect.c
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/native/common/jk_connect.c?rev=1125651&r1=1125650&r2=1125651&view=diff
==
--- tomcat/jk/trunk/native/common/jk_connect.c (original)
+++ tomcat/jk/trunk/native/common/jk_connect.c Sat May 21 08:57:48 2011
@@ -712,8 +712,8 @@ int jk_shutdown_socket(jk_sock_t sd, jk_
 char buf[64];
 char *sb = NULL;
 int rc = 0;
-int rd = 0;
-int rp = 0;
+size_t rd = 0;
+size_t rp = 0;
 int save_errno;
 int timeout = MS_TO_LINGER;
 time_t start = time(NULL);



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1125656 - in /tomcat/jk/trunk/native/common: jk_ajp_common.c jk_ajp_common.h

2011-05-21 Thread timw
Author: timw
Date: Sat May 21 10:00:54 2011
New Revision: 1125656

URL: http://svn.apache.org/viewvc?rev=1125656&view=rev
Log:
https://issues.apache.org/bugzilla/show_bug.cgi?id=41923

Propagate client abort to Tomcat by hard closing the AJP connection on an 
client write error, which will abort the AJP response write.

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

Modified: tomcat/jk/trunk/native/common/jk_ajp_common.c
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/native/common/jk_ajp_common.c?rev=1125656&r1=1125655&r2=1125656&view=diff
==
--- tomcat/jk/trunk/native/common/jk_ajp_common.c (original)
+++ tomcat/jk/trunk/native/common/jk_ajp_common.c Sat May 21 10:00:54 2011
@@ -780,7 +780,15 @@ static void ajp_abort_endpoint(ajp_endpo
 {
 JK_TRACE_ENTER(l);
 if (shutdown == JK_TRUE && IS_VALID_SOCKET(ae->sd)) {
-jk_shutdown_socket(ae->sd, l);
+if (ae->hard_close) {
+/* Force unclean connection close to communicate client write 
errors
+ * back to Tomcat by aborting AJP response writes.
+ */
+jk_close_socket(ae->sd, l);
+}
+else {
+jk_shutdown_socket(ae->sd, l);
+}
 }
 ae->worker->s->connected--;
 ae->sd = JK_INVALID_SOCKET;
@@ -2403,6 +2411,7 @@ static int JK_METHOD ajp_service(jk_endp
 
 p->left_bytes_to_send = s->content_length;
 p->reuse = JK_FALSE;
+p->hard_close = JK_FALSE;
 
 s->secret = aw->secret;
 
@@ -2479,6 +2488,7 @@ static int JK_METHOD ajp_service(jk_endp
 if (aw->recovery_opts & RECOVER_ABORT_IF_CLIENTERROR) {
 /* Mark the endpoint for shutdown */
 p->reuse = JK_FALSE;
+p->hard_close = JK_TRUE;
 }
 }
 else if (err == JK_FATAL_ERROR) {
@@ -2514,6 +2524,7 @@ static int JK_METHOD ajp_service(jk_endp
 if (aw->recovery_opts & RECOVER_ABORT_IF_CLIENTERROR) {
 /* Mark the endpoint for shutdown */
 p->reuse = JK_FALSE;
+p->hard_close = JK_TRUE;
 }
 }
 else if (err == JK_CLIENT_WR_ERROR) {
@@ -2528,6 +2539,7 @@ static int JK_METHOD ajp_service(jk_endp
 if (aw->recovery_opts & RECOVER_ABORT_IF_CLIENTERROR) {
 /* Mark the endpoint for shutdown */
 p->reuse = JK_FALSE;
+p->hard_close = JK_TRUE;
 }
 }
 else if (err == JK_FATAL_ERROR) {
@@ -2720,6 +2732,7 @@ static int ajp_create_endpoint_cache(ajp
 }
 p->ep_cache[i]->sd = JK_INVALID_SOCKET;
 p->ep_cache[i]->reuse = JK_FALSE;
+p->ep_cache[i]->hard_close = JK_FALSE;
 p->ep_cache[i]->last_access = now;
 jk_open_pool(&(p->ep_cache[i]->pool), p->ep_cache[i]->buf,
  sizeof(p->ep_cache[i]->buf));

Modified: tomcat/jk/trunk/native/common/jk_ajp_common.h
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/native/common/jk_ajp_common.h?rev=1125656&r1=1125655&r2=1125656&view=diff
==
--- tomcat/jk/trunk/native/common/jk_ajp_common.h (original)
+++ tomcat/jk/trunk/native/common/jk_ajp_common.h Sat May 21 10:00:54 2011
@@ -382,6 +382,10 @@ struct ajp_endpoint
 jk_sock_t sd;
 int reuse;
 
+/* Used with RECOVER_ABORT_IF_CLIENTERROR to hard abort
+   write of AJP response on client write errors */
+int hard_close;
+
 jk_endpoint_t endpoint;
 
 jk_uint64_t left_bytes_to_send;



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



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

2011-05-21 Thread timw
Author: timw
Date: Sat May 21 10:01:01 2011
New Revision: 1125657

URL: http://svn.apache.org/viewvc?rev=1125657&view=rev
Log:
Updating changelog to separate fix for 50839 from change to cap lingering byte 
reads.

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

Modified: tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml?rev=1125657&r1=1125656&r2=1125657&view=diff
==
--- tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml Sat May 21 10:01:01 2011
@@ -44,11 +44,17 @@
   
   
 
-  
-50839: Cap the lingering bytes that will be read
+  
+AJP: Cap the lingering bytes that will be read
 when shutting down an AJP socket at 32k to prevent CPU spikes
 in the web server when a client aborts on a large response body.
-Also reduce total linger time to 2s.(timw)
+Also reduce total linger time to 2s. (timw)
+  
+  
+50839AJP: Fix 30sec CPU spike due to incorrect counting
+of lingering bytes causing a busy loop when a client aborts
+connection during a response write.
+Fixes regression in 1.2.31. (timw)
   
   
 Docs: Improve load balancer documentation. (rjung)



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



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

2011-05-21 Thread timw
Author: timw
Date: Sat May 21 10:01:08 2011
New Revision: 1125658

URL: http://svn.apache.org/viewvc?rev=1125658&view=rev
Log:
Changelog for 41923.

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

Modified: tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml?rev=1125658&r1=1125657&r2=1125658&view=diff
==
--- tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml Sat May 21 10:01:08 2011
@@ -44,6 +44,11 @@
   
   
 
+  
+41923AJP: Close AJP connection to Tomcat on client write
+error when recovery_options 4 is specified, aborting the response
+write on the Tomcat side. (timw)
+  
   
 AJP: Cap the lingering bytes that will be read
 when shutting down an AJP socket at 32k to prevent CPU spikes



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1128217 - /tomcat/jk/trunk/KEYS

2011-05-27 Thread timw
Author: timw
Date: Fri May 27 09:48:27 2011
New Revision: 1128217

URL: http://svn.apache.org/viewvc?rev=1128217&view=rev
Log:
Adding code signing cert.

Modified:
tomcat/jk/trunk/KEYS

Modified: tomcat/jk/trunk/KEYS
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/KEYS?rev=1128217&r1=1128216&r2=1128217&view=diff
==
--- tomcat/jk/trunk/KEYS (original)
+++ tomcat/jk/trunk/KEYS Fri May 27 09:48:27 2011
@@ -867,3 +867,62 @@ LoMTx7HHlV7r6vCjPFWhID0Cg79QD5gQJSt4JC23
 eXv2QOIysccjtXa4KVF2vlD7e+RyeRNqTojGk/XP92TnUORBcH0=
 =tyrp
 -END PGP PUBLIC KEY BLOCK-
+pub   4096R/731FABEE 2011-05-27
+  Key fingerprint = 9BA4 4C26 2138 5CB9 66EB  A586 F72C 284D 731F ABEE
+uid  Tim Whittington (CODE SIGNING KEY) 
+sig 3731FABEE 2011-05-27  Tim Whittington (CODE SIGNING KEY) 

+sub   4096R/461B342D 2011-05-27
+sig  731FABEE 2011-05-27  Tim Whittington (CODE SIGNING KEY) 

+
+-BEGIN PGP PUBLIC KEY BLOCK-
+Version: GnuPG v1.4.11 (Darwin)
+
+mQINBE3fcdABEADmpbGMmnQiMc4biU+CIhV6EJ7lBaRzXzh4tJ4eITfw6IbImDRn
+0JHZNjeE5zXLeH0PQ0K8/bYzFhMGwQOgvZETV7LPVLid6F9LbvDnItcWyoiZ+HPG
+9SNdxIAsIVxchW6j/4NcIWaEwJks/+3vveBbRc1q0UgL5b72Yxpwwk3o6LMb08vJ
+wn0LuljqM/+MHc+/KuxO54jJZ2OwNbKr2cxsYwVCpj+vEF6wNh2s6v+5VLs7NimN
+UufiKVGcz6fceza3eYOS+0aLe4JXUPfmbad55x7H7wGMbfv+XLsBUKJ9Bz5nF3QD
+jLwGBId8/K51yXGqZUqwjzTkhIalJeZEMZuAxGkLXsYM47OH/BGPNvqfcX6X+17i
+9urz5go5kWQJJLGiBDVxiwpyrcZfrqc2I0DicLUsAbdyd6q6gkEcQKLCFmm9GTW8
+c0Bb/kqlfGnDcBBl3kwK8MvvTeEAq7mteZEEOu/aV+417qDx+dNzFIx/jVjkihnC
+O10vIXKmog8Dy36gNuJdnqsNuV8oGK4vPRFy80XajmYBl94xfR/ZsWWo7y66UGQr
+NsCrCC+DV/AlDMJE8fjoLKyTtGnu7U5keyiuUIPvDurbrn2JKGefRnlRAoXRWdiO
+nzO7vBbfOQ4g3pjUwuXqQTBzqHwnL9z8gX/MR0Wm5RU+B0ZielPkrt82YQARAQAB
+tDRUaW0gV2hpdHRpbmd0b24gKENPREUgU0lHTklORyBLRVkpIDx0aW13QGFwYWNo
+ZS5vcmc+iQI4BBMBAgAiBQJN33HQAhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIX
+gAAKCRD3LChNcx+r7gOgD/9DgtptXELyFxaazptqmNkjIp6X4JKjl1Kp99Aq2wwR
+4DdHBbZNN2qpQ+Q66klxWeJRbf3t2z/4oCkY3G9g+UB0NTgZBcBMl9c4sDxYzlC/
+B9GaHTByaXLWhqv5I6IAiiECiyxhkAVHVqDYjpg5voCD0ZcYSWX9IMZLGAlBU2fe
+/0g0QEaAV+4SSFsnp7xGaEwoFQd7VH9bS9Q8mdCPZf96Dz7S8XlSpm7Wc0Wvsd7z
+wXGqmBZVQ0w4mVhGWeaaRUKuVn5nDF6djI+Erg079Vrla6pcXfoBiIugLOUhvvmv
+Zb5yBi+RJ5CQAnb8ApKm1IXotUCq4GJ05SwDR7xvpS/s8BKIlXmY6h64q7sy66a1
+SdRtKL5dncVptknxVzyw3QjEMt9Q9v9W5kgeSabebjAztzPFRR9EBxWkcpL8lwml
+bTSlheb/+fsEiE0Hw6460xCLPtLFm2RnigdacQgSffhtEzZ5OB7aoXRG/M1McN1v
+zrjHxg8Vo7stPiGSSvWQKZJQFvWgFUbugoOum5GTNFJeHwlAyjBydkLJ0A/nwUgD
+efXMV8a65+LUAFVJuEgnOw2Ut68bU96KOSHbNaauErqiWZlcnJIOqD3wRxB3OtBc
+2lFL49n3bJ37k7CuhEZUAgU/cqN7meH0wo1aI4KOfo5PHm548qckLi4P/pAj8jHL
+0bkCDQRN33HQARAAzeAQNb4AfB9v4r3qrN3bwF01VdMpVTaQl3RaJKGbdO52f4gW
+8iIfR+Xc6ALeX/1ADsH6nyOuQ+gnTpf4Gr09Lf/EzcrJRN8okVFehjuaahWYdmbL
+rln3ZorzbLxHp52dvLS1EX9L1+MEgGuUxsN9fDJSuif6f7+E/a80Q/WEbQ3261lB
+f7GDSGvr3xz6M0OlTS08YgUeUsx33PQRHV1TU9RTSASsivy316u86gxMp+9PJ+6n
+m99iNvZB1VXpthG6ybgyxhheQv1o2SBAhJ3Ee6Neds1kPkLiKiAbGq9K9IApqC8X
+DYZ9FUYBT+CGm8KbU8QS10wJuIVIXRYuvNZBjjhZdbGIGJ2CGIn9cO8RmzDVVu0A
+Ch9gCGh12Rsr4uZkY9tJ6/+s/ipHuft1AnPETbrET2Wm1rrUZ8sFykP6cOwP0gen
+MNEjTAHnLE0x2yAjFfvjz/y0H+gMQqcbmyGvAgY0URl41+5+yxtLVJIcuszut77s
+DV7sM8CoXz2I8/K+R/lB5p8d6AriAV+iYqzATmyfFD27GVHp18wTuyusfwy8301q
+CqjZdR5cXQHcp+/yCxz/I+PXx21QE4e3nY8YpC6PWFC/XPy7s6L71uNauqPi5WwG
+1CeYEwqd70Ds3aeVErYZxYg/kiInfFGnXjUplvz2goT3LQFWHFS5TN0sUqsAEQEA
+AYkCHwQYAQIACQUCTd9x0AIbDAAKCRD3LChNcx+r7jscEADgCt4SmzeEWuU1fZYx
+FsdnC3wLZUU57HnGMAQdxCzC6lMXNHUiS+y8of1TEYccjM8JK0zSTwnizhbQzOkh
+ICR/0tGz3qCOAZjv91YHs5RcLzeWxbor29my4VlQU6vqEwOEPwFz1b1Grp2rbwhL
+hot81tqv4PP/wn3ES/FIuTALZ3/hgunfGlO6FGZC20rtOJHd6DpX2ZPeYi2mfYom
+KF9N7F9q0WhYn0GvMyV5pqZ6Ui7N8egvw1gokUtO3D8lWnjZy1BmbizozyLmrG13
+xr280Juv7zM0Jy5YR01vsqfvClBbczBzoEnkRijMYVJgUj03dr5Cdn5HFRfA5wLD
+sNuSYKMTL/WWNQgIp24/MLxyYa4sVH9WMh9a7BbdRHJEjVR2HTA/lqrKVIfR6NwT
+6DhThBA7XxGbQ9nuBOjClTpRBXyCnFN+krmyhvVk3caVcQu/BbaZZXFEuKhJzbon
+YrQkfyvT/rQoM/ufLlIIPZgpKxP96a9zF/eyATiamAnU7idEHIZ0Drrj60vz4sPH
+A5Ty5GWKYSZa6suPaalqZ+7dpD/UWiNMzSX+YPLQUW9jH/k7zuJ9aZN4AmIkm30c
+YB5npZhfo59tF4uuvKvYKWghrF8wSwEE7F4cJAuqklo0TArBUd2WB0Wl8kAWtThf
+/PLn/VX9dZEFVPVbPapJpkNv8A==
+=Vxhw
+-END PGP PUBLIC KEY BLOCK-



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1128222 - /tomcat/trunk/KEYS

2011-05-27 Thread timw
Author: timw
Date: Fri May 27 09:55:42 2011
New Revision: 1128222

URL: http://svn.apache.org/viewvc?rev=1128222&view=rev
Log:
Adding code signing keys.

Modified:
tomcat/trunk/KEYS

Modified: tomcat/trunk/KEYS
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/KEYS?rev=1128222&r1=1128221&r2=1128222&view=diff
==
--- tomcat/trunk/KEYS (original)
+++ tomcat/trunk/KEYS Fri May 27 09:55:42 2011
@@ -464,3 +464,62 @@ e7sQDYEbvppSAJ9+i7TzCNvZ4PK/odiIWeZ61+KK
 Io8ZP0E=
 =xT1M
 -END PGP PUBLIC KEY BLOCK-
+pub   4096R/731FABEE 2011-05-27
+  Key fingerprint = 9BA4 4C26 2138 5CB9 66EB  A586 F72C 284D 731F ABEE
+uid  Tim Whittington (CODE SIGNING KEY) 
+sig 3731FABEE 2011-05-27  Tim Whittington (CODE SIGNING KEY) 

+sub   4096R/461B342D 2011-05-27
+sig  731FABEE 2011-05-27  Tim Whittington (CODE SIGNING KEY) 

+
+-BEGIN PGP PUBLIC KEY BLOCK-
+Version: GnuPG v1.4.11 (Darwin)
+
+mQINBE3fcdABEADmpbGMmnQiMc4biU+CIhV6EJ7lBaRzXzh4tJ4eITfw6IbImDRn
+0JHZNjeE5zXLeH0PQ0K8/bYzFhMGwQOgvZETV7LPVLid6F9LbvDnItcWyoiZ+HPG
+9SNdxIAsIVxchW6j/4NcIWaEwJks/+3vveBbRc1q0UgL5b72Yxpwwk3o6LMb08vJ
+wn0LuljqM/+MHc+/KuxO54jJZ2OwNbKr2cxsYwVCpj+vEF6wNh2s6v+5VLs7NimN
+UufiKVGcz6fceza3eYOS+0aLe4JXUPfmbad55x7H7wGMbfv+XLsBUKJ9Bz5nF3QD
+jLwGBId8/K51yXGqZUqwjzTkhIalJeZEMZuAxGkLXsYM47OH/BGPNvqfcX6X+17i
+9urz5go5kWQJJLGiBDVxiwpyrcZfrqc2I0DicLUsAbdyd6q6gkEcQKLCFmm9GTW8
+c0Bb/kqlfGnDcBBl3kwK8MvvTeEAq7mteZEEOu/aV+417qDx+dNzFIx/jVjkihnC
+O10vIXKmog8Dy36gNuJdnqsNuV8oGK4vPRFy80XajmYBl94xfR/ZsWWo7y66UGQr
+NsCrCC+DV/AlDMJE8fjoLKyTtGnu7U5keyiuUIPvDurbrn2JKGefRnlRAoXRWdiO
+nzO7vBbfOQ4g3pjUwuXqQTBzqHwnL9z8gX/MR0Wm5RU+B0ZielPkrt82YQARAQAB
+tDRUaW0gV2hpdHRpbmd0b24gKENPREUgU0lHTklORyBLRVkpIDx0aW13QGFwYWNo
+ZS5vcmc+iQI4BBMBAgAiBQJN33HQAhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIX
+gAAKCRD3LChNcx+r7gOgD/9DgtptXELyFxaazptqmNkjIp6X4JKjl1Kp99Aq2wwR
+4DdHBbZNN2qpQ+Q66klxWeJRbf3t2z/4oCkY3G9g+UB0NTgZBcBMl9c4sDxYzlC/
+B9GaHTByaXLWhqv5I6IAiiECiyxhkAVHVqDYjpg5voCD0ZcYSWX9IMZLGAlBU2fe
+/0g0QEaAV+4SSFsnp7xGaEwoFQd7VH9bS9Q8mdCPZf96Dz7S8XlSpm7Wc0Wvsd7z
+wXGqmBZVQ0w4mVhGWeaaRUKuVn5nDF6djI+Erg079Vrla6pcXfoBiIugLOUhvvmv
+Zb5yBi+RJ5CQAnb8ApKm1IXotUCq4GJ05SwDR7xvpS/s8BKIlXmY6h64q7sy66a1
+SdRtKL5dncVptknxVzyw3QjEMt9Q9v9W5kgeSabebjAztzPFRR9EBxWkcpL8lwml
+bTSlheb/+fsEiE0Hw6460xCLPtLFm2RnigdacQgSffhtEzZ5OB7aoXRG/M1McN1v
+zrjHxg8Vo7stPiGSSvWQKZJQFvWgFUbugoOum5GTNFJeHwlAyjBydkLJ0A/nwUgD
+efXMV8a65+LUAFVJuEgnOw2Ut68bU96KOSHbNaauErqiWZlcnJIOqD3wRxB3OtBc
+2lFL49n3bJ37k7CuhEZUAgU/cqN7meH0wo1aI4KOfo5PHm548qckLi4P/pAj8jHL
+0bkCDQRN33HQARAAzeAQNb4AfB9v4r3qrN3bwF01VdMpVTaQl3RaJKGbdO52f4gW
+8iIfR+Xc6ALeX/1ADsH6nyOuQ+gnTpf4Gr09Lf/EzcrJRN8okVFehjuaahWYdmbL
+rln3ZorzbLxHp52dvLS1EX9L1+MEgGuUxsN9fDJSuif6f7+E/a80Q/WEbQ3261lB
+f7GDSGvr3xz6M0OlTS08YgUeUsx33PQRHV1TU9RTSASsivy316u86gxMp+9PJ+6n
+m99iNvZB1VXpthG6ybgyxhheQv1o2SBAhJ3Ee6Neds1kPkLiKiAbGq9K9IApqC8X
+DYZ9FUYBT+CGm8KbU8QS10wJuIVIXRYuvNZBjjhZdbGIGJ2CGIn9cO8RmzDVVu0A
+Ch9gCGh12Rsr4uZkY9tJ6/+s/ipHuft1AnPETbrET2Wm1rrUZ8sFykP6cOwP0gen
+MNEjTAHnLE0x2yAjFfvjz/y0H+gMQqcbmyGvAgY0URl41+5+yxtLVJIcuszut77s
+DV7sM8CoXz2I8/K+R/lB5p8d6AriAV+iYqzATmyfFD27GVHp18wTuyusfwy8301q
+CqjZdR5cXQHcp+/yCxz/I+PXx21QE4e3nY8YpC6PWFC/XPy7s6L71uNauqPi5WwG
+1CeYEwqd70Ds3aeVErYZxYg/kiInfFGnXjUplvz2goT3LQFWHFS5TN0sUqsAEQEA
+AYkCHwQYAQIACQUCTd9x0AIbDAAKCRD3LChNcx+r7jscEADgCt4SmzeEWuU1fZYx
+FsdnC3wLZUU57HnGMAQdxCzC6lMXNHUiS+y8of1TEYccjM8JK0zSTwnizhbQzOkh
+ICR/0tGz3qCOAZjv91YHs5RcLzeWxbor29my4VlQU6vqEwOEPwFz1b1Grp2rbwhL
+hot81tqv4PP/wn3ES/FIuTALZ3/hgunfGlO6FGZC20rtOJHd6DpX2ZPeYi2mfYom
+KF9N7F9q0WhYn0GvMyV5pqZ6Ui7N8egvw1gokUtO3D8lWnjZy1BmbizozyLmrG13
+xr280Juv7zM0Jy5YR01vsqfvClBbczBzoEnkRijMYVJgUj03dr5Cdn5HFRfA5wLD
+sNuSYKMTL/WWNQgIp24/MLxyYa4sVH9WMh9a7BbdRHJEjVR2HTA/lqrKVIfR6NwT
+6DhThBA7XxGbQ9nuBOjClTpRBXyCnFN+krmyhvVk3caVcQu/BbaZZXFEuKhJzbon
+YrQkfyvT/rQoM/ufLlIIPZgpKxP96a9zF/eyATiamAnU7idEHIZ0Drrj60vz4sPH
+A5Ty5GWKYSZa6suPaalqZ+7dpD/UWiNMzSX+YPLQUW9jH/k7zuJ9aZN4AmIkm30c
+YB5npZhfo59tF4uuvKvYKWghrF8wSwEE7F4cJAuqklo0TArBUd2WB0Wl8kAWtThf
+/PLn/VX9dZEFVPVbPapJpkNv8A==
+=Vxhw
+-END PGP PUBLIC KEY BLOCK-



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1128570 - in /tomcat/jk/trunk/tools: jkrelease.sh signfile.sh

2011-05-28 Thread timw
Author: timw
Date: Sat May 28 08:46:59 2011
New Revision: 1128570

URL: http://svn.apache.org/viewvc?rev=1128570&view=rev
Log:
Adding ability to specify code signing key in release script, and failing 
release when tar fails (default BSD tar on OS X borks)

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

Modified: tomcat/jk/trunk/tools/jkrelease.sh
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/tools/jkrelease.sh?rev=1128570&r1=1128569&r2=1128570&view=diff
==
--- tomcat/jk/trunk/tools/jkrelease.sh (original)
+++ tomcat/jk/trunk/tools/jkrelease.sh Sat May 28 08:46:59 2011
@@ -54,6 +54,7 @@ usage() {
 echo "-T: package from trunk"
 echo "-d: package from local directory"
 echo "-p: GNU PG passphrrase used for signing"
+echo "-k: ID of GNU PG key to use for signing"
 }
 
 copy_files() {
@@ -72,14 +73,15 @@ copy_files() {
  MAIN ##
 
 conflict=0
-while getopts :v:t:r:b:d:p:Tf c
+while getopts :v:t:r:b:d:p:k:Tf c
 do
 case $c in
 v) version=$OPTARG;;
 t) tag=$OPTARG
conflict=$(($conflict+1));;
 r) revision=$OPTARG;;
-p) SIGN_OPTS="--passphrase=$OPTARG";;
+k) SIGN_OPTS="--default-key=$OPTARG $SIGN_OPTS";;
+p) SIGN_OPTS="--passphrase=$OPTARG $SIGN_OPTS";;
 b) branch=$OPTARG
conflict=$(($conflict+1));;
 T) trunk=trunk
@@ -306,7 +308,7 @@ fi
 cd ../../
 
 # Pack
-tar cfz ${JK_DIST}.tar.gz --owner="${JK_OWNER}" --group="${JK_GROUP}" 
${JK_DIST}
+tar cfz ${JK_DIST}.tar.gz --owner="${JK_OWNER}" --group="${JK_GROUP}" 
${JK_DIST} || exit 1
 perl ${JK_DIST}/tools/lineends.pl --cr ${JK_DIST}
 zip -9 -r ${JK_DIST}.zip ${JK_DIST}
 

Modified: tomcat/jk/trunk/tools/signfile.sh
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/tools/signfile.sh?rev=1128570&r1=1128569&r2=1128570&view=diff
==
--- tomcat/jk/trunk/tools/signfile.sh (original)
+++ tomcat/jk/trunk/tools/signfile.sh Sat May 28 08:46:59 2011
@@ -25,6 +25,10 @@ do
  ;;
 esac
 case "$o" in
+--default-key=*  )
+gpgopts="$gpgopts --default-key $a"
+shift
+;;
 --passphrase=*  )
 gpgopts="$gpgopts --passphrase $a"
 shift



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



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

2011-11-17 Thread timw
Author: timw
Date: Fri Nov 18 00:11:48 2011
New Revision: 1203433

URL: http://svn.apache.org/viewvc?rev=1203433&view=rev
Log:
Log errors loading uri worker map file.

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

Modified: tomcat/jk/trunk/native/common/jk_uri_worker_map.c
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/native/common/jk_uri_worker_map.c?rev=1203433&r1=1203432&r2=1203433&view=diff
==
--- tomcat/jk/trunk/native/common/jk_uri_worker_map.c (original)
+++ tomcat/jk/trunk/native/common/jk_uri_worker_map.c Fri Nov 18 00:11:48 2011
@@ -1225,6 +1225,8 @@ int uri_worker_map_load(jk_uri_worker_ma
 if (JK_IS_DEBUG_LEVEL(l))
 uri_worker_map_dump(uw_map, "after file load", l);
 rc = JK_TRUE;
+} else {
+jk_log(l, JK_LOG_ERROR, "Failed to load uri_worker_map file %s 
(errno=%d, err=%s).", uw_map->fname, errno, strerror(errno));
 }
 jk_map_free(&map);
 return rc;



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



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

2011-11-17 Thread timw
Author: timw
Date: Fri Nov 18 00:18:46 2011
New Revision: 1203436

URL: http://svn.apache.org/viewvc?rev=1203436&view=rev
Log:
Improve reporting of error loading workers file on IIS.

Modified:
tomcat/jk/trunk/native/iis/jk_isapi_plugin.c
tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml

Modified: tomcat/jk/trunk/native/iis/jk_isapi_plugin.c
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/native/iis/jk_isapi_plugin.c?rev=1203436&r1=1203435&r2=1203436&view=diff
==
--- tomcat/jk/trunk/native/iis/jk_isapi_plugin.c (original)
+++ tomcat/jk/trunk/native/iis/jk_isapi_plugin.c Fri Nov 18 00:18:46 2011
@@ -2842,7 +2842,7 @@ static int init_jk(char *serverName)
 }
 else {
 jk_log(logger, JK_LOG_EMERG,
-   "Unable to read worker file %s.", worker_file);
+   "Unable to read worker file %s. (errno=%d, err=%s)", 
worker_file, errno, strerror(errno));
 }
 if (rc != JK_TRUE) {
 jk_map_free(&workers_map);

Modified: tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml?rev=1203436&r1=1203435&r2=1203436&view=diff
==
--- tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml Fri Nov 18 00:18:46 2011
@@ -45,6 +45,10 @@
   
 
   
+Log error if unable to load URI workermap file, and improve logging
+of unreadable worker files on IIS. (timw)
+  
+  
 Remove deprecated JNI worker and build dependency on Java SDK. (mturk)
   
   



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1366267 - in /tomcat/jk/trunk: native/configure.in xdocs/miscellaneous/changelog.xml

2012-07-26 Thread timw
Author: timw
Date: Fri Jul 27 02:16:57 2012
New Revision: 1366267

URL: http://svn.apache.org/viewvc?rev=1366267&view=rev
Log:
Add --disable-sock-cloexec flag to configure that supresses use of SOCK_CLOEXEC 
so built modules will work on Linux kernels < 2.6.27.

Modified:
tomcat/jk/trunk/native/configure.in
tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml

Modified: tomcat/jk/trunk/native/configure.in
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/native/configure.in?rev=1366267&r1=1366266&r2=1366267&view=diff
==
--- tomcat/jk/trunk/native/configure.in (original)
+++ tomcat/jk/trunk/native/configure.in Fri Jul 27 02:16:57 2012
@@ -366,8 +366,15 @@ int main(void)
 )
 ])dnl
 
-dnl check for SOCK_CLOEXEC
-JK_CHECK_SOCKOPT(SOCK_CLOEXEC)
+AC_ARG_ENABLE(sock-cloexec,
+[AS_HELP_STRING([--disable-sock-cloexec],[Disable use of SOCK_CLOEXEC.
+This ensures the built module can be used on systems that do not support 
SOCK_CLOEXEC])],
+[
+],
+[
+   dnl check for SOCK_CLOEXEC
+   JK_CHECK_SOCKOPT(SOCK_CLOEXEC)
+])
 
 dnl check for poll.h header
 AC_CHECK_HEADERS(poll.h)

Modified: tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml?rev=1366267&r1=1366266&r2=1366267&view=diff
==
--- tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml Fri Jul 27 02:16:57 2012
@@ -47,6 +47,11 @@
   
 Fix status worker not updating parameters for all members. (mturk)
   
+  
+Add --disable-sock-cloexec to configure to disable use of SOCK_CLOEXEC
+(using FD_CLOEXEC + fnctl instead) so built modules will work with
+Linux kernels prior to 2.6.27. (timw)
+  
 
   
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1432751 - in /tomcat/trunk: java/org/apache/tomcat/util/net/ java/org/apache/tomcat/util/net/jsse/ java/org/apache/tomcat/util/net/jsse/res/ webapps/docs/config/

2013-01-13 Thread timw
Author: timw
Date: Sun Jan 13 22:04:31 2013
New Revision: 1432751

URL: http://svn.apache.org/viewvc?rev=1432751&view=rev
Log:
Fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=54406.

Make NIO connector use the same logic as BIO connector to prune specified 
ciphers and sslEnableProtocols to supported options.
Fix option pruning to not silently use defaults when no specified options are 
supported by SSL implementation.

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/SSLUtil.java
tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java

tomcat/trunk/java/org/apache/tomcat/util/net/jsse/res/LocalStrings.properties
tomcat/trunk/webapps/docs/config/http.xml

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1432751&r1=1432750&r2=1432751&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Sun Jan 13 
22:04:31 2013
@@ -261,7 +261,8 @@ public class NioEndpoint extends Abstrac
 private SSLContext sslContext = null;
 public SSLContext getSSLContext() { return sslContext;}
 public void setSSLContext(SSLContext c) { sslContext = c;}
-
+private String[] enabledCiphers;
+private String[] enabledProtocols;
 
 /**
  * Port in use.
@@ -284,16 +285,7 @@ public class NioEndpoint extends Abstrac
 
 @Override
 public String[] getCiphersUsed() {
-SSLContext sslContext = getSSLContext();
-if (sslContext != null) {
-SSLEngine engine = getSSLContext().createSSLEngine();
-if (getCiphersArray().length > 0) {
-engine.setEnabledCipherSuites(getCiphersArray());
-}
-return engine.getEnabledCipherSuites();
-} else {
-return new String[0];
-}
+return enabledCiphers;
 }
 
 
@@ -384,6 +376,9 @@ public class NioEndpoint extends Abstrac
 if (sessionContext != null) {
 sslUtil.configureSessionContext(sessionContext);
 }
+// Determine which cipher suites and protocols to enable
+enabledCiphers = sslUtil.getEnableableCiphers(sslContext);
+enabledProtocols = sslUtil.getEnableableProtocols(sslContext);
 }
 
 if (oomParachute>0) reclaimParachute(true);
@@ -589,8 +584,8 @@ public class NioEndpoint extends Abstrac
 engine.setWantClientAuth(true);
 }
 engine.setUseClientMode(false);
-if ( getCiphersArray().length > 0 ) 
engine.setEnabledCipherSuites(getCiphersArray());
-if ( getSslEnabledProtocolsArray().length > 0 ) 
engine.setEnabledProtocols(getSslEnabledProtocolsArray());
+engine.setEnabledCipherSuites(enabledCiphers);
+engine.setEnabledProtocols(enabledProtocols);
 
 handler.onCreateSSLEngine(engine);
 return engine;

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/SSLUtil.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/SSLUtil.java?rev=1432751&r1=1432750&r2=1432751&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/SSLUtil.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/SSLUtil.java Sun Jan 13 
22:04:31 2013
@@ -30,4 +30,33 @@ public interface SSLUtil {
 public TrustManager[] getTrustManagers() throws Exception;
 
 public void configureSessionContext(SSLSessionContext sslSessionContext);
+
+/**
+ * Determines the SSL cipher suites that can be enabled, based on the
+ * configuration of the endpoint and the ciphers supported by the SSL
+ * implementation.
+ *
+ * @param context An initialized context to obtain the supported ciphers 
from.
+ *
+ * @return Array of SSL cipher suites that may be enabled (which may be
+ * empty if none of the specified ciphers are supported), or
+ * the defaults for the underlying SSL implementation if 
+ * the endpoint configuration does not specify any ciphers.
+ */
+public String[] getEnableableCiphers(SSLContext context);
+   
+/**
+ * Determines the SSL protocol variants that can be enabled, based on the
+ * configuration of the endpoint and the ciphers supported by the SSL
+ * implementation.
+ *
+ * @param context An initialized context to obtain the supported protocols 
from.
+ *
+ * @return Array of SSL protocol variants that may be enabled (which may be
+ * empty if none of the specified protocols are supported), or
+ * the defaults 

svn commit: r1432753 - in /tomcat/tc7.0.x/trunk: java/org/apache/tomcat/util/net/ java/org/apache/tomcat/util/net/jsse/ java/org/apache/tomcat/util/net/jsse/res/ webapps/docs/ webapps/docs/config/

2013-01-13 Thread timw
Author: timw
Date: Sun Jan 13 22:08:14 2013
New Revision: 1432753

URL: http://svn.apache.org/viewvc?rev=1432753&view=rev
Log:
Merged revision 1432751 from tomcat/trunk:

Fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=54406.

Make NIO connector use the same logic as BIO connector to prune specified 
ciphers and sslEnableProtocols to supported options.
Fix option pruning to not silently use defaults when no specified options are 
supported by SSL implementation.

Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SSLUtil.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/jsse/res/LocalStrings.properties
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
tomcat/tc7.0.x/trunk/webapps/docs/config/http.xml

Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1432753&r1=1432752&r2=1432753&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Sun 
Jan 13 22:08:14 2013
@@ -388,6 +388,9 @@ public class NioEndpoint extends Abstrac
 public SSLContext getSSLContext() { return sslContext;}
 public void setSSLContext(SSLContext c) { sslContext = c;}
 
+private String[] enabledCiphers;
+private String[] enabledProtocols;
+
 
 /**
  * Port in use.
@@ -495,6 +498,9 @@ public class NioEndpoint extends Abstrac
 if (sessionContext != null) {
 sslUtil.configureSessionContext(sessionContext);
 }
+// Determine which cipher suites and protocols to enable
+enabledCiphers = sslUtil.getEnableableCiphers(sslContext);
+enabledProtocols = sslUtil.getEnableableProtocols(sslContext);
 }
 
 if (oomParachute>0) reclaimParachute(true);
@@ -700,8 +706,8 @@ public class NioEndpoint extends Abstrac
 engine.setWantClientAuth(true);
 }
 engine.setUseClientMode(false);
-if ( getCiphersArray().length > 0 ) 
engine.setEnabledCipherSuites(getCiphersArray());
-if ( getSslEnabledProtocolsArray().length > 0 ) 
engine.setEnabledProtocols(getSslEnabledProtocolsArray());
+engine.setEnabledCipherSuites(enabledCiphers);
+engine.setEnabledProtocols(enabledProtocols);
 
 return engine;
 }

Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SSLUtil.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SSLUtil.java?rev=1432753&r1=1432752&r2=1432753&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SSLUtil.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SSLUtil.java Sun Jan 
13 22:08:14 2013
@@ -30,4 +30,32 @@ public interface SSLUtil {
 public TrustManager[] getTrustManagers() throws Exception;
 
 public void configureSessionContext(SSLSessionContext sslSessionContext);
+
+/**
+ * Determines the SSL cipher suites that can be enabled, based on the
+ * configuration of the endpoint and the ciphers supported by the SSL
+ * implementation.
+ *
+ * @param context An initialized context to obtain the supported ciphers 
from.
+ *
+ * @return Array of SSL cipher suites that may be enabled (which may be
+ * empty if none of the specified ciphers are supported), or
+ * the defaults for the underlying SSL implementation if 
+ * the endpoint configuration does not specify any ciphers.
+ */
+public String[] getEnableableCiphers(SSLContext context);
+   
+/**
+ * Determines the SSL protocol variants that can be enabled, based on the
+ * configuration of the endpoint and the ciphers supported by the SSL
+ * implementation.
+ *
+ * @param context An initialized context to obtain the supported protocols 
from.
+ *
+ * @return Array of SSL protocol variants that may be enabled (which may be
+ * empty if none of the specified protocols are supported), or
+ * the defaults for the underlying SSL implementation if 
+ * the endpoint configuration does not specify any protocols.
+ */
+public String[] getEnableableProtocols(SSLContext context);
 }

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java?rev=14