DO NOT REPLY [Bug 52579] Tomcat5.5.35+Java1.5 cannot return proper value of a request parameter

2012-02-06 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52579

--- Comment #7 from Keiichi Fujino  2012-02-06 08:20:18 UTC 
---
Created attachment 28274
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=28274
patch v2

Many thanks for the comments.

I reimplement ByteChunk.toStringInternal().

> I suggest to replace that code by  "cr.throwException();".

The code was replaced by result.throwException(). 
CharacterCodingException is thrown as RuntimeException. 

> Charset.decode() uses a ThreadLocal-based cache of decoders. Maybe we can
> implement something like that cache, or just use a simple ThreadLocal (or 
> other
> way) to pass a Decoder instance around while processing the same request.

Cache of Decoder was created using simple ThreadLocal.
This cache is very simple now. 
Only one Decoder instance is always cached.
If you would like to cache two or more Decoder instances, it is necessary to
refactor. 
In that case, a code will become complicated to a slight degree. 

> 3) For large input data the current implementation that calls Charset.decode()
> is better than the proposed one, because it allocates less memory. The
> difference is between (size * averageCharsPerByte()) and (size *
> maxCharsPerByte()).
>
> I think threshold can be around 10 bytes.

The threshold value was added.

-- 
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 52593] outputbuffer.recycle() is called immediately after response instead of at socket close

2012-02-06 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52593

--- Comment #2 from David  2012-02-06 09:19:27 UTC ---
Just to point out - taking into account all these things - it would be simpler
(a micro optimization but clearer code) to combine outputbuffer.nextRequest() &
recycle() and always call one of them just once at the end of response
processing.

-- 
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 52593] outputbuffer.recycle() is called immediately after response instead of at socket close

2012-02-06 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52593

--- Comment #3 from Mark Thomas  2012-02-06 10:03:37 UTC ---
No it wouldn't.

recycle() != nextRequest() and to support HTTP pipelining this difference is
critical.

This code is not going to be changed.

-- 
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 52593] outputbuffer.recycle() is called immediately after response instead of at socket close

2012-02-06 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52593

--- Comment #4 from David  2012-02-06 11:02:26 UTC ---
OK and thanks for the reply.

I can't get my head around the pipelining as I'm not using it.

So I'll defer to your greater knowledge.

-- 
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: r1241027 - in /tomcat/trunk/java/org/apache/catalina: TomcatPrincipal.java connector/Request.java realm/GenericPrincipal.java session/StandardSession.java

2012-02-06 Thread markt
Author: markt
Date: Mon Feb  6 14:48:18 2012
New Revision: 1241027

URL: http://svn.apache.org/viewvc?rev=1241027&view=rev
Log:
Remove two more package dependencies

Added:
tomcat/trunk/java/org/apache/catalina/TomcatPrincipal.java
Modified:
tomcat/trunk/java/org/apache/catalina/connector/Request.java
tomcat/trunk/java/org/apache/catalina/realm/GenericPrincipal.java
tomcat/trunk/java/org/apache/catalina/session/StandardSession.java

Added: tomcat/trunk/java/org/apache/catalina/TomcatPrincipal.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/TomcatPrincipal.java?rev=1241027&view=auto
==
--- tomcat/trunk/java/org/apache/catalina/TomcatPrincipal.java (added)
+++ tomcat/trunk/java/org/apache/catalina/TomcatPrincipal.java Mon Feb  6 
14:48:18 2012
@@ -0,0 +1,50 @@
+/*
+ * 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;
+
+import java.security.Principal;
+
+import org.ietf.jgss.GSSCredential;
+
+/**
+ * Defines additional methods implemented by {@link Principal}s created by
+ * Tomcat's standard {@link Realm} implementations.
+ */
+public interface TomcatPrincipal extends Principal {
+
+/**
+ * The authenticated Principal to be exposed to applications.
+ */
+Principal getUserPrincipal();
+
+/**
+ * The user's delegated credentials.
+ */
+GSSCredential getGssCredential();
+
+/**
+ * Calls logout, if necessary, on any associated JAASLoginContext. May in
+ * the future be extended to cover other logout requirements.
+ *
+ * @throws Exception If something goes wrong with the logout. Uses 
Exception
+ *   to allow for future expansion of this method to cover
+ *   other logout mechanisms that might throw a different
+ *   exception to LoginContext
+ *
+ */
+void logout() throws Exception;
+}

Modified: tomcat/trunk/java/org/apache/catalina/connector/Request.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Request.java?rev=1241027&r1=1241026&r2=1241027&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/Request.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/Request.java Mon Feb  6 
14:48:18 2012
@@ -66,12 +66,12 @@ import org.apache.catalina.Host;
 import org.apache.catalina.Manager;
 import org.apache.catalina.Realm;
 import org.apache.catalina.Session;
+import org.apache.catalina.TomcatPrincipal;
 import org.apache.catalina.Wrapper;
 import org.apache.catalina.core.ApplicationPart;
 import org.apache.catalina.core.ApplicationSessionCookieConfig;
 import org.apache.catalina.core.AsyncContextImpl;
 import org.apache.catalina.deploy.LoginConfig;
-import org.apache.catalina.realm.GenericPrincipal;
 import org.apache.catalina.util.ParameterMap;
 import org.apache.catalina.util.StringParser;
 import org.apache.coyote.ActionCode;
