svn commit: r1240697 - /tomcat/trunk/conf/web.xml

2012-02-05 Thread rjung
Author: rjung
Date: Sun Feb  5 11:23:22 2012
New Revision: 1240697

URL: http://svn.apache.org/viewvc?rev=1240697&view=rev
Log:
MIME types update: sync with Apache webserver
mime.types file using res/scripts/check-mime.pl.

Modified:
tomcat/trunk/conf/web.xml

Modified: tomcat/trunk/conf/web.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/conf/web.xml?rev=1240697&r1=1240696&r2=1240697&view=diff
==
--- tomcat/trunk/conf/web.xml (original)
+++ tomcat/trunk/conf/web.xml Sun Feb  5 11:23:22 2012
@@ -834,6 +834,10 @@
 application/vnd.ms-cab-compressed
 
 
+cap
+application/vnd.tcpdump.pcap
+
+
 car
 application/vnd.curl.car
 
@@ -1158,6 +1162,10 @@
 application/octet-stream
 
 
+dmp
+application/vnd.tcpdump.pcap
+
+
 dms
 application/octet-stream
 
@@ -1234,6 +1242,10 @@
 video/x-dv
 
 
+dvb
+video/vnd.dvb.file
+
+
 dvi
 application/x-dvi
 
@@ -1518,6 +1530,10 @@
 application/vnd.groove-account
 
 
+gbr
+application/rpki-ghostbusters
+
+
 gdl
 model/vnd.gdl
 
@@ -1766,6 +1782,18 @@
 text/plain
 
 
+ink
+application/inkml+xml
+
+
+inkml
+application/inkml+xml
+
+
+iota
+application/vnd.astraea-software.iota
+
+
 ipfix
 application/ipfix
 
@@ -2146,6 +2174,10 @@
 application/vnd.mfmp
 
 
+mft
+application/rpki-manifest
+
+
 mgp
 application/vnd.osgeo.mapguide.package
 
@@ -2613,6 +2645,10 @@
 application/vnd.oasis.opendocument.text-template
 
 
+oxps
+application/oxps
+
+
 oxt
 application/vnd.openofficeorg.extension
 
@@ -2669,6 +2705,10 @@
 image/x-portable-bitmap
 
 
+pcap
+application/vnd.tcpdump.pcap
+
+
 pcf
 application/x-font-pcf
 
@@ -3029,6 +3069,10 @@
 application/relax-ng-compact-syntax
 
 
+roa
+application/rpki-roa
+
+
 roff
 text/troff
 
@@ -3271,6 +3315,10 @@
 application/smil+xml
 
 
+smzip
+application/vnd.stepmania.package
+
+
 snd
 audio/basic
 
@@ -3372,7 +3420,7 @@
 
 
 sub
-image/vnd.dvb.subtitle
+text/vnd.dvb.subtitle
 
 
 sus
@@ -3447,6 +3495,10 @@
 text/troff
 
 
+taglet
+application/vnd.mynfc
+
+
 tao
 application/vnd.tao.intent-module-archive
 
@@ -3735,10 +3787,22 @@
 application/vnd.dece.unspecified
 
 
+uvvz
+application/vnd.dece.zip
+
+
 uvx
 application/vnd.dece.unspecified
 
 
+uvz
+application/vnd.dece.zip
+
+
+vcard
+text/vcard
+
+
 vcd
 application/x-cdlink
 



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



svn commit: r1240700 - in /tomcat/tc7.0.x/trunk: ./ conf/web.xml webapps/docs/changelog.xml

2012-02-05 Thread rjung
Author: rjung
Date: Sun Feb  5 11:28:55 2012
New Revision: 1240700

URL: http://svn.apache.org/viewvc?rev=1240700&view=rev
Log:
MIME types update: sync with Apache webserver
mime.types file using res/scripts/check-mime.pl.

Backport of r1240697 from trunk.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/conf/web.xml
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb  5 11:28:55 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,1236914,1237146,1237154-1237156,1237332,1237334,1237425,1237427,1237604,1237975,1237981,1237985,1238

DO NOT REPLY [Bug 52606] New: FORM authentication POST replay broken for AJP

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

 Bug #: 52606
   Summary: FORM authentication POST replay broken for AJP
   Product: Tomcat 7
   Version: 7.0.25
  Platform: PC
OS/Version: Windows XP
Status: NEW
  Severity: regression
  Priority: P2
 Component: Connectors
AssignedTo: dev@tomcat.apache.org
ReportedBy: knst.koli...@gmail.com
Classification: Unclassified


Reported and discussed in the following thread on users@:
"Form Authentication POST data not preserved?"
http://markmail.org/message/pldgbe4jbnb46ha4
http://marc.info/?t=13283097691&r=1&w=2

