DO NOT REPLY [Bug 52303] New: NonLoginAuthenticator does not honour session timeout with SingleSignOn Valve

2011-12-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52303

 Bug #: 52303
   Summary: NonLoginAuthenticator does not honour session timeout
with SingleSignOn Valve
   Product: Tomcat 7
   Version: trunk
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: br...@pingtoo.com
Classification: Unclassified


Created attachment 28052
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=28052
proposed diff to fix org.apache.catalina.authenticator.NonLoginAuthenticator

This problem has been explored and discussed on the tomcat-users mailing list
under the title "SingleSignonValve and webapp session timeout". Basically, a
webapp that does not need to define a  is valid under the servlet
3.0 spec and therefore should be able to participate in a single signon realm.
It should be able to inherit the security principal established by another
webapp within the same realm. Its own  value should be
honoured, even when all the other sessions in the same SingleSignOnEntry have
expired.

The problem is with NonLoginAuthenticator - at some time it had SSO helper
logic that was too primitive. This logic was completely commented-out in tomcat
6.0.0.

I have two fairly simple webapps (not quite drop-ins) that demonstrate the
problem and my proposed fix. I have heavily commented my proposed fix to
explain the surrounding dependent logic that it relies on.

At the moment I have not found an SSO-based unit test for any of the
AuthenticatorBase concrete classes, but I will try to create one (eventually).

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



DO NOT REPLY [Bug 52303] NonLoginAuthenticator does not honour session timeout with SingleSignOn Valve

2011-12-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52303

Brian Burch  changed:

   What|Removed |Added

 CC||br...@pingtoo.com
   Severity|normal  |minor

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



[Tomcat Wiki] Update of "SupportAndTraining" by Oleg

2011-12-08 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change 
notification.

The "SupportAndTraining" page has been changed by Oleg:
http://wiki.apache.org/tomcat/SupportAndTraining?action=diff&rev1=33&rev2=34

  
  Kippdata's [[https://www.kippdata.de/tomcat/|eSupport for Apache Tomcat]] 
features several eSupport packages starting from basic support levels up to 
mission critical enterprise support. We actively contribute to the Apache 
Tomcat project, so that our bug fixes and other code enhancements become part 
of the standard Apache Tomcat code. Kippdata is located in Bonn, Germany.
  