@@ -2263,8 +2263,8 @@ public class Request
  */
 @Override
 public Principal getUserPrincipal() {
-if (userPrincipal instanceof GenericPrincipal) {
-return ((GenericPrincipal) userPrincipal).getUserPrincipal();
+if (userPrincipal instanceof TomcatPrincipal) {
+return ((TomcatPrincipal) userPrincipal).getUserPrincipal();
 }
 
 return userPrincipal;
@@ -3172,8 +3172,8 @@ public class Request
 new SpecialAttributeAdapter() {
 @Override
 public Object get(Request request, String name) {
-if (request.userPrincipal instanceof GenericPrincipal) 
{
-return ((GenericPrincipal) request.userPrincipal)
+if (request.userPrincipal instanceof TomcatPrincipal) {
+return ((TomcatPrincipal) request.userPrincipal)
 .getGssCredential();
 }
 return null;

Modified: tomcat/trunk/java/org/apache/catalina/realm/GenericPrincipal.java
URL: 
http://svn.a

svn commit: r1241028 - /tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java

2012-02-06 Thread markt
Author: markt
Date: Mon Feb  6 14:49:00 2012
New Revision: 1241028

URL: http://svn.apache.org/viewvc?rev=1241028&view=rev
Log:
Remove some unnecessary casts

Modified:
tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java

Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=1241028&r1=1241027&r2=1241028&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Mon Feb  6 
14:49:00 2012
@@ -65,7 +65,6 @@ import org.apache.catalina.Server;
 import org.apache.catalina.Service;
 import org.apache.catalina.Valve;
 import org.apache.catalina.Wrapper;
-import org.apache.catalina.core.ContainerBase;
 import org.apache.catalina.core.StandardContext;
 import org.apache.catalina.core.StandardHost;
 import org.apache.catalina.deploy.ErrorPage;
@@ -360,10 +359,6 @@ public class ContextConfig implements Li
 return;
 }
 
-if (!(context instanceof ContainerBase)) {
-return; // Cannot install a Valve even if it would be needed
-}
-
 // Has a Realm been configured for us to authenticate against?
 if (context.getRealm() == null) {
 log.error(sm.getString("contextConfig.missingRealm"));
@@ -428,10 +423,10 @@ public class ContextConfig implements Li
 }
 }
 
-if (authenticator != null && context instanceof ContainerBase) {
-Pipeline pipeline = ((ContainerBase) context).getPipeline();
+if (authenticator != null) {
+Pipeline pipeline = context.getPipeline();
 if (pipeline != null) {
-((ContainerBase) 
context).getPipeline().addValve(authenticator);
+pipeline.addValve(authenticator);
 if (log.isDebugEnabled()) {
 log.debug(sm.getString(
 "contextConfig.authenticatorConfigured",
@@ -439,7 +434,6 @@ public class ContextConfig implements Li
 }
 }
 }
-
 }
 
 
@@ -816,9 +810,9 @@ public class ContextConfig implements Li
 }
 
 // Dump the contents of this pipeline if requested
-if ((log.isDebugEnabled()) && (context instanceof ContainerBase)) {
+if (log.isDebugEnabled()) {
 log.debug("Pipeline Configuration:");
-Pipeline pipeline = ((ContainerBase) context).getPipeline();
+Pipeline pipeline = context.getPipeline();
 Valve valves[] = null;
 if (pipeline != null) {
 valves = pipeline.getValves();



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



svn commit: r1241030 - /tomcat/trunk/java/org/apache/catalina/TomcatPrincipal.java

2012-02-06 Thread markt
Author: markt
Date: Mon Feb  6 14:54:20 2012
New Revision: 1241030

URL: http://svn.apache.org/viewvc?rev=1241030&view=rev
Log:
eol

Modified:
tomcat/trunk/java/org/apache/catalina/TomcatPrincipal.java   (contents, 
props changed)

Modified: tomcat/trunk/java/org/apache/catalina/TomcatPrincipal.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/TomcatPrincipal.java?rev=1241030&r1=1241029&r2=1241030&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/TomcatPrincipal.java (original)
+++ tomcat/trunk/java/org/apache/catalina/TomcatPrincipal.java Mon Feb  6 
14:54:20 2012
@@ -1,50 +1,50 @@
-/*
- * 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;
-
-import java.security.Principal;
-
-import org.ietf.jgss.GSSCredential;
-
-/**
- * Defines additional methods implemented by {@link Principal}s created by
- * Tomcat's standard {@link Realm} implementations.
- */
-public interface TomcatPrincipal extends Principal {
-
-/**
- * The authenticated Principal to be exposed to applications.
- */
-Principal getUserPrincipal();
-
-/**
- * The user's delegated credentials.
- */
-GSSCredential getGssCredential();
-
-/**
- * Calls logout, if necessary, on any associated JAASLoginContext. May in
- * the future be extended to cover other logout requirements.
- *
- * @throws Exception If something goes wrong with the logout. Uses 
Exception
- *   to allow for future expansion of this method to cover
- *   other logout mechanisms that might throw a different
- *   exception to LoginContext
- *
- */
-void logout() throws Exception;
-}
+/*
+ * 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;
+
+import java.security.Principal;
+
+import org.ietf.jgss.GSSCredential;
+
+/**
+ * Defines additional methods implemented by {@link Principal}s created by
+ * Tomcat's standard {@link Realm} implementations.
+ */
+public interface TomcatPrincipal extends Principal {
+
+/**
+ * The authenticated Principal to be exposed to applications.
+ */
+Principal getUserPrincipal();
+
+/**
+ * The user's delegated credentials.
+ */
+GSSCredential getGssCredential();
+
+/**
+ * Calls logout, if necessary, on any associated JAASLoginContext. May in
+ * the future be extended to cover other logout requirements.
+ *
+ * @throws Exception If something goes wrong with the logout. Uses 
Exception
+ *   to allow for future expansion of this method to cover
+ *   other logout mechanisms that might throw a different
+ *   exception to LoginContext
+ *
+ */
+void logout() throws Exception;
+}

Propchange: tomcat/trunk/java/org/apache/catalina/TomcatPrincipal.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: r1241079 - /tomcat/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java

2012-02-06 Thread markt
Author: markt
Date: Mon Feb  6 17:07:22 2012
New Revision: 1241079

URL: http://svn.apache.org/viewvc?rev=1241079&view=rev
Log:
Use the interface rather than the default implementation

Modified:
tomcat/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java

Modified: tomcat/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java?rev=1241079&r1=1241078&r2=1241079&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java Mon Feb 
 6 17:07:22 2012
@@ -26,7 +26,7 @@ import javax.annotation.security.RunAs;
 
 import org.apache.catalina.Container;
 import org.apache.catalina.Context;
-import org.apache.catalina.core.StandardWrapper;
+import org.apache.catalina.Wrapper;
 import org.apache.catalina.deploy.ContextEnvironment;
 import org.apache.catalina.deploy.ContextResource;
 import org.apache.catalina.deploy.ContextResourceEnvRef;
@@ -92,14 +92,14 @@ public class WebAnnotationSet {
 protected static void loadApplicationServletAnnotations(Context context) {
 
 ClassLoader classLoader = context.getLoader().getClassLoader();
-StandardWrapper wrapper = null;
+Wrapper wrapper = null;
 Class classClass = null;
 
 Container[] children = context.findChildren();
 for (int i = 0; i < children.length; i++) {
-if (children[i] instanceof StandardWrapper) {
+if (children[i] instanceof Wrapper) {
 
-wrapper = (StandardWrapper) children[i];
+wrapper = (Wrapper) children[i];
 if (wrapper.getServletClass() == null) {
 continue;
 }



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



svn commit: r1241087 - /tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java

2012-02-06 Thread rjung
Author: rjung
Date: Mon Feb  6 17:30:37 2012
New Revision: 1241087

URL: http://svn.apache.org/viewvc?rev=1241087&view=rev
Log:
Fix millisecond handling in AccessLogValve when
used with a general SimpleDateFormat time pattern.

We called tidyFormat() but never used the tidied
format.

Modified:
tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java

Modified: tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java?rev=1241087&r1=1241086&r2=1241087&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java (original)
+++ tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java Mon Feb  6 
17:30:37 2012
@@ -1431,7 +1431,7 @@ public class AccessLogValve extends Valv
  * chars later with the actual milliseconds because that's
  * relatively cheap.
  */
-private void tidyFormat() {
+private String tidyFormat(String format) {
 boolean escape = false;
 StringBuilder result = new StringBuilder();
 int len = format.length();
@@ -1448,6 +1448,7 @@ public class AccessLogValve extends Valv
 escape = !escape;
 }
 }
+return result.toString();
 }
 
 protected DateAndTimeElement(String header) {
@@ -1476,7 +1477,7 @@ public class AccessLogValve extends Valv
 type = formatType.MSEC_FRAC;
 } else {
 type = formatType.SDF;
-tidyFormat();
+format = tidyFormat(format);
 }
 }
 }



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



svn commit: r1241091 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/valves/AccessLogValve.java webapps/docs/changelog.xml

2012-02-06 Thread rjung
Author: rjung
Date: Mon Feb  6 17:37:45 2012
New Revision: 1241091

URL: http://svn.apache.org/viewvc?rev=1241091&view=rev
Log:
Fix millisecond handling in AccessLogValve when
used with a general SimpleDateFormat time pattern.

We called tidyFormat() but never used the tidied
format.

Backport of r1241087 from trunk.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/AccessLogValve.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Feb  6 17:37:45 2012
@@ -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,1174975,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,1187
 
381,1187753,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,1
 
201931,1202035,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,1212118,1213469,1213906,1214853,1214855,1214864,1215115,1215118-1215119,1215121,1220293,1220295,1221038,1221842,1222189,101,176,1222300,1222690,1222850,1222852,1222855,1224607,1224617,1224648-1224652,1224657,1224662-1224663,1224682,1224801,1224910,1225000,1225219,1225343,1225465,1225627,1225629,1225634,1226069,1226158-1226159,1226177,1226196,1226214-1226215,1226385,1226394,1226500,1226537-1226538,1226546,1226551,1226975,1228196,1228360,1228376,1228724,1228908,1228918,1228920,1228922,1228929,1228969,1229307,1229536,1229549,1229724,1229726-1229731,1229997,1230539,1230711,1230729,1230762-1230763,1230765,1230955,1230957,1231285,123129
 
0,1231308,1231310,1231337,1231460-1231461,1231542-1231543,1231546-1231547,1231620-1231621,1231624-1231625,1231630,1231654-1231655,1231738,1231740,1231762-1231763,1231856,1231886,1231923,1231947,1232345,1232368,1232380,1232447,1232760,1232813,1232842-1232843,1232869,1233413,1233423,1233426,1234143,1234567,1235207,1236906-1236907

svn commit: r1241159 - in /tomcat/trunk/java/org/apache/catalina: realm/GenericPrincipal.java session/PersistentManagerBase.java util/LifecycleMBeanBase.java

2012-02-06 Thread markt
Author: markt
Date: Mon Feb  6 20:30:19 2012
New Revision: 1241159

URL: http://svn.apache.org/viewvc?rev=1241159&view=rev
Log:
Add some missing overrides

Modified:
tomcat/trunk/java/org/apache/catalina/realm/GenericPrincipal.java
tomcat/trunk/java/org/apache/catalina/session/PersistentManagerBase.java
tomcat/trunk/java/org/apache/catalina/util/LifecycleMBeanBase.java

Modified: tomcat/trunk/java/org/apache/catalina/realm/GenericPrincipal.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/GenericPrincipal.java?rev=1241159&r1=1241158&r2=1241159&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/realm/GenericPrincipal.java (original)
+++ tomcat/trunk/java/org/apache/catalina/realm/GenericPrincipal.java Mon Feb  
6 20:30:19 2012
@@ -198,6 +198,7 @@ public class GenericPrincipal implements
  */
 protected GSSCredential gssCredential = null;
 
+@Override
 public GSSCredential getGssCredential() {
 return this.gssCredential;
 }

Modified: 
tomcat/trunk/java/org/apache/catalina/session/PersistentManagerBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/PersistentManagerBase.java?rev=1241159&r1=1241158&r2=1241159&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/session/PersistentManagerBase.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/session/PersistentManagerBase.java 
Mon Feb  6 20:30:19 2012
@@ -330,6 +330,7 @@ public abstract class PersistentManagerB
  * Return the Store object which manages persistent Session
  * storage for this Manager.
  */
+@Override
 public Store getStore() {
 
 return (this.store);
@@ -493,6 +494,7 @@ public abstract class PersistentManagerB
  *
  * @param session Session to be removed
  */
+@Override
 public void removeSuper(Session session) {
 super.remove (session);
 }

Modified: tomcat/trunk/java/org/apache/catalina/util/LifecycleMBeanBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/util/LifecycleMBeanBase.java?rev=1241159&r1=1241158&r2=1241159&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/util/LifecycleMBeanBase.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/util/LifecycleMBeanBase.java Mon Feb  
6 20:30:19 2012
@@ -79,6 +79,7 @@ public abstract class LifecycleMBeanBase
  * with components that cannot (easily) navigate the component hierarchy to
  * determine the correct domain to use.
  */
+@Override
 public final void setDomain(String domain) {
 this.domain = domain;
 }
@@ -88,6 +89,7 @@ public abstract class LifecycleMBeanBase
  * Obtain the domain under which this component will be / has been
  * registered.
  */
+@Override
 public final String getDomain() {
 if (domain == null) {
 domain = getDomainInternal();
@@ -113,6 +115,7 @@ public abstract class LifecycleMBeanBase
 /**
  * Obtain the name under which this component has been registered with JMX.
  */
+@Override
 public final ObjectName getObjectName() {
 return oname;
 }



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



svn commit: r1241160 - in /tomcat/trunk/java/org/apache/catalina: Authenticator.java authenticator/AuthenticatorBase.java connector/LocalStrings.properties connector/Request.java

2012-02-06 Thread markt
Author: markt
Date: Mon Feb  6 20:31:23 2012
New Revision: 1241160

URL: http://svn.apache.org/viewvc?rev=1241160&view=rev
Log:
Remove a package dependency

Modified:
tomcat/trunk/java/org/apache/catalina/Authenticator.java
tomcat/trunk/java/org/apache/catalina/authenticator/AuthenticatorBase.java
tomcat/trunk/java/org/apache/catalina/connector/LocalStrings.properties
tomcat/trunk/java/org/apache/catalina/connector/Request.java

Modified: tomcat/trunk/java/org/apache/catalina/Authenticator.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Authenticator.java?rev=1241160&r1=1241159&r2=1241160&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/Authenticator.java (original)
+++ tomcat/trunk/java/org/apache/catalina/Authenticator.java Mon Feb  6 
20:31:23 2012
@@ -38,6 +38,21 @@ import org.apache.catalina.deploy.LoginC
 public interface Authenticator {
 
 /**
+ * Authenticate the user making this request, based on the login
+ * configuration of the {@link Context} with which this Authenticator is
+ * associated.  Return true if any specified constraint has
+ * been satisfied, or false if we have created a response
+ * challenge already.
+ *
+ * @param request Request we are processing
+ * @param response Response we are populating
+ *
+ * @exception IOException if an input/output error occurs
+ */
+public boolean authenticate(Request request, HttpServletResponse response)
+throws IOException;
+
+/**
  * Authenticate the user making this request, based on the specified
  * login configuration.  Return true if any specified
  * constraint has been satisfied, or false if we have
@@ -49,7 +64,12 @@ public interface Authenticator {
  *  should be performed
  *
  * @exception IOException if an input/output error occurs
+ *
+ * @deprecated  Use {@link #authenticate(Request, HttpServletResponse)}.
+ *  This will be removed / have reduced visibility in Tomcat
+ *  8.0.x
  */
+@Deprecated
 public boolean authenticate(Request request, HttpServletResponse response,
 LoginConfig config) throws IOException;
 

Modified: 
tomcat/trunk/java/org/apache/catalina/authenticator/AuthenticatorBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/authenticator/AuthenticatorBase.java?rev=1241160&r1=1241159&r2=1241160&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/authenticator/AuthenticatorBase.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/authenticator/AuthenticatorBase.java 
Mon Feb  6 20:31:23 2012
@@ -590,6 +590,27 @@ public abstract class AuthenticatorBase 
 
 
 /**
+ * Authenticate the user making this request, based on the login
+ * configuration of the {@link Context} with which this Authenticator is
+ * associated.  Return true if any specified constraint has
+ * been satisfied, or false if we have created a response
+ * challenge already.
+ *
+ * @param request Request we are processing
+ * @param response Response we are populating
+ *
+ * @exception IOException if an input/output error occurs
+ */
+@Override
+public boolean authenticate(Request request, HttpServletResponse response)
+throws IOException {
+if (context == null || context.getLoginConfig() == null) {
+return true;
+}
+return authenticate(request, response, context.getLoginConfig());
+}
+
+/**
  * Authenticate the user making this request, based on the specified
  * login configuration.  Return true if any specified
  * constraint has been satisfied, or false if we have

Modified: 
tomcat/trunk/java/org/apache/catalina/connector/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/LocalStrings.properties?rev=1241160&r1=1241159&r2=1241160&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/LocalStrings.properties 
(original)
+++ tomcat/trunk/java/org/apache/catalina/connector/LocalStrings.properties Mon 
Feb  6 20:31:23 2012
@@ -57,7 +57,6 @@ coyoteRequest.parseParameters=Exception 
 coyoteRequest.postTooLarge=Parameters were not parsed because the size of the 
posted data was too big. Use the maxPostSize attribute of the connector to 
resolve this if the application should accept large POSTs.
 coyoteRequest.chunkedPostTooLarge=Parameters were not parsed because the size 
of the posted data was too big. Because this request was a chunked request, it 
could not be processed further. Use the maxPostSize attribute of the connector 
to resolve this if the application should accept large POSTs.

svn commit: r1241162 - in /tomcat/trunk: java/org/apache/catalina/ java/org/apache/catalina/authenticator/ test/org/apache/catalina/authenticator/

2012-02-06 Thread markt
Author: markt
Date: Mon Feb  6 20:32:36 2012
New Revision: 1241162

URL: http://svn.apache.org/viewvc?rev=1241162&view=rev
Log:
Remove deprecated code. Simplify.

Modified:
tomcat/trunk/java/org/apache/catalina/Authenticator.java
tomcat/trunk/java/org/apache/catalina/authenticator/AuthenticatorBase.java
tomcat/trunk/java/org/apache/catalina/authenticator/BasicAuthenticator.java
tomcat/trunk/java/org/apache/catalina/authenticator/DigestAuthenticator.java
tomcat/trunk/java/org/apache/catalina/authenticator/FormAuthenticator.java

tomcat/trunk/java/org/apache/catalina/authenticator/NonLoginAuthenticator.java
tomcat/trunk/java/org/apache/catalina/authenticator/SSLAuthenticator.java
tomcat/trunk/java/org/apache/catalina/authenticator/SpnegoAuthenticator.java

tomcat/trunk/test/org/apache/catalina/authenticator/TesterDigestAuthenticatorPerformance.java

Modified: tomcat/trunk/java/org/apache/catalina/Authenticator.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Authenticator.java?rev=1241162&r1=1241161&r2=1241162&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/Authenticator.java (original)
+++ tomcat/trunk/java/org/apache/catalina/Authenticator.java Mon Feb  6 
20:32:36 2012
@@ -14,8 +14,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
-
 package org.apache.catalina;
 
 import java.io.IOException;
@@ -24,7 +22,6 @@ import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletResponse;
 
 import org.apache.catalina.connector.Request;
-import org.apache.catalina.deploy.LoginConfig;
 
 
 /**
@@ -34,7 +31,6 @@ import org.apache.catalina.deploy.LoginC
  * @author Craig R. McClanahan
  * @version $Id$
  */
-
 public interface Authenticator {
 
 /**
@@ -52,27 +48,6 @@ public interface Authenticator {
 public boolean authenticate(Request request, HttpServletResponse response)
 throws IOException;
 
-/**
- * Authenticate the user making this request, based on the specified
- * login configuration.  Return true if any specified
- * constraint has been satisfied, or false if we have
- * created a response challenge already.
- *
- * @param request Request we are processing
- * @param response Response we are populating
- * @param configLogin configuration describing how authentication
- *  should be performed
- *
- * @exception IOException if an input/output error occurs
- *
- * @deprecated  Use {@link #authenticate(Request, HttpServletResponse)}.
- *  This will be removed / have reduced visibility in Tomcat
- *  8.0.x
- */
-@Deprecated
-public boolean authenticate(Request request, HttpServletResponse response,
-LoginConfig config) throws IOException;
-
 public void login(String userName, String password, Request request)
 throws ServletException;
 

Modified: 
tomcat/trunk/java/org/apache/catalina/authenticator/AuthenticatorBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/authenticator/AuthenticatorBase.java?rev=1241162&r1=1241161&r2=1241162&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/authenticator/AuthenticatorBase.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/authenticator/AuthenticatorBase.java 
Mon Feb  6 20:32:36 2012
@@ -14,11 +14,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
-
 package org.apache.catalina.authenticator;
 
-
 import java.io.IOException;
 import java.security.Principal;
 import java.security.cert.X509Certificate;
@@ -193,6 +190,26 @@ public abstract class AuthenticatorBase 
   Locale.US)).format(new Date(1));
 
 
+protected static String getRealmName(Context context) {
+if (context == null) {
+// Very unlikely
+return REALM_NAME;
+}
+
+LoginConfig config = context.getLoginConfig();
+if (config == null) {
+return REALM_NAME;
+}
+
+String result = config.getRealmName();
+if (result == null) {
+return REALM_NAME;
+}
+
+return result;
+}
+
+
 // - Properties
 
 
@@ -401,7 +418,6 @@ public abstract class AuthenticatorBase 
 log.debug("Security checking request " +
 request.getMethod() + " " + request.getRequestURI());
 }
-LoginConfig config = this.context.getLoginConfig();
 
 // Have we got a cached authenticated Principal to record?
 if (cache) {
@@ -431,7 +447,7 @@ public abstract class AuthenticatorBase 
 String requestURI = r

svn commit: r1241170 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/ java/org/apache/catalina/authenticator/ java/org/apache/catalina/connector/

2012-02-06 Thread markt
Author: markt
Date: Mon Feb  6 20:45:52 2012
New Revision: 1241170

URL: http://svn.apache.org/viewvc?rev=1241170&view=rev
Log:
Remove a package dependency

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/catalina/Authenticator.java

tomcat/tc7.0.x/trunk/java/org/apache/catalina/authenticator/AuthenticatorBase.java

tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/LocalStrings.properties
tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/Request.java

Propchange: tomcat/tc7.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Feb  6 20:45:52 2012
@@ -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,1174975,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,1187
 
381,1187753,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,1
 
201931,1202035,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,1212118,1213469,1213906,1214853,1214855,1214864,1215115,1215118-1215119,1215121,1220293,1220295,1221038,1221842,1222189,101,176,1222300,1222690,1222850,1222852,1222855,1224607,1224617,1224648-1224652,1224657,1224662-1224663,1224682,1224801,1224910,1225000,1225219,1225343,1225465,1225627,1225629,1225634,1226069,1226158-1226159,1226177,1226196,1226214-1226215,1226385,1226394,1226500,1226537-1226538,1226546,1226551,1226975,1228196,1228360,1228376,1228724,1228908,1228918,1228920,1228922,1228929,1228969,1229307,1229536,1229549,1229724,1229726-1229731,1229997,1230539,1230711,1230729,1230762-1230763,1230765,1230955,1230957,1231285,123129
 
0,1231308,1231310,1231337,1231460-1231461,1231542-1231543,1231546-1231547,1231620-1231621,1231624-1231625,1231630,1231654-1231655,1231738,1231740,1231762-1231763,1231856,1231886,1231923,1231947,1232345,1232368,1232380,1232447,1232760,1232813,1232842-1232843,1232869,1233413,1233423,1233426,1234143,1234567,

DO NOT REPLY [Bug 52611] New: CometProcessor throws lots of NPEs

2012-02-06 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52611

 Bug #: 52611
   Summary: CometProcessor throws lots of NPEs
   Product: Tomcat 7
   Version: 7.0.25
  Platform: PC
Status: NEW
  Severity: normal
  Priority: P2
 Component: Connectors
AssignedTo: dev@tomcat.apache.org
ReportedBy: frank.schroe...@gmail.com
Classification: Unclassified


I have a CometProcessor servlet which sends responses via the OutputStream and
I see a lot of these errors.

java.lang.NullPointerException
at
org.apache.coyote.http11.InternalNioOutputBuffer.addToBB(InternalNioOutputBuffer.java:217)
at
org.apache.coyote.http11.InternalNioOutputBuffer.commit(InternalNioOutputBuffer.java:209)
at
org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:757)
at org.apache.coyote.Response.action(Response.java:170)
at org.apache.coyote.Response.sendHeaders(Response.java:350)
at
org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:330)
at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:306)
at
org.apache.catalina.connector.CoyoteOutputStream.flush(CoyoteOutputStream.java:101)
at
com.enaikoon.inviu.api.AjaxServlet$AjaxEventSender.sendAjaxEvents(AjaxServlet.java:471)
at
com.enaikoon.inviu.api.AjaxServlet$AjaxEventSender.run(AjaxServlet.java:409)
at java.lang.Thread.run(Thread.java:680)

The relevant code is this:


final ObjectNode data = buildAjaxEvents(lastId, ajaxEvents);
final byte[] buf = data.toString().getBytes("UTF-8");

// connection contains the CometEvent and the 
// request and respons objects from the BEGIN 
// event
final HttpServletResponse response = connection.response;
response.setStatus(200);
response.setContentType("application/json");
response.setCharacterEncoding("UTF-8");
response.setContentLength(buf.length);
response.addHeader("X-inviu-server", VERSION);
OutputStream os = response.getOutputStream();
try {
if (buf.length > 0) {
os.write(buf);
os.flush();  // <-- LOTS OF NPEs
}
log.debug("AJAX-SEND: %s", data);
} catch (NullPointerException ex) {
log.error("AJAX-SEND: NPE while sending");
ex.printStackTrace();
}

Does that ring a bell?

-- 
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 52611] CometProcessor throws lots of NPEs

2012-02-06 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52611

Konstantin Kolinko  changed:

   What|Removed |Added

 OS/Version||All

--- Comment #1 from Konstantin Kolinko  2012-02-06 
21:54:29 UTC ---
(In reply to comment #0)
> Does that ring a bell?

No.

Without seeing the full picture a little can be said. (Or you can search the
mailing list archives if you are curious if anyone have encountered this).

If it is indeed a bug, please prepare and attach a working example that
reproduces the issue.

Also read about RECYCLE_FACADES property in the docs. That is to exclude
obvious multithreading programing errors.


If you just want help, ask on the users@ mailing list. Bugzilla is a wrong
place for questions.

-- 
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: r1241243 - /tomcat/trunk/java/org/apache/catalina/mbeans/ContainerMBean.java

2012-02-06 Thread markt
Author: markt
Date: Mon Feb  6 22:51:33 2012
New Revision: 1241243

URL: http://svn.apache.org/viewvc?rev=1241243&view=rev
Log:
Remove commented out code

Modified:
tomcat/trunk/java/org/apache/catalina/mbeans/ContainerMBean.java

Modified: tomcat/trunk/java/org/apache/catalina/mbeans/ContainerMBean.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/mbeans/ContainerMBean.java?rev=1241243&r1=1241242&r2=1241243&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/mbeans/ContainerMBean.java (original)
+++ tomcat/trunk/java/org/apache/catalina/mbeans/ContainerMBean.java Mon Feb  6 
22:51:33 2012
@@ -38,7 +38,6 @@ import org.apache.catalina.core.Standard
 import org.apache.catalina.core.StandardHost;
 import org.apache.catalina.startup.ContextConfig;
 import org.apache.catalina.startup.HostConfig;
-// import org.apache.catalina.valves.ValveBase;
 import org.apache.tomcat.util.modeler.BaseModelMBean;
 
 public class ContainerMBean extends BaseModelMBean {



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



Re: WebSocket progress report

2012-02-06 Thread Jonathan Drake
I'm one the three CS grad students working on WebSocket (along with Petr
Praus).

Just wanted to give an update on our progress, to let you know what we're
working on:

Adding support for fragmented payloads:
Right now, after receiving a frame, StreamInbound unmasks the payload in a
WsInputStream and passes it up to the servlet via
onBinaryData()/onTextData().
To support fragmented frames, we add an intermediate step: after unmasking
the payload, write it to a PipedOutputStream connected to a
PipedInputStream that we pass upward via onBinaryData()/onTextData(). When
the next fragment arrives, keep streaming data through the pipe.

This has the advantage of also allowing us to stream huge payloads (RFC
6455 allows for a 64-bit extended length field---way too much data to
buffer in memory all at once).
It has the minor disadvantage of breaking the ByteBuffer wrappers from
MessageInbound (we can still use them for small payloads if we buffer
fragments in memory)

I'm working on a patch that implements this...maybe a day or two.

I'd appreciate any early criticism you may have---otherwise I mainly just
want to prevent duplicate work by explaining what we're up to.

Cheers,

Jonathan Drake


DO NOT REPLY [Bug 52615] New: Daemon thread is terminated unexpectedly when uncaught exceptions is thrown from the other thread

2012-02-06 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52615

 Bug #: 52615
   Summary: Daemon thread is terminated unexpectedly when uncaught
exceptions is thrown from the other thread
   Product: Tomcat 7
   Version: 7.0.14
  Platform: PC
Status: NEW
  Severity: regression
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: wan...@cn.ibm.com
Classification: Unclassified


We use tomcat as the web app server. After we upgraded it from 5.5.x to 7.0.14,
a critical issue happens.

When the uncaught exception stack contains
"com.xxx.services.server.dispatch.callback.UTF8SocketChannel" and
"com.xxx.services.server.dispatch.callback.LineBufferedSocketChannel", which
both have a DispatcherSession member which is registered on a daemon thread
Dispatcher, Dispatcher thread is also terminated unexpectedly. And I am sure
NOT all the non-daemon threads are terminated.

The uncaught exception stake looks like:
Throwable occurred:java.nio.channels.UnresolvedAddressException
at sun.nio.ch.Net.checkAddress(Net.java:41)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:499)
at
com.xxx.services.server.dispatch.callback.UTF8SocketChannel.connect(UTF8SocketChannel.java:90)
at
com.xxx.services.server.dispatch.callback.LineBufferedSocketChannel.connect(LineBufferedSocketChannel.java:95)
at com.xxx.jas.agent.AgentConnection.connect(AgentConnection.java:85)
at
com.xxx.jas.agent.action.OpenAgentConnection.action(OpenAgentConnection.java:26)
at com.xxx.jas.fiber.FiberAction.call(FiberAction.java:197)
at com.xxx.jas.fiber.action.flow.Block.action(Block.java:63)
at com.xxx.jas.fiber.FiberAction.call(FiberAction.java:197)
at com.xxx.jas.agent.AgentFiber.action(AgentFiber.java:233)
at
com.xxx.jas.agent.AgentFiber$AgentFiberAction.action(AgentFiber.java:336)
at com.xxx.jas.fiber.FiberAction.call(FiberAction.java:197)
at com.xxx.jas.fiber.Fiber.runFiber(Fiber.java:670)
at com.xxx.jas.fiber.FiberThread.runFibers(FiberThread.java:258)
at com.xxx.jas.fiber.FiberThread.run(FiberThread.java:246)

It seems tomcat 7.0.14 do some 'additional' cleanups for uncaught exceptions.

Note: It occurs when numbers of concurrent uncaught exceptions happened in a
short time. And it hard to be reproduced on linux platform.

-- 
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: r1241356 - in /tomcat/trunk/java/org/apache/tomcat/jni: Poll.java SSL.java SSLExt.java

2012-02-06 Thread costin
Author: costin
Date: Tue Feb  7 06:13:36 2012
New Revision: 1241356

URL: http://svn.apache.org/viewvc?rev=1241356&view=rev
Log:
Add the new ssl methods from tomcat-native ( and few poll methods that seemed 
to be missing ).

APR connector will not work unless you recompile tomcat-native ! ( it is ok to 
use the current version of 
openssl, but npn methods will not work )


Added:
tomcat/trunk/java/org/apache/tomcat/jni/SSLExt.java
Modified:
tomcat/trunk/java/org/apache/tomcat/jni/Poll.java
tomcat/trunk/java/org/apache/tomcat/jni/SSL.java

Modified: tomcat/trunk/java/org/apache/tomcat/jni/Poll.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/jni/Poll.java?rev=1241356&r1=1241355&r2=1241356&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/jni/Poll.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/jni/Poll.java Tue Feb  7 06:13:36 2012
@@ -154,4 +154,19 @@ public class Poll {
  */
 public static native int pollset(long pollset, long [] descriptors);
 
+/**
+ * Make poll() return. 
+ * 
+ * @param pollset
+ * @return
+ */
+public static native int interrupt(long pollset);
+
+/**
+ * Check if interrupt() is allowed.
+ * 
+ * @param pollset
+ * @return
+ */
+public static native boolean wakeable(long pollset);
 }

Modified: tomcat/trunk/java/org/apache/tomcat/jni/SSL.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/jni/SSL.java?rev=1241356&r1=1241355&r2=1241356&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/jni/SSL.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/jni/SSL.java Tue Feb  7 06:13:36 2012
@@ -136,7 +136,8 @@ public final class SSL {
 public static final int SSL_OP_NO_SSLv2 = 
0x0100;
 public static final int SSL_OP_NO_SSLv3 = 
0x0200;
 public static final int SSL_OP_NO_TLSv1 = 
0x0400;
-
+public static final int SSL_OP_NO_TICKET= 
0x4000;
+
 /* The next flag deliberately changes the ciphertest, this is a check
  * for the PKCS#1 attack */
 public static final int SSL_OP_PKCS1_CHECK_1= 
0x0800;

Added: tomcat/trunk/java/org/apache/tomcat/jni/SSLExt.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/jni/SSLExt.java?rev=1241356&view=auto
==
--- tomcat/trunk/java/org/apache/tomcat/jni/SSLExt.java (added)
+++ tomcat/trunk/java/org/apache/tomcat/jni/SSLExt.java Tue Feb  7 06:13:36 2012
@@ -0,0 +1,153 @@
+/*
+ *  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.tomcat.jni;
+
+/** 
+ * Support TLS extensions and extra methods. 
+ * 
+ * The methods are separated to make it easier for java code to 
+ * support existing native library - it can check if this class can 
+ * be loaded in order to use the exensions.
+ *
+ * @author Costin Manolache
+ */
+public final class SSLExt {
+
+
+/**
+ * Set advertised NPN protocol. 
+ * This is only available for recent or patched openssl.
+ * 
+ * Example: "\x06spdy/2"
+ * 
+ * Works with TLS1, doesn't with SSL2/SSL3
+ * 
+ * Servers sends list in ServerHelo, client selects it and 
+ * sends it back after ChangeChipher
+ * 
+ * Not supported in 1.0.0, seems to be in 1.0.1 and after
+ */
+public static native int setNPN(long tcctx, byte[] proto, int len);
+
+/**
+ * Get other side's advertised protocols. 
+ * Only works after handshake.
+ */
+public static native int getNPN(long tcsock, byte[] proto);
+
+/** 
+ * Enabling dump/debugging on the socket. Both raw and decrypted
+ * packets will be logged.
+ */
+public static native int debug(long tcsock);
+
+/**
+ * Server: Extract the session data associated with the socket.
+ * Must be saved, keyed by session ID.
+ */
+public static native byte[] getSessionD