This supposedly has the same trigger as the issue reported in Comment 9 in bug
51940 [3], that is consuming the body of the original request before replacing
it.

[3] https://issues.apache.org/bugzilla/show_bug.cgi?id=51940#c9

In AbstractAjpProcessor$SocketInputBuffer#doRead() there is a check for
"endOfStream" flag. If the flag is set the method returns immediately and does
not use the bodyBytes field that was initialized to replay the body.

The fix is to add the following line to "REQ_SET_BODY_REPLAY" case in
AbstractAjpProcessor#action(), as confirmed on the users@ thread:

  endOfStream = false;


In 6.0.x implementation of AjpProcessor$SocketInputBuffer and of replay action
is the same, but I have not tested whether this bug can be triggered there or
not.

-- 
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 52563] Incorrect behavior while checking the thread binding in DirContextURLStreamHandler

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

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID

--- Comment #4 from Mark Thomas  2012-02-05 18:41:33 UTC ---
The current behaviour is intention. See r287546

-- 
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 52580] javax.el.CompositeELResolver getValue throws NullPointerException

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

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE

--- Comment #2 from Mark Thomas  2012-02-05 19:18:05 UTC ---


*** This bug has been marked as a duplicate of bug 50293 ***

-- 
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 50293] javax.el.CompositeELResolver synchronization issue

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

Mark Thomas  changed:

   What|Removed |Added

 CC||qiuyunzh...@hotmail.com

--- Comment #2 from Mark Thomas  2012-02-05 19:18:05 UTC ---
*** Bug 52580 has been marked as a duplicate of this bug. ***

-- 
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 52563] Incorrect behavior while checking the thread binding in DirContextURLStreamHandler

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

--- Comment #5 from Konstantin Kolinko  2012-02-05 
19:21:58 UTC ---
Created attachment 28270
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=28270
2012-02-05_tc8_DirContextURLStreamHandler.patch