+ 
  Kippdatas [[https://www.kippdata.de/tomcat/|eSupport für Apache Tomcat]] 
bietet von Basis Level Support bis hin zu Support für unternehmenskritische 
Anwendungen verschiedene eSupport-Pakete. Wir beteiligen uns aktiv am Apache 
Tomcat Projekt, so dass unsere Fehlerbeseitigungen und andere Erweiterungen des 
Codes in den Standard Apache Tomcat Code einfliessen. Kippdata ist in Bonn, 
Deutschland, ansässig.
+ 
+ 
[[http://www.it-schulungen.com|{{http://www.it-schulungen.com/images/banners/its-banner-ulmerv.gif|http://www.it-schulungen.com}}]]
+ IT-Schulungen.com 
[[http://www.it-schulungen.com/seminare/opensource/index.html|Training and 
Support for Apache Tomcat]] IT-Schulungen.com is located in nurumberg, Germany.
  
  
  
[[http://www.springsource.com|{{http://www.springframework.org/sites/all/themes/zen/framework/logo.png|http://www.springsource.com}}]]

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



[Tomcat Wiki] Update of "SupportAndTraining" by KonstantinKolinko

2011-12-08 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change 
notification.

The "SupportAndTraining" page has been changed by KonstantinKolinko:
http://wiki.apache.org/tomcat/SupportAndTraining?action=diff&rev1=34&rev2=35

Comment:
Followup to r34. As said on the page, new offers must be added to the end of 
the list

  
  
  Kippdatas [[https://www.kippdata.de/tomcat/|eSupport für Apache Tomcat]] 
bietet von Basis Level Support bis hin zu Support für unternehmenskritische 
Anwendungen verschiedene eSupport-Pakete. Wir beteiligen uns aktiv am Apache 
Tomcat Projekt, so dass unsere Fehlerbeseitigungen und andere Erweiterungen des 
Codes in den Standard Apache Tomcat Code einfliessen. Kippdata ist in Bonn, 
Deutschland, ansässig.
- 
- 
[[http://www.it-schulungen.com|{{http://www.it-schulungen.com/images/banners/its-banner-ulmerv.gif|http://www.it-schulungen.com}}]]
- IT-Schulungen.com 
[[http://www.it-schulungen.com/seminare/opensource/index.html|Training and 
Support for Apache Tomcat]] IT-Schulungen.com is located in nurumberg, Germany.
  
  
  
[[http://www.springsource.com|{{http://www.springframework.org/sites/all/themes/zen/framework/logo.png|http://www.springsource.com}}]]
@@ -52, +49 @@

  
[[http://www.ineed.ws|{{http://www.ineed.ws/files/logo.png|http://www.ineed.ws}}]]
  
  I need a website LLC provides provides support, consulting and development 
services for Apache Tomcat in our office in Kiev, Ukraine or remotely. You may 
contact us by email i...@ineed.ws. or call +380-63-3713352.
+ 
+ 
+ 
[[http://www.it-schulungen.com|{{http://www.it-schulungen.com/images/banners/its-banner-ulmerv.gif|http://www.it-schulungen.com}}]]
+ IT-Schulungen.com 
[[http://www.it-schulungen.com/seminare/opensource/index.html|Training and 
Support for Apache Tomcat]] IT-Schulungen.com is located in nurumberg, Germany.
  
  
  === Example company name ===

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



[Tomcat Wiki] Update of "SupportAndTraining" by KonstantinKolinko

2011-12-08 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change 
notification.

The "SupportAndTraining" page has been changed by KonstantinKolinko:
http://wiki.apache.org/tomcat/SupportAndTraining?action=diff&rev1=35&rev2=36

Comment:
Followup to r21. New entries must be at end. DI were later than OpenLogic, but 
earlier than others.

  
  Kippdata bietet eine 
[[http://www.kippdata.de/red/workshops/opensource/|Auswahl an Schulungen für 
Apache Tomcat]] an. Wir haben uns auf Ein-Tages-Schulungen zu Themen wie 
„Apache Tomcat Best Practices“, „Java Memory Sizing and Garbage Collection 
Tuning“ spezialisiert. Kippdata ist in Bonn, Deutschland, ansässig.
  
- 
[[http://www.DevelopIntelligence.com/|{{http://www.developintelligence.com/img/logo.jpg}}]]
- 
- !DevelopIntelligence offers highly-customized, project-centric learning 
solutions delivered on-site or on-line. Check out our  
[[http://www.developintelligence.com/catalog/open-source-training/server-administration/introduction-to-apache-tomcat|Apache
 Tomcat Training]] course, or our wide variety of 
[[http://www.developintelligence.com/catalog/apache-training|Apache Training]] 
and [[http://www.developintelligence.com/catalog/open-source-training|Open 
Source Training]] programs. 
- 
  
  
[[http://www.springsource.com|{{http://www.springframework.org/sites/all/themes/zen/framework/logo.png|http://www.springsource.com}}]]
  
@@ -89, +85 @@

  
  !OpenLogic offers 
[[http://www.openlogic.com/products/open-source-training.php|training for 
Tomcat]] and a wide range of other open source packages. Training options 
include open-enrolment training for individuals and customized, multi-day 
enterprise training courses.
  
+ 
[[http://www.DevelopIntelligence.com/|{{http://www.developintelligence.com/img/logo.jpg}}]]
+ 
+ !DevelopIntelligence offers highly-customized, project-centric learning 
solutions delivered on-site or on-line. Check out our  
[[http://www.developintelligence.com/catalog/open-source-training/server-administration/introduction-to-apache-tomcat|Apache
 Tomcat Training]] course, or our wide variety of 
[[http://www.developintelligence.com/catalog/apache-training|Apache Training]] 
and [[http://www.developintelligence.com/catalog/open-source-training|Open 
Source Training]] programs. 
+ 
  
  
[[http://www.savoirfairelinux.com|{{http://www.savoirfairelinux.com/image/image_gallery?img_id=53315&t=1287776986392|http://www.savoirfairelinux.com}}]]
  

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



svn commit: r1212091 - in /tomcat/trunk/java/org/apache: juli/logging/DirectJDKLog.java tomcat/util/http/Cookies.java

2011-12-08 Thread markt
Author: markt
Date: Thu Dec  8 20:32:55 2011
New Revision: 1212091

URL: http://svn.apache.org/viewvc?rev=1212091&view=rev
Log:
Clean-up in preparation for a fix for bug 52184

Modified:
tomcat/trunk/java/org/apache/juli/logging/DirectJDKLog.java
tomcat/trunk/java/org/apache/tomcat/util/http/Cookies.java

Modified: tomcat/trunk/java/org/apache/juli/logging/DirectJDKLog.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/juli/logging/DirectJDKLog.java?rev=1212091&r1=1212090&r2=1212091&view=diff
==
--- tomcat/trunk/java/org/apache/juli/logging/DirectJDKLog.java (original)
+++ tomcat/trunk/java/org/apache/juli/logging/DirectJDKLog.java Thu Dec  8 
20:32:55 2011
@@ -166,23 +166,23 @@ class DirectJDKLog implements Log {
 // using java.util.logging - and the ugliness if you need to wrap it - is 
far
 // worse than the unfriendly and uncommon default format for logs.
 
-private void log( Level level, String msg, Throwable ex ) {
+private void log(Level level, String msg, Throwable ex) {
 if (logger.isLoggable(level)) {
 // Hack (?) to get the stack trace.
 Throwable dummyException=new Throwable();
 StackTraceElement locations[]=dummyException.getStackTrace();
-// Caller will be the third element
-String cname="unknown";
-String method="unknown";
-if( locations!=null && locations.length >2 ) {
+// Caller will be the third element (or later if logger is wrapped)
+String cname = "unknown";
+String method = "unknown";
+if (locations != null && locations.length >2) {
 StackTraceElement caller=locations[2];
 cname=caller.getClassName();
 method=caller.getMethodName();
 }
-if( ex==null ) {
-logger.logp( level, cname, method, msg );
+if (ex==null) {
+logger.logp(level, cname, method, msg);
 } else {
-logger.logp( level, cname, method, msg, ex );
+logger.logp(level, cname, method, msg, ex);
 }
 }
 }

Modified: tomcat/trunk/java/org/apache/tomcat/util/http/Cookies.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/Cookies.java?rev=1212091&r1=1212090&r2=1212091&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/http/Cookies.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/http/Cookies.java Thu Dec  8 
20:32:55 2011
@@ -31,9 +31,9 @@ import org.apache.tomcat.util.buf.Messag
  * @author Costin Manolache
  * @author kevin seguin
  */
-public final class Cookies { // extends MultiMap {
+public final class Cookies {
 
-private static final org.apache.juli.logging.Log log=
+private static final org.apache.juli.logging.Log log =
 org.apache.juli.logging.LogFactory.getLog(Cookies.class );
 
 // expected average number of cookies per request
@@ -128,8 +128,7 @@ public final class Cookies { // extends 
 /** Add all Cookie found in the headers of a request.
  */
 public  void processCookies( MimeHeaders headers ) {
-if( headers==null )
- {
+if( headers==null ) {
 return;// nothing to process
 }
 // process each "cookie" header
@@ -148,7 +147,6 @@ public final class Cookies { // extends 
 continue;
 }
 
-// Uncomment to test the new parsing code
 if( cookieValue.getType() != MessageBytes.T_BYTES ) {
 Exception e = new Exception();
 log.warn("Cookies: Parsing cookie as String. Expected bytes.",
@@ -203,11 +201,11 @@ public final class Cookies { // extends 
 return false;
 }
 */
-   if (c == ' ' || c == '\t' || c == '\n' || c == '\r' || c == '\f') {
-return true;
-} else {
-return false;
-}
+if (c == ' ' || c == '\t' || c == '\n' || c == '\r' || c == '\f') {
+return true;
+} else {
+return false;
+}
 }
 
 /**



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



svn commit: r1212093 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/juli/logging/DirectJDKLog.java java/org/apache/tomcat/util/http/Cookies.java

2011-12-08 Thread markt
Author: markt
Date: Thu Dec  8 20:33:41 2011
New Revision: 1212093

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

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/juli/logging/DirectJDKLog.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/Cookies.java

Propchange: tomcat/tc7.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Dec  8 20:33:41 2011
@@ -1 +1 @@
-/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169,1162721,1162769,1162836,1162932,1163630,1164419,1164438,1164469,1164480,1164567,1165234,1165247-1165248,1165253,1165273,1165282,1165309,1165331,1165338,1165347,1165360-1165361,1165367-1165368,1165602,1165608,1165677,1165693,1165721,1165723,1165728,1165730,1165738,1165746,1165765,1165777,1165918,1165921,1166077,1166150-1166151,1166290,1166366,1166620,1166686,1166693,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172556,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096
 
,1173241,1173256,1173288,117,1173342,1173461,1173614,1173630,1173659,1173722,1174061,1174239,1174322,1174325,1174329-1174330,1174337-1174339,1174343,1174353,1174799,1174882,1174884,1174983,1175155,1175158,1175167,1175182,1175190,1175201,1175272,1175275,1175283,1175582,1175589-1175590,1175594,1175602,1175613,1175633,1175690,1175713,1175798,1175889,1175896,1175907,1176584,1176590,1176799,1177050,1177060,1177125,1177152,1177160,1177245,1177850,1177862,1177978,1178209,1178228,1178233,1178449,1178542,1178681,1178684,1178721,1179268,1179274,1180261,1180865,1180891,1180894,1180907,1181028,1181123,1181125,1181136,1181291,1181743,1182796,1183078,1183105,1183142,1183328,1183339-1183340,1183492-1183494,1183605,1184917,1184919,1185018,1185020,1185200,1185588,1185626,1185756,1185758,1186011,1186042-1186045,1186104,1186123,1186137,1186153,1186254,1186257,1186377-1186379,1186479-1186480,1186712,1186743,1186750,1186763,1186890-1186892,1186894,1186949,1187018,1187027-1187028,1187381,1187
 
753,1187755,1187775,1187801,1187806,1187809,1187827,1188301,1188303-1188305,1188399,1188822,1188930-1188931,1189116,1189129,1189183,1189240,1189256,1189386,1189413-1189414,1189477,1189685,1189805,1189857,1189864,1189882,1190034,1190185,1190279,1190339,1190371,1190388-1190389,1190474,1190481,1194915,1195222-1195223,1195531,1195899,1195905,1195943,1195949,1195953,1195955,1195965,1195968,1196175,1196212,1196223,1196304-1196305,1196735,1196825,1196827,1197158,1197261,1197263,1197299-1197300,1197305,1197339-1197340,1197343,1197382,1197386-1197387,1197480,1197578,1198497,1198528,1198552,1198602,1198604,1198607,1198622,1198640,1198696,1198707,1199418,1199432,1199436,1199513,1199529,1199980,116,1200056,1200089,1200106-1200107,1200263,1200316,1200320,1200398-1200399,1200445-1200446,1200555,1200627,1200696,1200725,1200937,1200941,1201069,1201087,1201180,1201235-1201237,1201508,1201521,1201542,1201545-1201546,1201548,1201555-1201556,1201568,1201576,1201608,1201921-1201922,1201931,1
 
202035,1202039,1202271,1202565,1202578,1202705,1202828,1202860,1203047-1203052,1203078,1203091,1203253,1203278,1204182,1204856,1204867,1204936,1204938,1204982,1205033,1205065,1205082,1205097,1205112,1206200,1207692,1208046,1208073,1208096,1208114,1208145,1208772,1209194,1209277-1209278,1209686-1209731,1210894
+/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169,1162721,1162769,1162836,1162932,1163630,1164419,1164438,1164469,1164480,1164567,1165234,1165247-1165248,1165253,1165273,1165282,1165309,1165331,1165338,1165347,1165360-1165361,1165367-1165368,1165602,1165608,1165677,1165693,1165721,1165723,1165728,1165730,1165738,1165746,1165765,1165777,1165918,1165921,1166077,1166150-1166151,1166290,1166366,1166620,1166686,1166693,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172556,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096
 
,1173241,1173256,1173288,117,1173342,1173461,1173614,1173630,1173659,1173722,1174061,1174239,1174322,1174325,1174329-1174330,1174337-1174339,1174343,1174353,1174799,1174882,1174884,

svn commit: r1212095 - in /tomcat/trunk: java/org/apache/juli/logging/DirectJDKLog.java java/org/apache/juli/logging/UserDataHelper.java java/org/apache/tomcat/util/http/Cookies.java webapps/docs/conf

2011-12-08 Thread markt
Author: markt
Date: Thu Dec  8 20:33:56 2011
New Revision: 1212095

URL: http://svn.apache.org/viewvc?rev=1212095&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52184
Add a helper class that provides options (via system properties) for 
controlling how errors triggered by invalid input data are handled.
Currently only addresses invalid cookies but can be used elsewhere as the need 
arises.

Added:
tomcat/trunk/java/org/apache/juli/logging/UserDataHelper.java
Modified:
tomcat/trunk/java/org/apache/juli/logging/DirectJDKLog.java
tomcat/trunk/java/org/apache/tomcat/util/http/Cookies.java
tomcat/trunk/webapps/docs/config/systemprops.xml

Modified: tomcat/trunk/java/org/apache/juli/logging/DirectJDKLog.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/juli/logging/DirectJDKLog.java?rev=1212095&r1=1212094&r2=1212095&view=diff
==
--- tomcat/trunk/java/org/apache/juli/logging/DirectJDKLog.java (original)
+++ tomcat/trunk/java/org/apache/juli/logging/DirectJDKLog.java Thu Dec  8 
20:33:56 2011
@@ -172,13 +172,26 @@ class DirectJDKLog implements Log {
 Throwable dummyException=new Throwable();
 StackTraceElement locations[]=dummyException.getStackTrace();
 // Caller will be the third element (or later if logger is wrapped)
-String cname = "unknown";
-String method = "unknown";
-if (locations != null && locations.length >2) {
-StackTraceElement caller=locations[2];
-cname=caller.getClassName();
-method=caller.getMethodName();
+String cname = null;
+String method = null;
+if (locations != null) {
+int i = 2;
+while (locations.length > i) {
+StackTraceElement caller = locations[i];
+if (caller.getClassName().startsWith("org.apache.juli")) {
+i++;
+} else {
+cname = caller.getClassName();
+method = caller.getMethodName();
+break;
+}
+}
 }
+if (cname == null) {
+cname = "unknown";
+method = "unknown";
+}
+
 if (ex==null) {
 logger.logp(level, cname, method, msg);
 } else {

Added: tomcat/trunk/java/org/apache/juli/logging/UserDataHelper.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/juli/logging/UserDataHelper.java?rev=1212095&view=auto
==
--- tomcat/trunk/java/org/apache/juli/logging/UserDataHelper.java (added)
+++ tomcat/trunk/java/org/apache/juli/logging/UserDataHelper.java Thu Dec  8 
20:33:56 2011
@@ -0,0 +1,160 @@
+/*
+ * 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.juli.logging;
+
+/**
+ * This helper class assists with the logging associated with invalid input
+ * data. A developer may want all instances of invalid input data logged to
+ * assist with debugging whereas in production it is likely to be desirable not
+ * to log anything for invalid data. The following settings may be used:
+ * 
+ * NOTHING: Log nothing.
+ * DEBUG_ALL: Log all problems at DEBUG log level.
+ * INFO_THEN_DEBUG: Log first problem at INFO log level and any further
+ * issues in the following TBD (configurable) seconds at DEBUG level
+ * INFO_ALL: Log all problems at INFO log level.
+ * 
+ * By default, INFO_THEN_DEBUG is used with a suppression time of 24 hours.
+ *
+ * NOTE: This class is not completely thread-safe. When using INFO_THEN_DEBUG 
it
+ * is possible that several INFO messages will be logged before dropping to
+ * DEBUG.
+ */
+public class UserDataHelper {
+
+private final Log log;
+
+private Config config;
+
+// A value of 0 is equivalent to using INFO_ALL
+// A negative value will trigger infinite suppression
+private long suppressionTime;
+
+private volatile long lastInfoTime = 0;
+
+
+public UserDataHelper(Log lo

svn commit: r1212097 - /tomcat/trunk/test/org/apache/catalina/comet/TestCometProcessor.java

2011-12-08 Thread markt
Author: markt
Date: Thu Dec  8 20:34:38 2011
New Revision: 1212097

URL: http://svn.apache.org/viewvc?rev=1212097&view=rev
Log:
New PING delays were previously revoked. Restore correct timing check.

Modified:
tomcat/trunk/test/org/apache/catalina/comet/TestCometProcessor.java

Modified: tomcat/trunk/test/org/apache/catalina/comet/TestCometProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/comet/TestCometProcessor.java?rev=1212097&r1=1212096&r2=1212097&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/comet/TestCometProcessor.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/comet/TestCometProcessor.java Thu Dec 
 8 20:34:38 2011
@@ -219,7 +219,7 @@ public class TestCometProcessor extends 
 alv.validateAccessLog(1, 500, 0, 1000);
 } else {
 assertEquals("HTTP/1.1 200 OK", response[0]);
-alv.validateAccessLog(1, 200, 0, 9000);
+alv.validateAccessLog(1, 200, 0, 5000);
 }
 
 }



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



svn commit: r1212098 - /tomcat/trunk/test/org/apache/catalina/comet/TestCometProcessor.java

2011-12-08 Thread markt
Author: markt
Date: Thu Dec  8 20:35:17 2011
New Revision: 1212098

URL: http://svn.apache.org/viewvc?rev=1212098&view=rev
Log:
Work around possible JVM bug (maybe Tomcat bug) that triggers regular
unit test failures.

Modified:
tomcat/trunk/test/org/apache/catalina/comet/TestCometProcessor.java

Modified: tomcat/trunk/test/org/apache/catalina/comet/TestCometProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/comet/TestCometProcessor.java?rev=1212098&r1=1212097&r2=1212098&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/comet/TestCometProcessor.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/comet/TestCometProcessor.java Thu Dec 
 8 20:35:17 2011
@@ -166,6 +166,7 @@ public class TestCometProcessor extends 
 os.write(requestLine.getBytes());
 os.write("transfer-encoding: chunked\r\n".getBytes());
 os.write("\r\n".getBytes());
+os.flush();
 
 PingWriterThread writeThread = new PingWriterThread(4, os);
 writeThread.start();
@@ -216,10 +217,11 @@ public class TestCometProcessor extends 
 // the 200 response code will already have been sent to the client
 if (SimpleCometServlet.FAIL_ON_BEGIN.equals(initParam)) {
 assertEquals("HTTP/1.1 500 Internal Server Error", 
response[0]);
-alv.validateAccessLog(1, 500, 0, 1000);
+alv.validateAccessLog(1, 500, 0, 1100);
 } else {
 assertEquals("HTTP/1.1 200 OK", response[0]);
-alv.validateAccessLog(1, 200, 0, 5000);
+// 0.1s pre-PINGS, 4s PINGS, 1s processing, 1s margin of error
+alv.validateAccessLog(1, 200, 0, 6100);
 }
 
 }
@@ -390,6 +392,9 @@ public class TestCometProcessor extends 
 @Override
 public void run() {
 try {
+// Sleep to overcome apparent JVM bug where Poller sometimes
+// fails to report bytes available to read.
+Thread.sleep(100);
 for (int i = 0; i < pingCount; i++) {
 os.write("4\r\n".getBytes());
 os.write("PING\r\n".getBytes());



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



svn commit: r1212099 - /tomcat/trunk/java/org/apache/juli/logging/UserDataHelper.java

2011-12-08 Thread markt
Author: markt
Date: Thu Dec  8 20:35:28 2011
New Revision: 1212099

URL: http://svn.apache.org/viewvc?rev=1212099&view=rev
Log:
Fix line endings

Modified:
tomcat/trunk/java/org/apache/juli/logging/UserDataHelper.java   (contents, 
props changed)

Modified: tomcat/trunk/java/org/apache/juli/logging/UserDataHelper.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/juli/logging/UserDataHelper.java?rev=1212099&r1=1212098&r2=1212099&view=diff
==
--- tomcat/trunk/java/org/apache/juli/logging/UserDataHelper.java (original)
+++ tomcat/trunk/java/org/apache/juli/logging/UserDataHelper.java Thu Dec  8 
20:35:28 2011
@@ -1,160 +1,160 @@
-/*
- * 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.juli.logging;
-
-/**
- * This helper class assists with the logging associated with invalid input
- * data. A developer may want all instances of invalid input data logged to
- * assist with debugging whereas in production it is likely to be desirable not
- * to log anything for invalid data. The following settings may be used:
- * 
- * NOTHING: Log nothing.
- * DEBUG_ALL: Log all problems at DEBUG log level.
- * INFO_THEN_DEBUG: Log first problem at INFO log level and any further
- * issues in the following TBD (configurable) seconds at DEBUG level
- * INFO_ALL: Log all problems at INFO log level.
- * 
- * By default, INFO_THEN_DEBUG is used with a suppression time of 24 hours.
- *
- * NOTE: This class is not completely thread-safe. When using INFO_THEN_DEBUG 
it
- * is possible that several INFO messages will be logged before dropping to
- * DEBUG.
- */
-public class UserDataHelper {
-
-private final Log log;
-
-private Config config;
-
-// A value of 0 is equivalent to using INFO_ALL
-// A negative value will trigger infinite suppression
-private long suppressionTime;
-
-private volatile long lastInfoTime = 0;
-
-
-public UserDataHelper(Log log) {
-this.log = log;
-
-String configString = System.getProperty(
-"org.apache.juli.logging.UserDataHelper.CONFIG");
-if (configString == null) {
-config = Config.INFO_THEN_DEBUG;
-} else {
-try {
-config = Config.valueOf(configString);
-} catch (IllegalArgumentException iae) {
-// Ignore - use default
-config = Config.INFO_THEN_DEBUG;
-}
-}
-
-// Default suppression time of 1 day.
-suppressionTime = Long.getLong(
-"org.apache.juli.logging.UserDataHelper.SUPPRESSION_TIME",
-60 * 60 * 24).longValue();
-
-if (suppressionTime == 0) {
-config = Config.INFO_ALL;
-}
-}
-
-
-public boolean isEnabled() {
-if (Config.NONE == config) {
-return false;
-} else if (Config.DEBUG_ALL == config) {
-return log.isDebugEnabled();
-} else if (Config.INFO_THEN_DEBUG == config) {
-if (logAtInfo(false)) {
-return log.isInfoEnabled();
-} else {
-return log.isDebugEnabled();
-}
-} else if (Config.INFO_ALL == config) {
-return log.isInfoEnabled();
-}
-// Should never happen
-return false;
-}
-
-
-public void log(String message) {
-if (Config.NONE == config) {
-// NOOP;
-} else if (Config.DEBUG_ALL == config) {
-log.debug(message);
-} else if (Config.INFO_THEN_DEBUG == config) {
-if (logAtInfo(true)) {
-log.info(message);
-} else {
-log.debug(message);
-}
-} else if (Config.INFO_ALL == config) {
-log.info(message);
-}
-}
-
-
-public void log(String message, Throwable t) {
-if (Config.NONE == config) {
-// NOOP;
-} else if (Config.DEBUG_ALL == config) {
-log.debug(message, t);
-} else if (Config.INFO_THEN_DEBUG == config) {
-if (logAtInfo(true)) {
-log.info(message, t);
-} else {
-  

svn commit: r1212102 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/juli/logging/DirectJDKLog.java java/org/apache/juli/logging/UserDataHelper.java java/org/apache/tomcat/util/http/Cookies.java webapp

2011-12-08 Thread markt
Author: markt
Date: Thu Dec  8 20:37:35 2011
New Revision: 1212102

URL: http://svn.apache.org/viewvc?rev=1212102&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52184
Add a helper class that provides options (via system properties) for 
controlling how errors triggered by invalid input data are handled.
Currently only addresses invalid cookies but can be used elsewhere as the need 
arises.

Added:
tomcat/tc7.0.x/trunk/java/org/apache/juli/logging/UserDataHelper.java   
(contents, props changed)
  - copied, changed from r1212095, 
tomcat/trunk/java/org/apache/juli/logging/UserDataHelper.java
Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/juli/logging/DirectJDKLog.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/Cookies.java
tomcat/tc7.0.x/trunk/webapps/docs/config/systemprops.xml

Propchange: tomcat/tc7.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Dec  8 20:37:35 2011
@@ -1 +1 @@
-/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169,1162721,1162769,1162836,1162932,1163630,1164419,1164438,1164469,1164480,1164567,1165234,1165247-1165248,1165253,1165273,1165282,1165309,1165331,1165338,1165347,1165360-1165361,1165367-1165368,1165602,1165608,1165677,1165693,1165721,1165723,1165728,1165730,1165738,1165746,1165765,1165777,1165918,1165921,1166077,1166150-1166151,1166290,1166366,1166620,1166686,1166693,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172556,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096
 
,1173241,1173256,1173288,117,1173342,1173461,1173614,1173630,1173659,1173722,1174061,1174239,1174322,1174325,1174329-1174330,1174337-1174339,1174343,1174353,1174799,1174882,1174884,1174983,1175155,1175158,1175167,1175182,1175190,1175201,1175272,1175275,1175283,1175582,1175589-1175590,1175594,1175602,1175613,1175633,1175690,1175713,1175798,1175889,1175896,1175907,1176584,1176590,1176799,1177050,1177060,1177125,1177152,1177160,1177245,1177850,1177862,1177978,1178209,1178228,1178233,1178449,1178542,1178681,1178684,1178721,1179268,1179274,1180261,1180865,1180891,1180894,1180907,1181028,1181123,1181125,1181136,1181291,1181743,1182796,1183078,1183105,1183142,1183328,1183339-1183340,1183492-1183494,1183605,1184917,1184919,1185018,1185020,1185200,1185588,1185626,1185756,1185758,1186011,1186042-1186045,1186104,1186123,1186137,1186153,1186254,1186257,1186377-1186379,1186479-1186480,1186712,1186743,1186750,1186763,1186890-1186892,1186894,1186949,1187018,1187027-1187028,1187381,1187
 
753,1187755,1187775,1187801,1187806,1187809,1187827,1188301,1188303-1188305,1188399,1188822,1188930-1188931,1189116,1189129,1189183,1189240,1189256,1189386,1189413-1189414,1189477,1189685,1189805,1189857,1189864,1189882,1190034,1190185,1190279,1190339,1190371,1190388-1190389,1190474,1190481,1194915,1195222-1195223,1195531,1195899,1195905,1195943,1195949,1195953,1195955,1195965,1195968,1196175,1196212,1196223,1196304-1196305,1196735,1196825,1196827,1197158,1197261,1197263,1197299-1197300,1197305,1197339-1197340,1197343,1197382,1197386-1197387,1197480,1197578,1198497,1198528,1198552,1198602,1198604,1198607,1198622,1198640,1198696,1198707,1199418,1199432,1199436,1199513,1199529,1199980,116,1200056,1200089,1200106-1200107,1200263,1200316,1200320,1200398-1200399,1200445-1200446,1200555,1200627,1200696,1200725,1200937,1200941,1201069,1201087,1201180,1201235-1201237,1201508,1201521,1201542,1201545-1201546,1201548,1201555-1201556,1201568,1201576,1201608,1201921-1201922,1201931,1
 
202035,1202039,1202271,1202565,1202578,1202705,1202828,1202860,1203047-1203052,1203078,1203091,1203253,1203278,1204182,1204856,1204867,1204936,1204938,1204982,1205033,1205065,1205082,1205097,1205112,1206200,1207692,1208046,1208073,1208096,1208114,1208145,1208772,1209194,1209277-1209278,1209686-1209731,1210894,1212091
+/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169,1162721,1162769,1162836,1162932,1163630,1164419,1164438,1164469,1164480,1164567,1165234,1165247-1165248,1165253,1165273,1165282,1165309,1165331,1165338,1165347,1165360-1165361,1165367-1165

svn commit: r1212105 - /tomcat/trunk/test/org/apache/catalina/comet/TestCometProcessor.java

2011-12-08 Thread markt
Author: markt
Date: Thu Dec  8 20:39:51 2011
New Revision: 1212105

URL: http://svn.apache.org/viewvc?rev=1212105&view=rev
Log:
Undo accidental commit of work-around. I'd prefer to keep trying to ID the root 
cause.

Modified:
tomcat/trunk/test/org/apache/catalina/comet/TestCometProcessor.java

Modified: tomcat/trunk/test/org/apache/catalina/comet/TestCometProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/comet/TestCometProcessor.java?rev=1212105&r1=1212104&r2=1212105&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/comet/TestCometProcessor.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/comet/TestCometProcessor.java Thu Dec 
 8 20:39:51 2011
@@ -166,7 +166,6 @@ public class TestCometProcessor extends 
 os.write(requestLine.getBytes());
 os.write("transfer-encoding: chunked\r\n".getBytes());
 os.write("\r\n".getBytes());
-os.flush();
 
 PingWriterThread writeThread = new PingWriterThread(4, os);
 writeThread.start();
@@ -217,11 +216,10 @@ public class TestCometProcessor extends 
 // the 200 response code will already have been sent to the client
 if (SimpleCometServlet.FAIL_ON_BEGIN.equals(initParam)) {
 assertEquals("HTTP/1.1 500 Internal Server Error", 
response[0]);
-alv.validateAccessLog(1, 500, 0, 1100);
+alv.validateAccessLog(1, 500, 0, 1000);
 } else {
 assertEquals("HTTP/1.1 200 OK", response[0]);
-// 0.1s pre-PINGS, 4s PINGS, 1s processing, 1s margin of error
-alv.validateAccessLog(1, 200, 0, 6100);
+alv.validateAccessLog(1, 200, 0, 5000);
 }
 
 }
@@ -392,9 +390,6 @@ public class TestCometProcessor extends 
 @Override
 public void run() {
 try {
-// Sleep to overcome apparent JVM bug where Poller sometimes
-// fails to report bytes available to read.
-Thread.sleep(100);
 for (int i = 0; i < pingCount; i++) {
 os.write("4\r\n".getBytes());
 os.write("PING\r\n".getBytes());



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



DO NOT REPLY [Bug 52184] Reduce log level for invalid cookies

2011-12-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52184

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #6 from Mark Thomas  2011-12-08 20:44:10 UTC ---
I have implemented a solution for this that we can expand to other areas as
required. The solution will be included in 7.0.24 onwards.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



svn commit: r1212110 - /tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

2011-12-08 Thread markt
Author: markt
Date: Thu Dec  8 20:44:25 2011
New Revision: 1212110

URL: http://svn.apache.org/viewvc?rev=1212110&view=rev
Log:
Update changelog

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

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1212110&r1=1212109&r2=1212110&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Thu Dec  8 20:44:25 2011
@@ -56,6 +56,11 @@
 
   
 
+  
+52184: Provide greater control over the logging of errors
+triggered by invalid input data (i.e. data over which Tomcat has no
+control). (markt) 
+  
   
 52225: Fix ClassCastException in an Alias added to
 existing host through JMX. (kkolinko)



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



svn commit: r1212118 - /tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java

2011-12-08 Thread markt
Author: markt
Date: Thu Dec  8 20:54:46 2011
New Revision: 1212118

URL: http://svn.apache.org/viewvc?rev=1212118&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52208
Avoid possible NPEs if stopListening is called in a different thread

Modified:
tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java

Modified: 
tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java?rev=1212118&r1=1212117&r2=1212118&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java 
Thu Dec  8 20:54:46 2011
@@ -236,6 +236,10 @@ public class NioReceiver extends Receive
 }
 
 setListen(true);
+
+// Avoid NPEs if selector is set to null on stop.
+Selector selector = this.selector;
+
 if (selector!=null && datagramChannel!=null) {
 ObjectReader oreader = new ObjectReader(MAX_UDP_SIZE); //max size 
for a datagram packet
 datagramChannel.socket().setSendBufferSize(getUdpTxBufSize());
@@ -267,7 +271,7 @@ public class NioReceiver extends Receive
 continue; // nothing to do
 }
 // get an iterator over the set of selected keys
-Iterator it = 
(selector!=null)?selector.selectedKeys().iterator():null;
+Iterator it = selector.selectedKeys().iterator();
 // look at each key in the selected set
 while (it!=null && it.hasNext()) {
 SelectionKey key = it.next();
@@ -298,7 +302,7 @@ public class NioReceiver extends Receive
 }
 
 // remove key from selected set, it's been handled
-if (selector!=null) it.remove();
+it.remove();
 }
 } catch (java.nio.channels.ClosedSelectorException cse) {
 // ignore is normal at shutdown or stop listen socket



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



DO NOT REPLY [Bug 52208] NullPointerException in tribes.transport.nio.NioReceiver.listen() in test run

2011-12-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52208

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #1 from Mark Thomas  2011-12-08 20:57:34 UTC ---
This has been fixed in trunk and 7.0.x and will be included in 7.0.24 onwards.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



svn commit: r1212120 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/tribes/transport/nio/NioReceiver.java webapps/docs/changelog.xml

2011-12-08 Thread markt
Author: markt
Date: Thu Dec  8 20:57:33 2011
New Revision: 1212120

URL: http://svn.apache.org/viewvc?rev=1212120&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52208
Avoid possible NPEs if stopListening is called in a different thread

Modified:
tomcat/tc7.0.x/trunk/   (props changed)

tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Dec  8 20:57:33 2011
@@ -1 +1 @@
-/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169,1162721,1162769,1162836,1162932,1163630,1164419,1164438,1164469,1164480,1164567,1165234,1165247-1165248,1165253,1165273,1165282,1165309,1165331,1165338,1165347,1165360-1165361,1165367-1165368,1165602,1165608,1165677,1165693,1165721,1165723,1165728,1165730,1165738,1165746,1165765,1165777,1165918,1165921,1166077,1166150-1166151,1166290,1166366,1166620,1166686,1166693,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172556,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096
 
,1173241,1173256,1173288,117,1173342,1173461,1173614,1173630,1173659,1173722,1174061,1174239,1174322,1174325,1174329-1174330,1174337-1174339,1174343,1174353,1174799,1174882,1174884,1174983,1175155,1175158,1175167,1175182,1175190,1175201,1175272,1175275,1175283,1175582,1175589-1175590,1175594,1175602,1175613,1175633,1175690,1175713,1175798,1175889,1175896,1175907,1176584,1176590,1176799,1177050,1177060,1177125,1177152,1177160,1177245,1177850,1177862,1177978,1178209,1178228,1178233,1178449,1178542,1178681,1178684,1178721,1179268,1179274,1180261,1180865,1180891,1180894,1180907,1181028,1181123,1181125,1181136,1181291,1181743,1182796,1183078,1183105,1183142,1183328,1183339-1183340,1183492-1183494,1183605,1184917,1184919,1185018,1185020,1185200,1185588,1185626,1185756,1185758,1186011,1186042-1186045,1186104,1186123,1186137,1186153,1186254,1186257,1186377-1186379,1186479-1186480,1186712,1186743,1186750,1186763,1186890-1186892,1186894,1186949,1187018,1187027-1187028,1187381,1187
 
753,1187755,1187775,1187801,1187806,1187809,1187827,1188301,1188303-1188305,1188399,1188822,1188930-1188931,1189116,1189129,1189183,1189240,1189256,1189386,1189413-1189414,1189477,1189685,1189805,1189857,1189864,1189882,1190034,1190185,1190279,1190339,1190371,1190388-1190389,1190474,1190481,1194915,1195222-1195223,1195531,1195899,1195905,1195943,1195949,1195953,1195955,1195965,1195968,1196175,1196212,1196223,1196304-1196305,1196735,1196825,1196827,1197158,1197261,1197263,1197299-1197300,1197305,1197339-1197340,1197343,1197382,1197386-1197387,1197480,1197578,1198497,1198528,1198552,1198602,1198604,1198607,1198622,1198640,1198696,1198707,1199418,1199432,1199436,1199513,1199529,1199980,116,1200056,1200089,1200106-1200107,1200263,1200316,1200320,1200398-1200399,1200445-1200446,1200555,1200627,1200696,1200725,1200937,1200941,1201069,1201087,1201180,1201235-1201237,1201508,1201521,1201542,1201545-1201546,1201548,1201555-1201556,1201568,1201576,1201608,1201921-1201922,1201931,1
 
202035,1202039,1202271,1202565,1202578,1202705,1202828,1202860,1203047-1203052,1203078,1203091,1203253,1203278,1204182,1204856,1204867,1204936,1204938,1204982,1205033,1205065,1205082,1205097,1205112,1206200,1207692,1208046,1208073,1208096,1208114,1208145,1208772,1209194,1209277-1209278,1209686-1209731,1210894,1212091,1212095,1212099
+/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169,1162721,1162769,1162836,1162932,1163630,1164419,1164438,1164469,1164480,1164567,1165234,1165247-1165248,1165253,1165273,1165282,1165309,1165331,1165338,1165347,1165360-1165361,1165367-1165368,1165602,1165608,1165677,1165693,1165721,1165723,1165728,1165730,1165738,1165746,1165765,1165777,1165918,1165921,1166077,1166150-1166151,1166290,1166366,1166620,1166686,1166693,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172556,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096
 
,1173241,1173256,1173288,117,1173342,1

svn commit: r1212126 - /tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java

2011-12-08 Thread markt
Author: markt
Date: Thu Dec  8 21:12:36 2011
New Revision: 1212126

URL: http://svn.apache.org/viewvc?rev=1212126&view=rev
Log:
Remove unused code

Modified:

tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java

Modified: 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java?rev=1212126&r1=1212125&r2=1212126&view=diff
==
--- 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
 Thu Dec  8 21:12:36 2011
@@ -23,7 +23,6 @@ import java.sql.Connection;
 import java.sql.SQLException;
 import java.util.Collections;
 import java.util.ConcurrentModificationException;
-import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Set;
@@ -436,7 +435,7 @@ public class ConnectionPool {
 
 //if the evictor thread is supposed to run, start it now
 if (properties.isPoolSweeperEnabled()) {
-poolCleaner = new PoolCleaner("[Pool-Cleaner]:" + 
properties.getName(), this, properties.getTimeBetweenEvictionRunsMillis());
+poolCleaner = new PoolCleaner(this, 
properties.getTimeBetweenEvictionRunsMillis());
 poolCleaner.start();
 } //end if
 
@@ -804,7 +803,7 @@ public class ConnectionPool {
 log.warn("Unable to terminate transaction, connection will be 
closed.",x);
 return false;
 }
-
+
 }
 
 /**
@@ -1190,8 +1189,8 @@ public class ConnectionPool {
 }
 
 }
-
-
+
+
 
 private static volatile Timer poolCleanTimer = null;
 private static HashSet cleaners = new HashSet();
@@ -1222,11 +1221,11 @@ public class ConnectionPool {
 }
 }
 }
-
+
 public static Set getPoolCleaners() {
 return Collections.unmodifiableSet(cleaners);
 }
-
+
 public static Timer getPoolTimer() {
 return poolCleanTimer;
 }
@@ -1237,7 +1236,7 @@ public class ConnectionPool {
 protected volatile boolean run = true;
 protected volatile long lastRun = 0;
 
-PoolCleaner(String name, ConnectionPool pool, long sleepTime) {
+PoolCleaner(ConnectionPool pool, long sleepTime) {
 this.pool = pool;
 this.sleepTime = sleepTime;
 if (sleepTime <= 0) {



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



buildbot failure in ASF Buildbot on tomcat-trunk

2011-12-08 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-trunk while building 
ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/2569

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/trunk] 1212118
Blamelist: markt

BUILD FAILED: failed compile_1

sincerely,
 -The Buildbot





buildbot success in ASF Buildbot on tomcat-trunk

2011-12-08 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/2570

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/trunk] 1212126
Blamelist: markt

Build succeeded!

sincerely,
 -The Buildbot





DO NOT REPLY [Bug 52184] Reduce log level for invalid cookies

2011-12-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52184

Konstantin Kolinko  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |

--- Comment #7 from Konstantin Kolinko  2011-12-09 
02:22:28 UTC ---
REOPENing.

The new o.a.juli.logging.UserDataHelper class is missing from
extras/tomcat-juli.jar.
Consequently Tomcat fails fatally if you try to use the alternative
tomcat-juli.jar from extras.


The DirectJDKLog class is also missing from extras. Apparently the changes
applied to it have to be ported to commons-logging *.logging.impl.Jdk14Logger
class. It is not fatal though and concerns only the accuracy of log messages.
(In practice I think it is not a big concern, because the extras tomcat-juli
jar is usually used to route logging to log4j. In that case the accuracy of
java.util logging is irrelevant).

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



DO NOT REPLY [Bug 52308] New: Fatal alert: certificate_unknown when test SSL with expired client cert

2011-12-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52308

 Bug #: 52308
   Summary: Fatal alert: certificate_unknown when test SSL with
expired client cert
   Product: Tomcat 5
   Version: 5.0.0
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: blocker
  Priority: P2
 Component: Servlets:SSI
AssignedTo: dev@tomcat.apache.org
ReportedBy: dineshsa...@hotmail.com
Classification: Unclassified


I am testing SSL connection with jboss-5.1.0.GA (using Tomcat) and java version
"1.6.0_03"

Below is the setting of my server.xml in JBoss





It works ok with the valid client cert. 
But when I test with expired client cert, 
the client side will receive fatal alert: certificate_unknown but not the
expected result
fatal alert: certificate_expired.


Also JBOSS LOG
09:38:46,969 INFO  [STDOUT] ***
09:38:46,978 INFO  [STDOUT] http-192.168.20.150-443-1
09:38:46,978 INFO  [STDOUT] , SEND SSLv3 ALERT:
09:38:46,978 INFO  [STDOUT] fatal,
09:38:46,978 INFO  [STDOUT] description = certificate_unknown


Any idea of which part may cause the problem? Thank you.


Best regards
Dinesh S

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



DO NOT REPLY [Bug 52308] Fatal alert: certificate_unknown when test SSL with expired client cert

2011-12-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52308

Chuck Caldarale  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID

--- Comment #1 from Chuck Caldarale  2011-12-09 
06:13:57 UTC ---
Bugzilla is not a support forum.  Post your question on the users mailing list.
 Also note that Tomcat 5.0 has not been supported for some time.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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