(In reply to comment #4)
> The current behaviour is intention. See r287546

So this behaviour was introduced 10 years ago and is well tested. Nobody ever
complained about seeing IllegalStateException("Illegal class loader binding")
failure enough to change the code.

(In reply to comment #0)
> Think that the code logic should be something like :
> a. Check whether a value is binding on the current thread context classloader,
> if does then return.
> b. Check whether a value is binding with the current thread, if does then
> return.
> c. Check the classloader hierarchy to find a binding value.
>

I am against a.,b.,c., because it changes current behaviour.

I would be OK with a.,c.,b.. With a,c,b it will have the same behavour as the
current code, but will handle an additional use case without throwing an ISE.

-> patch against trunk attached

But I would like to see a valid use case for this new feature. Some sample
code. Unused features are hard to maintain.


> Geronimo has its own classloader creation and
> destroying, and it did not has the WebAppLoader thing.

Maybe a bug is there? It is hard to understand the whole picture from your
short description in Comment 3.

-- 
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: r1240795 - /tomcat/trunk/java/org/apache/catalina/core/StandardEngine.java

2012-02-05 Thread markt
Author: markt
Date: Sun Feb  5 20:12:26 2012
New Revision: 1240795

URL: http://svn.apache.org/viewvc?rev=1240795&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52587
Ensure that if it is necessary to fall back to the default NullRealm,
the NullRealm instance is created early enough for it to be
correctly initialised.

Modified:
tomcat/trunk/java/org/apache/catalina/core/StandardEngine.java

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardEngine.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardEngine.java?rev=1240795&r1=1240794&r2=1240795&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/StandardEngine.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardEngine.java Sun Feb  5 
20:12:26 2012
@@ -237,6 +237,15 @@ public class StandardEngine extends Cont
 }
 
 
+@Override
+protected void initInternal() throws LifecycleException {
+// Ensure that a Realm is present before any attempt is made to start
+// one. This will create the default NullRealm if necessary.
+getRealm();
+super.initInternal();
+}
+
+
 /**
  * Start this component and implement the requirements
  * of {@link org.apache.catalina.util.LifecycleBase#startInternal()}.



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



svn commit: r1240796 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/core/StandardEngine.java webapps/docs/changelog.xml

2012-02-05 Thread markt
Author: markt
Date: Sun Feb  5 20:14:30 2012
New Revision: 1240796

URL: http://svn.apache.org/viewvc?rev=1240796&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52587
Ensure that if it is necessary to fall back to the default NullRealm,
the NullRealm instance is created early enough for it to be
correctly initialised.

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

Propchange: tomcat/tc7.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb  5 20:14:30 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,12

DO NOT REPLY [Bug 52587] NPE in authenticator when no realm/resource is defined

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

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #1 from Mark Thomas  2012-02-05 20:15:15 UTC ---
The root cause was the the NullRealm was created but not initialised with this
configuration. That has been fixed in trunk and 7.0.x and will be included in
7.0.26 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



DO NOT REPLY [Bug 52593] outputbuffer.recycle() is called immediately after response instead of at socket close

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

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WONTFIX

--- Comment #1 from Mark Thomas  2012-02-05 20:48:23 UTC ---
It is this way for several reasons:
- support for pipelined requests
- ensure correct recycling of objects after an error
- simpler code

Correctly determining when recycled() is required and isn't would require more
complexity to monitor connection state than the extra recycles currently used.

Further, the impact of not recycling is far worse than the impact of extra
recycling.

If there was a case where there were multiple recycle() calls and it was clear
that one or more was always unnecessary then there would be a case to remove
it. That is not the case here.

-- 
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: r1240821 - in /tomcat/trunk: java/org/apache/catalina/connector/OutputBuffer.java java/org/apache/catalina/connector/Response.java test/org/apache/catalina/connector/TestOutputBuffer.java

2012-02-05 Thread markt
Author: markt
Date: Sun Feb  5 21:12:42 2012
New Revision: 1240821

URL: http://svn.apache.org/viewvc?rev=1240821&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52577
Only reset the encoder information when the 'has getWriter()' been
called flag is reset.
Includes a simple test case

Modified:
tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java
tomcat/trunk/java/org/apache/catalina/connector/Response.java
tomcat/trunk/test/org/apache/catalina/connector/TestOutputBuffer.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java?rev=1240821&r1=1240820&r2=1240821&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java Sun Feb  
5 21:12:42 2012
@@ -583,6 +583,10 @@ public class OutputBuffer extends Writer
 
 
 public void reset() {
+reset(false);
+}
+
+public void reset(boolean resetWriterStreamFlags) {
 // If a Writer was being used, there may be bytes in the converter
 if (gotEnc && conv != null) {
 conv.recycle();
@@ -590,8 +594,10 @@ public class OutputBuffer extends Writer
 bb.recycle();
 bytesWritten = 0;
 charsWritten = 0;
-gotEnc = false;
-enc = null;
+if (resetWriterStreamFlags) {
+gotEnc = false;
+enc = null;
+}
 initial = true;
 }
 

Modified: tomcat/trunk/java/org/apache/catalina/connector/Response.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Response.java?rev=1240821&r1=1240820&r2=1240821&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/Response.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/Response.java Sun Feb  5 
21:12:42 2012
@@ -624,7 +624,7 @@ public class Response
 (sm.getString("coyoteResponse.resetBuffer.ise"));
 }
 
-outputBuffer.reset();
+outputBuffer.reset(resetWriterStreamFlags);
 
 if(resetWriterStreamFlags) {
 usingOutputStream = false;

Modified: tomcat/trunk/test/org/apache/catalina/connector/TestOutputBuffer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/connector/TestOutputBuffer.java?rev=1240821&r1=1240820&r2=1240821&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/connector/TestOutputBuffer.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/connector/TestOutputBuffer.java Sun 
Feb  5 21:12:42 2012
@@ -70,6 +70,25 @@ public class TestOutputBuffer extends To
 }
 }
 
+@Test
+public void testBug52577() throws Exception {
+Tomcat tomcat = getTomcatInstance();
+
+Context root = tomcat.addContext("", TEMP_DIR);
+
+Bug52577Servlet bug52577 = new Bug52577Servlet();
+Tomcat.addServlet(root, "bug52577", bug52577);
+root.addServletMapping("/", "bug52577");
+
+tomcat.start();
+
+ByteChunk bc = new ByteChunk();
+
+int rc = getUrl("http://localhost:"; + getPort() + "/", bc, null, null);
+assertEquals(HttpServletResponse.SC_OK, rc);
+assertEquals("OK", bc.toString());
+}
+
 private static class WritingServlet extends HttpServlet {
 
 private static final long serialVersionUID = 1L;
@@ -117,4 +136,18 @@ public class TestOutputBuffer extends To
 ", Time: " + lastRunNano + "ns");
 }
 }
+
+private static class Bug52577Servlet extends HttpServlet {
+
+private static final long serialVersionUID = 1L;
+
+@Override
+protected void doGet(HttpServletRequest req, HttpServletResponse resp)
+throws ServletException, IOException {
+Writer w = resp.getWriter();
+w.write("OK");
+resp.resetBuffer();
+w.write("OK");
+}
+}
 }



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



svn commit: r1240823 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/connector/OutputBuffer.java java/org/apache/catalina/connector/Response.java test/org/apache/catalina/connector/TestOutputB

2012-02-05 Thread markt
Author: markt
Date: Sun Feb  5 21:17:06 2012
New Revision: 1240823

URL: http://svn.apache.org/viewvc?rev=1240823&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52577
Only reset the encoder information when the 'has getWriter()' been
called flag is reset.
Includes a simple test case

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

tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestOutputBuffer.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb  5 21:17:06 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,123192

DO NOT REPLY [Bug 52577] Response output written in filter can be truncated

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

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #1 from Mark Thomas  2012-02-05 21:17:58 UTC ---
Thanks for the report. The issue may be triggered simply by calling reset() on
the response. No need for the filter or the wrapper.

This has been fixed in trunk and 7.0.x and will be included in 7.0.26 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: r1240842 - /tomcat/trunk/java/org/apache/catalina/core/StandardHostValve.java

2012-02-05 Thread markt
Author: markt
Date: Sun Feb  5 21:54:30 2012
New Revision: 1240842

URL: http://svn.apache.org/viewvc?rev=1240842&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52586
Remove hack that changes path info when forwarding to an error page

Modified:
tomcat/trunk/java/org/apache/catalina/core/StandardHostValve.java

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardHostValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardHostValve.java?rev=1240842&r1=1240841&r2=1240842&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/StandardHostValve.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardHostValve.java Sun Feb  
5 21:54:30 2012
@@ -420,8 +420,6 @@ final class StandardHostValve extends Va
 container.getLogger().debug("Processing " + errorPage);
 }
 
-request.setPathInfo(errorPage.getLocation());
-
 try {
 // Forward control to the specified location
 ServletContext servletContext =



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



DO NOT REPLY [Bug 52586] When requests are forwarded, the request attribute javax.servlet.forward.path_info is assigned an incorrect value.

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

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #2 from Mark Thomas  2012-02-05 21:58:04 UTC ---
The second time this evening I have had to dig back more than 5 years into the
svn history to figure out why some code is the way it is. It must be code
archaeology week and but no-one bothered to tell me.

That line was added in r301993 which was a modification to 301883 which was an
ugly hack to fix bug 20018.

With the current Tomcat code, there is no need for the hack (I didn't dig into
when the hack became unnecessary) so the line can be removed.

For the record, only the path info was affected and then, only during error
handling.

This has been fixed in trunk and 7.0.x and will be included in 7.0.26 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: r1240845 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/core/StandardHostValve.java webapps/docs/changelog.xml

2012-02-05 Thread markt
Author: markt
Date: Sun Feb  5 21:58:25 2012
New Revision: 1240845

URL: http://svn.apache.org/viewvc?rev=1240845&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52586
Remove hack that changes path info when forwarding to an error page

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

Propchange: tomcat/tc7.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb  5 21:58:25 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,1236914,1237146,1237154-1237156,1237332,1237334,1237425,1237

DO NOT REPLY [Bug 52607] New: It is not well defined how "Dependencies on extensions" mechanism can be used in Tomcat

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

 Bug #: 52607
   Summary: It is not well defined how "Dependencies on
extensions" mechanism can be used in Tomcat
   Product: Tomcat 7
   Version: 7.0.25
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: violet...@apache.org
Classification: Unclassified


Hi,

As a result of the mail thread [1] I'm opening a bug.

In short it is not clear how exactly "Dependencies on extensions" mechanism can
be used.

I have two proposals:

1. Tomcat can continue to use in its implementation a separate property
("catalina.ext.dirs") that provides extensions' location. But its value should
be added by default to the Tomcat's classpath directories (e.g.
"shared.loader").
- Pros: Tomcat users will know that this property specifies the directory for
their extensions and only the files located there will be scanned during
ExtensionValidator.validateApplication invocation.
- Cons: Additional configuration that has to be maintained.

2. Tomcat can remove this separate property ("catalina.ext.dirs") and start
searching for such extensions in the Tomcat's classpath directories (e.g.
shared.loader).
- Pros: No additional configuration is needed. One can specify the shared
libraries and the extensions with one and the same property.
- Cons: During ExtensionValidator.validateApplication, it may appear that a lot
of files are scanned which might be not necessary.

I'm willing to provide a patch once we agree on the solution. My favourite is
the first proposal.

I'm looking forward to your comments.
Thanks in advance.

Regards,
Violeta Georgieva

[1] http://marc.info/?t=13282758469&r=1&w=2

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

2012-02-05 Thread markt
Author: markt
Date: Sun Feb  5 22:45:07 2012
New Revision: 1240851

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

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=1240851&r1=1240850&r2=1240851&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/mbeans/ContainerMBean.java (original)
+++ tomcat/trunk/java/org/apache/catalina/mbeans/ContainerMBean.java Sun Feb  5 
22:45:07 2012
@@ -38,7 +38,7 @@ 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.catalina.valves.ValveBase;
 import org.apache.tomcat.util.modeler.BaseModelMBean;
 
 public class ContainerMBean extends BaseModelMBean {
@@ -208,9 +208,12 @@ public class ContainerMBean extends Base
 if(container != null){
 Valve[] valves = container.getPipeline().getValves();
 for (int i = 0; i < valves.length; i++) {
-ObjectName voname = ((ValveBase) valves[i]).getObjectName();
-if (voname.equals(oname)) {
-container.getPipeline().removeValve(valves[i]);
+if (valves[i] instanceof JmxEnabled) {
+ObjectName voname =
+((JmxEnabled) valves[i]).getObjectName();
+if (voname.equals(oname)) {
+container.getPipeline().removeValve(valves[i]);
+}
 }
 }
 }



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



svn commit: r1240853 - /tomcat/trunk/java/org/apache/catalina/mbeans/ContainerMBean.java

2012-02-05 Thread markt
Author: markt
Date: Sun Feb  5 22:52:11 2012
New Revision: 1240853

URL: http://svn.apache.org/viewvc?rev=1240853&view=rev
Log:
Use interface where possible

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=1240853&r1=1240852&r2=1240853&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/mbeans/ContainerMBean.java (original)
+++ tomcat/trunk/java/org/apache/catalina/mbeans/ContainerMBean.java Sun Feb  5 
22:52:11 2012
@@ -160,8 +160,8 @@ public class ContainerMBean extends Base
 }
 
 try {
-ContainerBase container = (ContainerBase)getManagedResource();
-container.addValve(valve);
+Container container = (Container)getManagedResource();
+container.getPipeline().addValve(valve);
 } catch (InstanceNotFoundException e) {
 throw new MBeanException(e);
 } catch (RuntimeOperationsException e) {
@@ -185,9 +185,9 @@ public class ContainerMBean extends Base
  * @exception MBeanException if a component cannot be removed
  */
 public void removeValve(String valveName) throws MBeanException{
-ContainerBase container=null;
+Container container=null;
 try {
-container = (ContainerBase)getManagedResource();
+container = (Container)getManagedResource();
 } catch (InstanceNotFoundException e) {
 throw new MBeanException(e);
 } catch (RuntimeOperationsException e) {
@@ -238,7 +238,7 @@ public class ContainerMBean extends Base
 
 if(listener != null){
 try {
-ContainerBase container = (ContainerBase)getManagedResource();
+Container container = (Container)getManagedResource();
 container.addLifecycleListener(listener);
 } catch (InstanceNotFoundException e) {
 throw new MBeanException(e);
@@ -257,9 +257,9 @@ public class ContainerMBean extends Base
  * Note that all the listeners having given ClassName will be removed.
  */
 public void removeLifeCycleListeners(String type) throws MBeanException{
-ContainerBase container=null;
+Container container=null;
 try {
-container = (ContainerBase)getManagedResource();
+container = (Container)getManagedResource();
 } catch (InstanceNotFoundException e) {
 throw new MBeanException(e);
 } catch (RuntimeOperationsException e) {
@@ -282,11 +282,11 @@ public class ContainerMBean extends Base
  * container.
  */
 public String[] findLifecycleListenerNames() throws MBeanException {
-ContainerBase container = null;
+Container container = null;
 List result = new ArrayList();
 
 try {
-container = (ContainerBase) getManagedResource();
+container = (Container) getManagedResource();
 } catch (InstanceNotFoundException e) {
 throw new MBeanException(e);
 } catch (RuntimeOperationsException e) {
@@ -309,11 +309,11 @@ public class ContainerMBean extends Base
  * container.
  */
 public String[] findContainerListenerNames() throws MBeanException {
-ContainerBase container = null;
+Container container = null;
 List result = new ArrayList();
 
 try {
-container = (ContainerBase) getManagedResource();
+container = (Container) getManagedResource();
 } catch (InstanceNotFoundException e) {
 throw new MBeanException(e);
 } catch (RuntimeOperationsException e) {



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



svn commit: r1240857 - in /tomcat/trunk/java/org/apache/catalina: connector/CoyoteAdapter.java connector/Response.java core/ApplicationSessionCookieConfig.java realm/RealmBase.java util/SessionConfig.

2012-02-05 Thread markt
Author: markt
Date: Sun Feb  5 23:24:36 2012
New Revision: 1240857

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

Added:
tomcat/trunk/java/org/apache/catalina/util/SessionConfig.java
Modified:
tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
tomcat/trunk/java/org/apache/catalina/connector/Response.java

tomcat/trunk/java/org/apache/catalina/core/ApplicationSessionCookieConfig.java
tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java?rev=1240857&r1=1240856&r2=1240857&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Sun Feb  
5 23:24:36 2012
@@ -29,9 +29,9 @@ import org.apache.catalina.Host;
 import org.apache.catalina.Wrapper;
 import org.apache.catalina.comet.CometEvent;
 import org.apache.catalina.comet.CometEvent.EventType;
-import org.apache.catalina.core.ApplicationSessionCookieConfig;
 import org.apache.catalina.core.AsyncContextImpl;
 import org.apache.catalina.util.ServerInfo;
+import org.apache.catalina.util.SessionConfig;
 import org.apache.catalina.util.URLEncoder;
 import org.apache.coyote.ActionCode;
 import org.apache.coyote.Adapter;
@@ -676,7 +676,7 @@ public class CoyoteAdapter implements Ad
 
 // Get the session ID if there was one
 sessionID = request.getPathParameter(
-ApplicationSessionCookieConfig.getSessionUriParamName(
+SessionConfig.getSessionUriParamName(
 request.getContext()));
 if (sessionID != null) {
 request.setRequestedSessionId(sessionID);
@@ -731,7 +731,7 @@ public class CoyoteAdapter implements Ad
 // This is not optimal, but as this is not very common, it
 // shouldn't matter
 redirectPath = redirectPath + ";" +
-ApplicationSessionCookieConfig.getSessionUriParamName(
+SessionConfig.getSessionUriParamName(
 request.getContext()) +
 "=" + request.getRequestedSessionId();
 }
@@ -921,8 +921,7 @@ public class CoyoteAdapter implements Ad
 return;
 }
 
-String sessionCookieName =
-ApplicationSessionCookieConfig.getSessionCookieName(context);
+String sessionCookieName = SessionConfig.getSessionCookieName(context);
 
 for (int i = 0; i < count; i++) {
 ServerCookie scookie = serverCookies.getCookie(i);

Modified: tomcat/trunk/java/org/apache/catalina/connector/Response.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Response.java?rev=1240857&r1=1240856&r2=1240857&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/Response.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/Response.java Sun Feb  5 
23:24:36 2012
@@ -42,11 +42,11 @@ import org.apache.catalina.Context;
 import org.apache.catalina.Globals;
 import org.apache.catalina.Session;
 import org.apache.catalina.Wrapper;
-import org.apache.catalina.core.ApplicationSessionCookieConfig;
 import org.apache.catalina.security.SecurityUtil;
 import org.apache.catalina.util.CharsetMapper;
 import org.apache.catalina.util.DateTool;
 import org.apache.catalina.util.RequestUtil;
+import org.apache.catalina.util.SessionConfig;
 import org.apache.tomcat.util.buf.CharChunk;
 import org.apache.tomcat.util.buf.UEncoder;
 import org.apache.tomcat.util.http.FastHttpDateFormat;
@@ -1502,8 +1502,7 @@ public class Response
 return (false);
 }
 String tok = ";" +
-ApplicationSessionCookieConfig.getSessionUriParamName(
-request.getContext()) +
+SessionConfig.getSessionUriParamName(request.getContext()) 
+
 "=" + session.getIdInternal();
 if( file.indexOf(tok, contextPath.length()) >= 0 ) {
 return (false);
@@ -1676,7 +1675,7 @@ public class Response
 StringBuilder sb = new StringBuilder(path);
 if( sb.length() > 0 ) { // jsessionid can't be first.
 sb.append(";");
-sb.append(ApplicationSessionCookieConfig.getSessionUriParamName(
+sb.append(SessionConfig.getSessionUriParamName(
 request.getContext()));
 sb.append("=");
 sb.append(sessionId);

Modified: 
tomcat/trunk/java/org/apache/catalina/core/ApplicationSessionCookieConfig.java
URL: 
http

svn commit: r1240858 - /tomcat/trunk/java/org/apache/catalina/core/ApplicationSessionCookieConfig.java

2012-02-05 Thread markt
Author: markt
Date: Sun Feb  5 23:25:16 2012
New Revision: 1240858

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

Modified:

tomcat/trunk/java/org/apache/catalina/core/ApplicationSessionCookieConfig.java

Modified: 
tomcat/trunk/java/org/apache/catalina/core/ApplicationSessionCookieConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ApplicationSessionCookieConfig.java?rev=1240858&r1=1240857&r2=1240858&view=diff
==
--- 
tomcat/trunk/java/org/apache/catalina/core/ApplicationSessionCookieConfig.java 
(original)
+++ 
tomcat/trunk/java/org/apache/catalina/core/ApplicationSessionCookieConfig.java 
Sun Feb  5 23:25:16 2012
@@ -174,32 +174,4 @@ public class ApplicationSessionCookieCon
 
 return cookie;
 }
-
-/**
- * Determine the name to use for the session cookie for the provided
- * context.
- * @param context
- *
- * @deprecated  Replaced by
- *  {@link SessionConfig#getSessionCookieName(Context)}. This
- *  will be removed in Tomcat 8.0.x.
- */
-@Deprecated
-public static String getSessionCookieName(Context context) {
-return SessionConfig.getSessionCookieName(context);
-}
-
-/**
- * Determine the name to use for the session cookie for the provided
- * context.
- * @param context
- *
- * @deprecated  Replaced by
- *  {@link SessionConfig#getSessionUriParamName(Context)}. This
- *  will be removed in Tomcat 8.0.x.
- */
-@Deprecated
-public static String getSessionUriParamName(Context context) {
-return SessionConfig.getSessionUriParamName(context);
-}
 }



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



svn commit: r1240859 - /tomcat/trunk/java/org/apache/catalina/util/SessionConfig.java

2012-02-05 Thread markt
Author: markt
Date: Sun Feb  5 23:25:18 2012
New Revision: 1240859

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

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

Modified: tomcat/trunk/java/org/apache/catalina/util/SessionConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/util/SessionConfig.java?rev=1240859&r1=1240858&r2=1240859&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/util/SessionConfig.java (original)
+++ tomcat/trunk/java/org/apache/catalina/util/SessionConfig.java Sun Feb  5 
23:25:18 2012
@@ -1,88 +1,88 @@
-/*
- * 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.util;
-
-import javax.servlet.SessionCookieConfig;
-
-import org.apache.catalina.Context;
-
-public class SessionConfig {
-
-private static final String DEFAULT_SESSION_COOKIE_NAME = "JSESSIONID";
-private static final String DEFAULT_SESSION_PARAMETER_NAME = "jsessionid";
-
-/**
- * Determine the name to use for the session cookie for the provided
- * context.
- * @param context
- */
-public static String getSessionCookieName(Context context) {
-
-String result = getConfiguredSessionCookieName(context);
-
-if (result == null) {
-result = DEFAULT_SESSION_COOKIE_NAME;
-}
-
-return result;
-}
-
-/**
- * Determine the name to use for the session cookie for the provided
- * context.
- * @param context
- */
-public static String getSessionUriParamName(Context context) {
-
-String result = getConfiguredSessionCookieName(context);
-
-if (result == null) {
-result = DEFAULT_SESSION_PARAMETER_NAME;
-}
-
-return result;
-}
-
-
-private static String getConfiguredSessionCookieName(Context context) {
-
-// Priority is:
-// 1. Cookie name defined in context
-// 2. Cookie name configured for app
-// 3. Default defined by spec
-if (context != null) {
-String cookieName = context.getSessionCookieName();
-if (cookieName != null && cookieName.length() > 0) {
-return cookieName;
-}
-
-SessionCookieConfig scc =
-context.getServletContext().getSessionCookieConfig();
-cookieName = scc.getName();
-if (cookieName != null && cookieName.length() > 0) {
-return cookieName;
-}
-}
-
-return null;
-}
-
-
-private SessionConfig() {
-// Utility class. Hide default constructor.
-}
-}
+/*
+ * 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.util;
+
+import javax.servlet.SessionCookieConfig;
+
+import org.apache.catalina.Context;
+
+public class SessionConfig {
+
+private static final String DEFAULT_SESSION_COOKIE_NAME = "JSESSIONID";
+private static final String DEFAULT_SESSION_PARAMETER_NAME = "jsessionid";
+
+/**
+ * Determine the name to use for the session cookie for the provided
+ * context.
+ * @param context
+ */
+public static String getSessionCookieName(Context context) {
+
+String result = getConfiguredSessionCookieName(context);
+
+if (result == null) {
+result = DEFAULT_SESSION_COOKIE_NAME;
+  

svn commit: r1240861 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/connector/ java/org/apache/catalina/core/ java/org/apache/catalina/realm/ java/org/apache/catalina/util/

2012-02-05 Thread markt
Author: markt
Date: Sun Feb  5 23:30:20 2012
New Revision: 1240861

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

Added:
tomcat/tc7.0.x/trunk/java/org/apache/catalina/util/SessionConfig.java
  - copied unchanged from r1240857, 
tomcat/trunk/java/org/apache/catalina/util/SessionConfig.java
Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/Response.java

tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationSessionCookieConfig.java
tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/RealmBase.java

Propchange: tomcat/tc7.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb  5 23:30:20 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

DO NOT REPLY [Bug 52564] Fail to build with security hardening cflags

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

--- Comment #2 from drazzib  2012-02-05 23:30:52 UTC ---
Created attachment 28273
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=28273
Fix FTBFS with -Werror=format-security

-- 
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 52564] Fail to build with security hardening cflags

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

--- Comment #3 from drazzib  2012-02-05 23:33:09 UTC ---
Hi,

FTR, Debian currently use GCC 4.6 (maybe GC 4.7 soon). I've attached a small
patch done by tony mancill  to help fix this.

Could you please consider this for inclusion ?

Regards,

-- 
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 52563] Incorrect behavior while checking the thread binding in DirContextURLStreamHandler

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

--- Comment #6 from Ivan  2012-02-06 03:07:32 UTC ---
Thanks for your response. I copied the comment from the r287546
--->
Update the algortithm, weighting it towards trying the context CL association
  first (since that's what is used now in Catalina). In some very special
cases,
  the thread binding will be checked, as well as the parent classloader.
<---
>From the comment, I am thinking that it did not state that the initial purpose
is to check the classloader hierarchy firstly, and then the thread binding.
Also, from the code logic now, if it really means to check the classloader
hierarchy firstly, why not put those codes in the end of the get method ?
>From another side, think that in most application server, including Tomcat, the
context classloader should be the web application classloader, and it always
has parent classloader, which may be library classloader or server runtime
classloader, so the value binding on the thread will never have chance to be
used, as it always throw an IllegalStateException.

-- 
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: r1240904 - in /tomcat/jk/trunk: native/apache-1.3/mod_jk.c native/apache-2.0/mod_jk.c xdocs/miscellaneous/changelog.xml

2012-02-05 Thread rjung
Author: rjung
Date: Mon Feb  6 07:37:50 2012
New Revision: 1240904

URL: http://svn.apache.org/viewvc?rev=1240904&view=rev
Log:
BZ 52564: Fix building with format checking gcc security
hardening cflags. Contributed by Tony Mancill.

Modified:
tomcat/jk/trunk/native/apache-1.3/mod_jk.c
tomcat/jk/trunk/native/apache-2.0/mod_jk.c
tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml

Modified: tomcat/jk/trunk/native/apache-1.3/mod_jk.c
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/native/apache-1.3/mod_jk.c?rev=1240904&r1=1240903&r2=1240904&view=diff
==
--- tomcat/jk/trunk/native/apache-1.3/mod_jk.c (original)
+++ tomcat/jk/trunk/native/apache-1.3/mod_jk.c Mon Feb  6 07:37:50 2012
@@ -620,9 +620,9 @@ static void jk_error_exit(const char *fi
 ch++;
 }
 
-ap_log_error(file, line, level, s, res);
+ap_log_error(file, line, level, s, "%s", res);
 if ( s ) {
-ap_log_error(file, line, level, NULL, res);
+ap_log_error(file, line, level, NULL, "%s", res);
 }
 
 /* Exit process */

Modified: tomcat/jk/trunk/native/apache-2.0/mod_jk.c
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/native/apache-2.0/mod_jk.c?rev=1240904&r1=1240903&r2=1240904&view=diff
==
--- tomcat/jk/trunk/native/apache-2.0/mod_jk.c (original)
+++ tomcat/jk/trunk/native/apache-2.0/mod_jk.c Mon Feb  6 07:37:50 2012
@@ -689,15 +689,15 @@ static void jk_error_exit(const char *fi
 }
 
 #if (MODULE_MAGIC_NUMBER_MAJOR >= 20100606)
-ap_log_error(file, line, APLOG_MODULE_INDEX, level, 0, s, res);
+ap_log_error(file, line, APLOG_MODULE_INDEX, level, 0, s, "%s", res);
 #else
-ap_log_error(file, line, level, 0, s, res);
+ap_log_error(file, line, level, 0, s, "%s", res);
 #endif
 if ( s ) {
 #if (MODULE_MAGIC_NUMBER_MAJOR >= 20100606)
-ap_log_error(file, line, APLOG_MODULE_INDEX, level, 0, NULL, res);
+ap_log_error(file, line, APLOG_MODULE_INDEX, level, 0, NULL, "%s", 
res);
 #else
-ap_log_error(file, line, level, 0, NULL, res);
+ap_log_error(file, line, level, 0, NULL, "%s", res);
 #endif
 }
 

Modified: tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml?rev=1240904&r1=1240903&r2=1240904&view=diff
==
--- tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml Mon Feb  6 07:37:50 2012
@@ -45,6 +45,10 @@
   
 
   
+52564: Fix building with format checking gcc security
+hardening cflags. Contributed by Tony Mancill. (rjung)
+  
+  
 52567: Balancer member in recovery state can switch
 back into error state if it is idle. (rjung)
   



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



DO NOT REPLY [Bug 52564] Fail to build with security hardening cflags

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

Rainer Jung  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #4 from Rainer Jung  2012-02-06 07:38:30 
UTC ---
Thanks for the patch. on't know why I didn't consider that myself.

Applied in r1240904. Will be part of 1.2.33.

-- 
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