[Bug 58410] org.apache.catalina.loader.WebappClassLoader clearReferencesThreads The web application [/message-center-web] appears to have started a thread named [New I/O worker #1] but has failed to s

2015-09-14 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58410

--- Comment #3 from mauersu  ---
(In reply to Chuck Caldarale from comment #2)
> Bugzilla is not a support forum.  Post your query on the Tomcat Users
> mailing list, as this is clearly an application bug.

sorry . i 'm  fresh

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



[Bug 58410] org.apache.catalina.loader.WebappClassLoader clearReferencesThreads The web application [/message-center-web] appears to have started a thread named [New I/O worker #1] but has failed to s

2015-09-14 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58410

Chuck Caldarale  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |INVALID

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



[Bug 58410] org.apache.catalina.loader.WebappClassLoader clearReferencesThreads The web application [/message-center-web] appears to have started a thread named [New I/O worker #1] but has failed to s

2015-09-14 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58410

--- Comment #2 from Chuck Caldarale  ---
Bugzilla is not a support forum.  Post your query on the Tomcat Users mailing
list, as this is clearly an application bug.

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



[Bug 58410] org.apache.catalina.loader.WebappClassLoader clearReferencesThreads The web application [/message-center-web] appears to have started a thread named [New I/O worker #1] but has failed to s

2015-09-14 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58410

mauersu  changed:

   What|Removed |Added

   Keywords||ErrorMessage

--- Comment #1 from mauersu  ---
sorry , it is "clearReferencesStopThreads" not "clearReferencesThreads"
and 
i know the reason,but i can do nothing.
- - -
i think reason is , the netty boss and worker thread create by the app itself,
the tomcat cannot stop it ? 
please help me , i am so helpless.

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



[Bug 58410] New: org.apache.catalina.loader.WebappClassLoader clearReferencesThreads The web application [/message-center-web] appears to have started a thread named [New I/O worker #1] but has failed

2015-09-14 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58410

Bug ID: 58410
   Summary: org.apache.catalina.loader.WebappClassLoader
clearReferencesThreads The web application
[/message-center-web] appears to have started a thread
named [New I/O worker #1] but has failed to stop it.
This is very likely to create a memory leak.
   Product: Tomcat 7
   Version: 7.0.64
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: maue...@163.com

the all message :

- - - - 

September 15, 2015 7:40:35 下午 org.apache.catalina.startup.HostConfig undeploy
info: Undeploying context [/message-center-web]
September 15, 2015 7:40:35 下午 org.apache.catalina.loader.WebappClassLoader
clearReferencesThreads
serious: The web application [/message-center-web] appears to have started a
thread named [New I/O worker #1] but has failed to stop it. This is very likely
to create a memory leak.
September 15, 2015 7:40:35 下午 org.apache.catalina.loader.WebappClassLoader
clearReferencesThreads
serious: The web application [/message-center-web] appears to have started a
thread named [New I/O worker #2] but has failed to stop it. This is very likely
to create a memory leak.
September 15, 2015 7:40:35 下午 org.apache.catalina.loader.WebappClassLoader
clearReferencesThreads
serious: The web application [/message-center-web] appears to have started a
thread named [New I/O server boss #3] but has failed to stop it. This is very
likely to create a memory leak.
September 15, 2015 7:40:35 下午 org.apache.catalina.loader.WebappClassLoader
clearReferencesThreads
serious: The web application [/message-center-web] appears to have started a
thread named [dubbo-remoting-server-heartbeat-thread-1] but has failed to stop
it. This is very likely to create a memory leak.
September 15, 2015 7:40:35 下午 org.apache.catalina.loader.WebappClassLoader
clearReferencesThreads
serious: The web application [/message-center-web] appears to have started a
thread named [DubboRegistryFailedRetryTimer-thread-1] but has failed to stop
it. This is very likely to create a memory leak.
September 15, 2015 7:40:35 下午 org.apache.catalina.loader.WebappClassLoader
clearReferencesThreads
serious: The web application [/message-center-web] appears to have started a
thread named [ZkClient-EventThread-22-10.100.142.78:2181] but has failed to
stop it. This is very likely to create a memory leak.

- - - - 
i use netty in my appweb, and hot deploy my app, the error occur when undeploy 
old-app  ,see above.

i find the context property "clearReferencesThreads" and set value "true" ,but
doesn't  helpful. so please help me. thanks .

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



[Bug 58377] Data race on field org.apache.coyote.http11.AbstractHttp11Processor.keepAlive

2015-09-14 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58377

Mark Thomas  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #1 from Mark Thomas  ---
This has been fixed in trunk and 8.0.x for 8.0.27 onwards.

-- 
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: r1703052 - in /tomcat/tc8.0.x/trunk: ./ java/org/apache/coyote/http11/AbstractHttp11Processor.java webapps/docs/changelog.xml

2015-09-14 Thread markt
Author: markt
Date: Mon Sep 14 20:23:14 2015
New Revision: 1703052

URL: http://svn.apache.org/r1703052
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58377
When switching to async, the keep-alive flag is accessed concurrently

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

tomcat/tc8.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc8.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Sep 14 20:23:14 2015
@@ -1 +1 @@
-/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886,1644890,1644892
 
,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657592,1657607,1657609,1657682,1657
 
907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966,1659043,1659053,1659059,1659188-1659189,1659216,1659263,1659293,1659304,1659306-1659307,1659382,1659384,1659428,1659471,1659486,1659505,1659516,1659521,1659524,1659559,1659562,1659803,1659806,1659814,1659833,1659862,1659905,1659919,1659948,1659967,1659983-1659984,1660060,1660074,1660077,1660133,1660168,1660331-1660332,1660353,1660358,1660924,1661386,1661867,1661972,1661990,1662200,1662308-1662309,1662548,1662614,1662736,1662985,1662988-1662989,1663264,1663277,1663298,1663534,1663562,1663676,1663715,1663754,1663768,1663772,1663781,1663893,1663995,1664143,1664163,1664174,1664301,1664317,1664347,1664657,1664659,1664710,1664863-1664864,1664866,1665085,1665292,1665559,1665653,1665661,1665672,1665694,1665697,1665736,1665779,1665976-1665977,1665980-1665981,1665985-1665986,1665989,1665998,1666004,1666008,1666013,1666017,1666024,1666116,1666386-1666387,1666494,1666496,1666552,1666569,1666579,137,149,1
 
666757,1666966,1666972,1666985,1666995,1666997,1667292,1667402,1667406,1667546,1667615,1667630,1667636,1667688,1667764,1667871,1668026,1668135,1668193,1668593,1668596,1668630,1668639,1668843,1669353,1669370,1669451,1669800,1669838,1669876,1669882,1670394,1670433,1670591,1670598-1670600,1670610,1670631,1670719,1670724,1670726,1670730,1670940,1671112,1672272,1672284,1673754,1674294,1675461,1675486,1675594,1675830,1676231,1676250-1676251,1676364,1676381,1676393,1676479,1676525,1676552,1676615,1676630,1676634,1676721,1676926,1676943,1677140,1677802,1678011,1678162,1678174,1678339,1678426-1678427,1678694,1678701,1679534,1679708,1679710,1679716,1680034,1680246,1681056,1681123,1681138,1681280,1681283,1681286,1681450,1681697,1681701,1681729,1681770,1681779,1681793,1681807,1681837-1681838,1681854,1681862,1681958,1682028,1682033,1682311,1682315,1682317,1682320,1682324,1682330,1682842,1684172,1684366,1684383,1684526-1684527,1684549-1684550,1685556,1685591,1685739,1685744,1685772,1685816,168582
 
6,1685891,1687242,1687261,1687268,1687340,1688563,1688841,1688878,165,1688896,1688901,1689345-1689346,1689357,1689656,1689675-1689677,1689679,1689687,1689825,1689856,1689918,1690011,1690021,1690054,1690080,1690209,1691134,1691487,1691813,1692744-1692747,1692849,1693088,1693105,1693429,1693461,1694058,1694111,1694290,1694501,1694548,1694658,1694660,1694788,1694872,16

svn commit: r1703051 - in /tomcat/tc8.0.x/trunk: ./ java/org/apache/coyote/http11/AbstractHttp11Processor.java

2015-09-14 Thread markt
Author: markt
Date: Mon Sep 14 20:20:07 2015
New Revision: 1703051

URL: http://svn.apache.org/r1703051
Log:
Avoid an unnecessary write

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

tomcat/tc8.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java

Propchange: tomcat/tc8.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Sep 14 20:20:07 2015
@@ -1 +1 @@
-/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886,1644890,1644892
 
,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657592,1657607,1657609,1657682,1657
 
907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966,1659043,1659053,1659059,1659188-1659189,1659216,1659263,1659293,1659304,1659306-1659307,1659382,1659384,1659428,1659471,1659486,1659505,1659516,1659521,1659524,1659559,1659562,1659803,1659806,1659814,1659833,1659862,1659905,1659919,1659948,1659967,1659983-1659984,1660060,1660074,1660077,1660133,1660168,1660331-1660332,1660353,1660358,1660924,1661386,1661867,1661972,1661990,1662200,1662308-1662309,1662548,1662614,1662736,1662985,1662988-1662989,1663264,1663277,1663298,1663534,1663562,1663676,1663715,1663754,1663768,1663772,1663781,1663893,1663995,1664143,1664163,1664174,1664301,1664317,1664347,1664657,1664659,1664710,1664863-1664864,1664866,1665085,1665292,1665559,1665653,1665661,1665672,1665694,1665697,1665736,1665779,1665976-1665977,1665980-1665981,1665985-1665986,1665989,1665998,1666004,1666008,1666013,1666017,1666024,1666116,1666386-1666387,1666494,1666496,1666552,1666569,1666579,137,149,1
 
666757,1666966,1666972,1666985,1666995,1666997,1667292,1667402,1667406,1667546,1667615,1667630,1667636,1667688,1667764,1667871,1668026,1668135,1668193,1668593,1668596,1668630,1668639,1668843,1669353,1669370,1669451,1669800,1669838,1669876,1669882,1670394,1670433,1670591,1670598-1670600,1670610,1670631,1670719,1670724,1670726,1670730,1670940,1671112,1672272,1672284,1673754,1674294,1675461,1675486,1675594,1675830,1676231,1676250-1676251,1676364,1676381,1676393,1676479,1676525,1676552,1676615,1676630,1676634,1676721,1676926,1676943,1677140,1677802,1678011,1678162,1678174,1678339,1678426-1678427,1678694,1678701,1679534,1679708,1679710,1679716,1680034,1680246,1681056,1681123,1681138,1681280,1681283,1681286,1681450,1681697,1681701,1681729,1681770,1681779,1681793,1681807,1681837-1681838,1681854,1681862,1681958,1682028,1682033,1682311,1682315,1682317,1682320,1682324,1682330,1682842,1684172,1684366,1684383,1684526-1684527,1684549-1684550,1685556,1685591,1685739,1685744,1685772,1685816,168582
 
6,1685891,1687242,1687261,1687268,1687340,1688563,1688841,1688878,165,1688896,1688901,1689345-1689346,1689357,1689656,1689675-1689677,1689679,1689687,1689825,1689856,1689918,1690011,1690021,1690054,1690080,1690209,1691134,1691487,1691813,1692744-1692747,1692849,1693088,1693105,1693429,1693461,1694058,1694111,1694290,1694501,1694548,1694658,1694660,1694788,1694872,1694878,1695006,1695354,1695371,1695459,1695582,1695706,1695778,1696199,1696272,1696280,1696366-1696368,1696378,1696390,1696392,1696467,1700607,1700870,17

svn commit: r1703050 - /tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java

2015-09-14 Thread markt
Author: markt
Date: Mon Sep 14 20:19:03 2015
New Revision: 1703050

URL: http://svn.apache.org/r1703050
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58377
When switching to async, the keep-alive flag is accessed concurrently

Modified:
tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java?rev=1703050&r1=1703049&r2=1703050&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java Mon Sep 14 
20:19:03 2015
@@ -100,7 +100,7 @@ public class Http11Processor extends Abs
 /**
  * Keep-alive.
  */
-protected boolean keepAlive = true;
+protected volatile boolean keepAlive = true;
 
 
 /**



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



svn commit: r1703049 - /tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java

2015-09-14 Thread markt
Author: markt
Date: Mon Sep 14 20:16:52 2015
New Revision: 1703049

URL: http://svn.apache.org/r1703049
Log:
Avoid an unnecessary write

Modified:
tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java?rev=1703049&r1=1703048&r2=1703049&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java Mon Sep 14 
20:16:52 2015
@@ -1566,7 +1566,9 @@ public class Http11Processor extends Abs
 
 // If we know that the request is bad this early, add the
 // Connection: close header.
-keepAlive = keepAlive && !statusDropsConnection(statusCode);
+if (keepAlive && statusDropsConnection(statusCode)) {
+keepAlive = false;
+}
 if (!keepAlive) {
 // Avoid adding the close header twice
 if (!connectionClosePresent) {



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



[Bug 58375] Data races inside class org.apache.coyote.Response

2015-09-14 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58375

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Mark Thomas  ---
Second issue fixed in trunk and 8.0.x for 8.0.27 onwards.

-- 
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: r1703046 - in /tomcat/tc8.0.x/trunk: ./ java/org/apache/coyote/Response.java webapps/docs/changelog.xml

2015-09-14 Thread markt
Author: markt
Date: Mon Sep 14 19:57:01 2015
New Revision: 1703046

URL: http://svn.apache.org/r1703046
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58375
Fix a rare data race on the internal flag Tomcat uses to mark a response as 
committed.

Modified:
tomcat/tc8.0.x/trunk/   (props changed)
tomcat/tc8.0.x/trunk/java/org/apache/coyote/Response.java
tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc8.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Sep 14 19:57:01 2015
@@ -1 +1 @@
-/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886,1644890,1644892
 
,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657592,1657607,1657609,1657682,1657
 
907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966,1659043,1659053,1659059,1659188-1659189,1659216,1659263,1659293,1659304,1659306-1659307,1659382,1659384,1659428,1659471,1659486,1659505,1659516,1659521,1659524,1659559,1659562,1659803,1659806,1659814,1659833,1659862,1659905,1659919,1659948,1659967,1659983-1659984,1660060,1660074,1660077,1660133,1660168,1660331-1660332,1660353,1660358,1660924,1661386,1661867,1661972,1661990,1662200,1662308-1662309,1662548,1662614,1662736,1662985,1662988-1662989,1663264,1663277,1663298,1663534,1663562,1663676,1663715,1663754,1663768,1663772,1663781,1663893,1663995,1664143,1664163,1664174,1664301,1664317,1664347,1664657,1664659,1664710,1664863-1664864,1664866,1665085,1665292,1665559,1665653,1665661,1665672,1665694,1665697,1665736,1665779,1665976-1665977,1665980-1665981,1665985-1665986,1665989,1665998,1666004,1666008,1666013,1666017,1666024,1666116,1666386-1666387,1666494,1666496,1666552,1666569,1666579,137,149,1
 
666757,1666966,1666972,1666985,1666995,1666997,1667292,1667402,1667406,1667546,1667615,1667630,1667636,1667688,1667764,1667871,1668026,1668135,1668193,1668593,1668596,1668630,1668639,1668843,1669353,1669370,1669451,1669800,1669838,1669876,1669882,1670394,1670433,1670591,1670598-1670600,1670610,1670631,1670719,1670724,1670726,1670730,1670940,1671112,1672272,1672284,1673754,1674294,1675461,1675486,1675594,1675830,1676231,1676250-1676251,1676364,1676381,1676393,1676479,1676525,1676552,1676615,1676630,1676634,1676721,1676926,1676943,1677140,1677802,1678011,1678162,1678174,1678339,1678426-1678427,1678694,1678701,1679534,1679708,1679710,1679716,1680034,1680246,1681056,1681123,1681138,1681280,1681283,1681286,1681450,1681697,1681701,1681729,1681770,1681779,1681793,1681807,1681837-1681838,1681854,1681862,1681958,1682028,1682033,1682311,1682315,1682317,1682320,1682324,1682330,1682842,1684172,1684366,1684383,1684526-1684527,1684549-1684550,1685556,1685591,1685739,1685744,1685772,1685816,168582
 
6,1685891,1687242,1687261,1687268,1687340,1688563,1688841,1688878,165,1688896,1688901,1689345-1689346,1689357,1689656,1689675-1689677,1689679,1689687,1689825,1689856,1689918,1690011,1690021,1690054,1690080,1690209,1691134,1691487,1691813,1692744-1692747,1692849,1693088,1693105,1693429,1693461,1694058,1694111,1694290,1694501,1694548,1694658,1694660,1694788,1694872,1694878

svn commit: r1703044 - /tomcat/trunk/java/org/apache/coyote/Response.java

2015-09-14 Thread markt
Author: markt
Date: Mon Sep 14 19:55:16 2015
New Revision: 1703044

URL: http://svn.apache.org/r1703044
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58375
Fix a rare data race on the internal flag Tomcat uses to mark a response as 
committed.

Modified:
tomcat/trunk/java/org/apache/coyote/Response.java

Modified: tomcat/trunk/java/org/apache/coyote/Response.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/Response.java?rev=1703044&r1=1703043&r2=1703044&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/Response.java (original)
+++ tomcat/trunk/java/org/apache/coyote/Response.java Mon Sep 14 19:55:16 2015
@@ -88,7 +88,7 @@ public final class Response {
 /**
  * Committed flag.
  */
-protected boolean commited = false;
+protected volatile boolean commited = false;
 
 
 /**



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



[Bug 58375] Data races inside class org.apache.coyote.Response

2015-09-14 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58375

--- Comment #2 from Mark Thomas  ---
The first one should have been fixed as part of the fix for bug 58371.

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



[Bug 58374] Data race on field org.apache.catalina.core.AsyncContextImpl.request

2015-09-14 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58374

Mark Thomas  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #1 from Mark Thomas  ---
Fixed in trunk and 8.0.x for 8.0.27 onwards.

-- 
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: r1703041 - in /tomcat/tc8.0.x/trunk: ./ java/org/apache/catalina/core/AsyncContextImpl.java webapps/docs/changelog.xml

2015-09-14 Thread markt
Author: markt
Date: Mon Sep 14 19:44:05 2015
New Revision: 1703041

URL: http://svn.apache.org/r1703041
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=57834
Fix a rare data race in the AsyncContext implementation for access to the 
internal Tomcat request object to which it holds a reference.

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

Propchange: tomcat/tc8.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Sep 14 19:44:05 2015
@@ -1 +1 @@
-/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886,1644890,1644892
 
,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657592,1657607,1657609,1657682,1657
 
907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966,1659043,1659053,1659059,1659188-1659189,1659216,1659263,1659293,1659304,1659306-1659307,1659382,1659384,1659428,1659471,1659486,1659505,1659516,1659521,1659524,1659559,1659562,1659803,1659806,1659814,1659833,1659862,1659905,1659919,1659948,1659967,1659983-1659984,1660060,1660074,1660077,1660133,1660168,1660331-1660332,1660353,1660358,1660924,1661386,1661867,1661972,1661990,1662200,1662308-1662309,1662548,1662614,1662736,1662985,1662988-1662989,1663264,1663277,1663298,1663534,1663562,1663676,1663715,1663754,1663768,1663772,1663781,1663893,1663995,1664143,1664163,1664174,1664301,1664317,1664347,1664657,1664659,1664710,1664863-1664864,1664866,1665085,1665292,1665559,1665653,1665661,1665672,1665694,1665697,1665736,1665779,1665976-1665977,1665980-1665981,1665985-1665986,1665989,1665998,1666004,1666008,1666013,1666017,1666024,1666116,1666386-1666387,1666494,1666496,1666552,1666569,1666579,137,149,1
 
666757,1666966,1666972,1666985,1666995,1666997,1667292,1667402,1667406,1667546,1667615,1667630,1667636,1667688,1667764,1667871,1668026,1668135,1668193,1668593,1668596,1668630,1668639,1668843,1669353,1669370,1669451,1669800,1669838,1669876,1669882,1670394,1670433,1670591,1670598-1670600,1670610,1670631,1670719,1670724,1670726,1670730,1670940,1671112,1672272,1672284,1673754,1674294,1675461,1675486,1675594,1675830,1676231,1676250-1676251,1676364,1676381,1676393,1676479,1676525,1676552,1676615,1676630,1676634,1676721,1676926,1676943,1677140,1677802,1678011,1678162,1678174,1678339,1678426-1678427,1678694,1678701,1679534,1679708,1679710,1679716,1680034,1680246,1681056,1681123,1681138,1681280,1681283,1681286,1681450,1681697,1681701,1681729,1681770,1681779,1681793,1681807,1681837-1681838,1681854,1681862,1681958,1682028,1682033,1682311,1682315,1682317,1682320,1682324,1682330,1682842,1684172,1684366,1684383,1684526-1684527,1684549-1684550,1685556,1685591,1685739,1685744,1685772,1685816,168582
 
6,1685891,1687242,1687261,1687268,1687340,1688563,1688841,1688878,165,1688896,1688901,1689345-1689346,1689357,1689656,1689675-1689677,1689679,1689687,1689825,1689856,1689918,1690011,1690021,1690054,1690080,1690209,1691134,1691487,1691813,1692744-1692747,1692849,1693088,1693105,1693429,1693461,1694058,1694111

svn commit: r1703040 - /tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java

2015-09-14 Thread markt
Author: markt
Date: Mon Sep 14 19:42:24 2015
New Revision: 1703040

URL: http://svn.apache.org/r1703040
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58374
Fix a rare data race in the AsyncContext implementation for access to the 
internal Tomcat request object to which it holds a reference.

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

Modified: tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java?rev=1703040&r1=1703039&r2=1703040&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java Mon Sep 14 
19:42:24 2015
@@ -76,7 +76,7 @@ public class AsyncContextImpl implements
 // Default of 3 (30s) is set by the connector
 private long timeout = -1;
 private AsyncEvent event = null;
-private Request request;
+private volatile Request request;
 private volatile InstanceManager instanceManager;
 
 public AsyncContextImpl(Request request) {



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



[Bug 58373] Data race on field org.apache.catalina.core.StandardContext.applicationEventListenersObjects

2015-09-14 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58373

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #1 from Mark Thomas  ---
Fixed in trunk and 8.0.x for 8.0.27 onwards.

-- 
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: r1703025 - in /tomcat/tc8.0.x/trunk: ./ java/org/apache/catalina/core/StandardContext.java webapps/docs/changelog.xml

2015-09-14 Thread markt
Author: markt
Date: Mon Sep 14 18:32:06 2015
New Revision: 1703025

URL: http://svn.apache.org/r1703025
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58373
Fix rare data race with the application event listeners for StandardContext

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

Propchange: tomcat/tc8.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Sep 14 18:32:06 2015
@@ -1 +1 @@
-/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886,1644890,1644892
 
,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657592,1657607,1657609,1657682,1657
 
907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966,1659043,1659053,1659059,1659188-1659189,1659216,1659263,1659293,1659304,1659306-1659307,1659382,1659384,1659428,1659471,1659486,1659505,1659516,1659521,1659524,1659559,1659562,1659803,1659806,1659814,1659833,1659862,1659905,1659919,1659948,1659967,1659983-1659984,1660060,1660074,1660077,1660133,1660168,1660331-1660332,1660353,1660358,1660924,1661386,1661867,1661972,1661990,1662200,1662308-1662309,1662548,1662614,1662736,1662985,1662988-1662989,1663264,1663277,1663298,1663534,1663562,1663676,1663715,1663754,1663768,1663772,1663781,1663893,1663995,1664143,1664163,1664174,1664301,1664317,1664347,1664657,1664659,1664710,1664863-1664864,1664866,1665085,1665292,1665559,1665653,1665661,1665672,1665694,1665697,1665736,1665779,1665976-1665977,1665980-1665981,1665985-1665986,1665989,1665998,1666004,1666008,1666013,1666017,1666024,1666116,1666386-1666387,1666494,1666496,1666552,1666569,1666579,137,149,1
 
666757,1666966,1666972,1666985,1666995,1666997,1667292,1667402,1667406,1667546,1667615,1667630,1667636,1667688,1667764,1667871,1668026,1668135,1668193,1668593,1668596,1668630,1668639,1668843,1669353,1669370,1669451,1669800,1669838,1669876,1669882,1670394,1670433,1670591,1670598-1670600,1670610,1670631,1670719,1670724,1670726,1670730,1670940,1671112,1672272,1672284,1673754,1674294,1675461,1675486,1675594,1675830,1676231,1676250-1676251,1676364,1676381,1676393,1676479,1676525,1676552,1676615,1676630,1676634,1676721,1676926,1676943,1677140,1677802,1678011,1678162,1678174,1678339,1678426-1678427,1678694,1678701,1679534,1679708,1679710,1679716,1680034,1680246,1681056,1681123,1681138,1681280,1681283,1681286,1681450,1681697,1681701,1681729,1681770,1681779,1681793,1681807,1681837-1681838,1681854,1681862,1681958,1682028,1682033,1682311,1682315,1682317,1682320,1682324,1682330,1682842,1684172,1684366,1684383,1684526-1684527,1684549-1684550,1685556,1685591,1685739,1685744,1685772,1685816,168582
 
6,1685891,1687242,1687261,1687268,1687340,1688563,1688841,1688878,165,1688896,1688901,1689345-1689346,1689357,1689656,1689675-1689677,1689679,1689687,1689825,1689856,1689918,1690011,1690021,1690054,1690080,1690209,1691134,1691487,1691813,1692744-1692747,1692849,1693088,1693105,1693429,1693461,1694058,1694111,1694290,1694501,1694548,1694658,1694660,1694788,1694872,16948

svn commit: r1703024 - /tomcat/trunk/java/org/apache/catalina/core/StandardContext.java

2015-09-14 Thread markt
Author: markt
Date: Mon Sep 14 18:30:22 2015
New Revision: 1703024

URL: http://svn.apache.org/r1703024
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58373
Fix rare data race with the application event listeners for StandardContext

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

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContext.java?rev=1703024&r1=1703023&r2=1703024&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Mon Sep 14 
18:30:22 2015
@@ -42,6 +42,7 @@ import java.util.Set;
 import java.util.Stack;
 import java.util.TreeMap;
 import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.concurrent.atomic.AtomicLong;
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReadWriteLock;
@@ -217,12 +218,11 @@ public class StandardContext extends Con
 private final Set noPluggabilityListeners = new HashSet<>();
 
 /**
- * The set of instantiated application event listener objects. Note that
+ * The list of instantiated application event listener objects. Note that
  * SCIs and other code may use the pluggability APIs to add listener
  * instances directly to this list before the application starts.
  */
-private Object applicationEventListenersObjects[] =
-new Object[0];
+private List applicationEventListenersList = new 
CopyOnWriteArrayList<>();
 
 
 /**
@@ -1150,26 +1150,34 @@ public class StandardContext extends Con
 
 @Override
 public Object[] getApplicationEventListeners() {
-return (applicationEventListenersObjects);
+return applicationEventListenersList.toArray();
 }
 
 
+/**
+ * {@inheritDoc}
+ *
+ * Note that this implementation is not thread safe. If two threads call
+ * this method concurrently, the result may be either set of listeners or a
+ * the union of both.
+ */
 @Override
 public void setApplicationEventListeners(Object listeners[]) {
-applicationEventListenersObjects = listeners;
+applicationEventListenersList.clear();
+if (listeners != null && listeners.length > 0) {
+applicationEventListenersList.addAll(Arrays.asList(listeners));
+}
 }
 
 
 /**
  * Add a listener to the end of the list of initialized application event
  * listeners.
+ *
+ * @param listener The listener to add
  */
 public void addApplicationEventListener(Object listener) {
-int len = applicationEventListenersObjects.length;
-Object[] newListeners = Arrays.copyOf(applicationEventListenersObjects,
-len + 1);
-newListeners[len] = listener;
-applicationEventListenersObjects = newListeners;
+applicationEventListenersList.add(listener);
 }
 
 
@@ -5578,7 +5586,7 @@ public class StandardContext extends Con
 distributable = false;
 
 applicationListeners = new String[0];
-applicationEventListenersObjects = new Object[0];
+applicationEventListenersList.clear();
 applicationLifecycleListenersObjects = new Object[0];
 jspConfigDescriptor = null;
 



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



svn commit: r1703007 - /tomcat/trunk/test/org/apache/tomcat/util/http/CookiesBaseTest.java

2015-09-14 Thread markt
Author: markt
Date: Mon Sep 14 17:39:41 2015
New Revision: 1703007

URL: http://svn.apache.org/r1703007
Log:
These tests expect the LegacyCookieProcessor

Modified:
tomcat/trunk/test/org/apache/tomcat/util/http/CookiesBaseTest.java

Modified: tomcat/trunk/test/org/apache/tomcat/util/http/CookiesBaseTest.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/http/CookiesBaseTest.java?rev=1703007&r1=1703006&r2=1703007&view=diff
==
--- tomcat/trunk/test/org/apache/tomcat/util/http/CookiesBaseTest.java 
(original)
+++ tomcat/trunk/test/org/apache/tomcat/util/http/CookiesBaseTest.java Mon Sep 
14 17:39:41 2015
@@ -70,6 +70,7 @@ public abstract class CookiesBaseTest ex
 public static void addServlets(Tomcat tomcat) {
 // No file system docBase required
 Context ctx = tomcat.addContext("", null);
+ctx.setCookieProcessor(new LegacyCookieProcessor());
 
 Tomcat.addServlet(ctx, "invalid", new CookieServlet("na;me", "value"));
 ctx.addServletMapping("/invalid", "invalid");



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



buildbot success in ASF Buildbot on tomcat-8-trunk

2015-09-14 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-8-trunk while 
building ASF Buildbot. Full details are available at:
http://ci.apache.org/builders/tomcat-8-trunk/builds/115

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

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-8-commit' 
triggered this build
Build Source Stamp: [branch tomcat/tc8.0.x/trunk] 1702985
Blamelist: markt

Build succeeded!

Sincerely,
 -The Buildbot




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



svn commit: r1702987 - /tomcat/trunk/test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java

2015-09-14 Thread markt
Author: markt
Date: Mon Sep 14 16:13:58 2015
New Revision: 1702987

URL: http://svn.apache.org/r1702987
Log:
Fix tests now that Tomcat no longer provides a reason phrase in the response 
line. For AJP it provides the status code as a String since some mod_jk / httpd 
2.2.x combinations can't handle a missing reason phrase.

Modified:
tomcat/trunk/test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java

Modified: tomcat/trunk/test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java?rev=1702987&r1=1702986&r2=1702987&view=diff
==
--- tomcat/trunk/test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java 
(original)
+++ tomcat/trunk/test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java Mon 
Sep 14 16:13:58 2015
@@ -310,7 +310,7 @@ public class TestAbstractAjpProcessor ex
 }
 
 // Expect 3 packets: headers, body, end
-validateResponseHeaders(responseHeaders, 200, "OK");
+validateResponseHeaders(responseHeaders, 200, "200");
 
 String body = extractResponseBody(ajpClient.readMessage());
 RequestDescriptor result = SnoopResult.parse(body);
@@ -511,7 +511,7 @@ public class TestAbstractAjpProcessor ex
 
 TesterAjpMessage responseHeaders = 
ajpClient.sendMessage(forwardMessage);
 // Expect 3 packets: headers, body, end
-validateResponseHeaders(responseHeaders, 403, "Forbidden");
+validateResponseHeaders(responseHeaders, 403, "403");
 //TesterAjpMessage responseBody = ajpClient.readMessage();
 //validateResponseBody(responseBody, HelloWorldServlet.RESPONSE_TEXT);
 validateResponseEnd(ajpClient.readMessage(), false);
@@ -525,7 +525,7 @@ public class TestAbstractAjpProcessor ex
 
 responseHeaders = ajpClient.sendMessage(forwardMessage);
 // Expect 3 packets: headers, body, end
-validateResponseHeaders(responseHeaders, 403, "Forbidden");
+validateResponseHeaders(responseHeaders, 403, "403");
 //responseBody = ajpClient.readMessage();
 //validateResponseBody(responseBody, HelloWorldServlet.RESPONSE_TEXT);
 validateResponseEnd(ajpClient.readMessage(), false);
@@ -539,7 +539,7 @@ public class TestAbstractAjpProcessor ex
 
 responseHeaders = ajpClient.sendMessage(forwardMessage);
 // Expect 3 packets: headers, body, end
-validateResponseHeaders(responseHeaders, 200, "OK");
+validateResponseHeaders(responseHeaders, 200, "200");
 TesterAjpMessage responseBody = ajpClient.readMessage();
 validateResponseBody(responseBody, HelloWorldServlet.RESPONSE_TEXT);
 validateResponseEnd(ajpClient.readMessage(), true);
@@ -576,7 +576,7 @@ public class TestAbstractAjpProcessor ex
 for (int i = 0; i < 2; i++) {
 TesterAjpMessage responseHeaders = 
ajpClient.sendMessage(forwardMessage);
 // Expect 3 packets: headers, body, end
-validateResponseHeaders(responseHeaders, 200, "OK");
+validateResponseHeaders(responseHeaders, 200, "200");
 TesterAjpMessage responseBody = ajpClient.readMessage();
 validateResponseBody(responseBody, 
HelloWorldServlet.RESPONSE_TEXT);
 validateResponseEnd(ajpClient.readMessage(), true);
@@ -593,14 +593,14 @@ public class TestAbstractAjpProcessor ex
 
 @Test
 public void testPost() throws Exception {
-doTestPost(false, HttpServletResponse.SC_OK, "OK");
+doTestPost(false, HttpServletResponse.SC_OK, "200");
 }
 
 
 @Test
 public void testPostMultipleContentLength() throws Exception {
 // Multiple content lengths
-doTestPost(true, HttpServletResponse.SC_BAD_REQUEST, "Bad Request");
+doTestPost(true, HttpServletResponse.SC_BAD_REQUEST, "400");
 }
 
 
@@ -679,7 +679,7 @@ public class TestAbstractAjpProcessor ex
 ajpClient.sendMessage(forwardMessage, null);
 
 // Expect 2 messages: headers, end
-validateResponseHeaders(responseHeaders, 304, "Not Modified");
+validateResponseHeaders(responseHeaders, 304, "304");
 validateResponseEnd(ajpClient.readMessage(), true);
 
 // Double check the connection is still open
@@ -738,7 +738,7 @@ public class TestAbstractAjpProcessor ex
 ajpClient.sendMessage(forwardMessage, null);
 
 // Expect 3 messages: headers, body, end
-validateResponseHeaders(responseHeaders, 200, "OK");
+validateResponseHeaders(responseHeaders, 200, "200");
 validateResponseBody(ajpClient.readMessage(),
 "Request Body length in bytes: 0");
 validateResponseEnd(ajpClient.readMessage(), true);
@@ -793,7 +793,7 @@ public class TestAbstractAjpProcessor ex
 TesterAjpMessage responseHeaders = 
ajpClient.sendMessage(forwardMessage);
 

[Bug 58372] Data race on field org.apache.catalina.connector.OutputBuffer.suspended

2015-09-14 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58372

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Mark Thomas  ---
Fixed in trunk and 8.0.x for 8.0.27 onwards.

-- 
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: r1702985 - in /tomcat/tc8.0.x/trunk: ./ java/org/apache/catalina/connector/OutputBuffer.java webapps/docs/changelog.xml

2015-09-14 Thread markt
Author: markt
Date: Mon Sep 14 16:09:51 2015
New Revision: 1702985

URL: http://svn.apache.org/r1702985
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58372
Fix rare data races closed and suspended flags that could be triggered by async 
processing.

Modified:
tomcat/tc8.0.x/trunk/   (props changed)
tomcat/tc8.0.x/trunk/java/org/apache/catalina/connector/OutputBuffer.java
tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc8.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Sep 14 16:09:51 2015
@@ -1 +1 @@
-/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886,1644890,1644892
 
,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657592,1657607,1657609,1657682,1657
 
907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966,1659043,1659053,1659059,1659188-1659189,1659216,1659263,1659293,1659304,1659306-1659307,1659382,1659384,1659428,1659471,1659486,1659505,1659516,1659521,1659524,1659559,1659562,1659803,1659806,1659814,1659833,1659862,1659905,1659919,1659948,1659967,1659983-1659984,1660060,1660074,1660077,1660133,1660168,1660331-1660332,1660353,1660358,1660924,1661386,1661867,1661972,1661990,1662200,1662308-1662309,1662548,1662614,1662736,1662985,1662988-1662989,1663264,1663277,1663298,1663534,1663562,1663676,1663715,1663754,1663768,1663772,1663781,1663893,1663995,1664143,1664163,1664174,1664301,1664317,1664347,1664657,1664659,1664710,1664863-1664864,1664866,1665085,1665292,1665559,1665653,1665661,1665672,1665694,1665697,1665736,1665779,1665976-1665977,1665980-1665981,1665985-1665986,1665989,1665998,1666004,1666008,1666013,1666017,1666024,1666116,1666386-1666387,1666494,1666496,1666552,1666569,1666579,137,149,1
 
666757,1666966,1666972,1666985,1666995,1666997,1667292,1667402,1667406,1667546,1667615,1667630,1667636,1667688,1667764,1667871,1668026,1668135,1668193,1668593,1668596,1668630,1668639,1668843,1669353,1669370,1669451,1669800,1669838,1669876,1669882,1670394,1670433,1670591,1670598-1670600,1670610,1670631,1670719,1670724,1670726,1670730,1670940,1671112,1672272,1672284,1673754,1674294,1675461,1675486,1675594,1675830,1676231,1676250-1676251,1676364,1676381,1676393,1676479,1676525,1676552,1676615,1676630,1676634,1676721,1676926,1676943,1677140,1677802,1678011,1678162,1678174,1678339,1678426-1678427,1678694,1678701,1679534,1679708,1679710,1679716,1680034,1680246,1681056,1681123,1681138,1681280,1681283,1681286,1681450,1681697,1681701,1681729,1681770,1681779,1681793,1681807,1681837-1681838,1681854,1681862,1681958,1682028,1682033,1682311,1682315,1682317,1682320,1682324,1682330,1682842,1684172,1684366,1684383,1684526-1684527,1684549-1684550,1685556,1685591,1685739,1685744,1685772,1685816,168582
 
6,1685891,1687242,1687261,1687268,1687340,1688563,1688841,1688878,165,1688896,1688901,1689345-1689346,1689357,1689656,1689675-1689677,1689679,1689687,1689825,1689856,1689918,1690011,1690021,1690054,1690080,1690209,1691134,1691487,1691813,1692744-1692747,1692849,1693088,1693105,1693429,1693461,1694058,1694111,1694290,1694501,1694548,1694658,1694660,16

svn commit: r1702984 - /tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java

2015-09-14 Thread markt
Author: markt
Date: Mon Sep 14 16:07:19 2015
New Revision: 1702984

URL: http://svn.apache.org/r1702984
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58372
Fix rare data races closed and suspended flags that could be triggered by async 
processing.

Modified:
tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.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=1702984&r1=1702983&r2=1702984&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java Mon Sep 
14 16:07:19 2015
@@ -94,7 +94,7 @@ public class OutputBuffer extends Writer
 /**
  * Flag which indicates if the output buffer is closed.
  */
-private boolean closed = false;
+private volatile boolean closed = false;
 
 
 /**
@@ -136,7 +136,7 @@ public class OutputBuffer extends Writer
 /**
  * Suspended flag. All output bytes will be swallowed if this is true.
  */
-private boolean suspended = false;
+private volatile boolean suspended = false;
 
 
 // --- Constructors



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



svn commit: r1702981 - /tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java

2015-09-14 Thread markt
Author: markt
Date: Mon Sep 14 15:59:24 2015
New Revision: 1702981

URL: http://svn.apache.org/r1702981
Log:
Remove (duplicate) references to deleted class.

Modified:
tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java

Modified: tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java?rev=1702981&r1=1702980&r2=1702981&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java Mon 
Sep 14 15:59:24 2015
@@ -269,12 +269,10 @@ public final class SecurityClassLoad {
 loader.loadClass(basePackage + "util.buf.StringCache$ByteEntry");
 loader.loadClass(basePackage + "util.buf.StringCache$CharEntry");
 // http
-loader.loadClass(basePackage + "util.http.HttpMessages");
 // Make sure system property is read at this point
 Class clazz = loader.loadClass(
 basePackage + "util.http.FastHttpDateFormat");
 clazz.newInstance();
-loader.loadClass(basePackage + "util.http.HttpMessages");
 loader.loadClass(basePackage + "util.http.parser.HttpParser");
 loader.loadClass(basePackage + "util.http.parser.MediaType");
 loader.loadClass(basePackage + "util.http.parser.MediaTypeCache");



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



buildbot exception in ASF Buildbot on tomcat-8-trunk

2015-09-14 Thread buildbot
The Buildbot has detected a build exception on builder tomcat-8-trunk while 
building ASF Buildbot. Full details are available at:
http://ci.apache.org/builders/tomcat-8-trunk/builds/114

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

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-8-commit' 
triggered this build
Build Source Stamp: [branch tomcat/tc8.0.x/trunk] 1702973
Blamelist: markt

BUILD FAILED: exception upload_2

Sincerely,
 -The Buildbot




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



svn commit: r1702979 - /tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java

2015-09-14 Thread markt
Author: markt
Date: Mon Sep 14 15:52:16 2015
New Revision: 1702979

URL: http://svn.apache.org/r1702979
Log:
Fix tests now that Tomcat no longer provides a reason phrase in the response 
line.

Modified:
tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java

Modified: 
tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java?rev=1702979&r1=1702978&r2=1702979&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java 
Mon Sep 14 15:52:16 2015
@@ -185,7 +185,7 @@ public class TestNonBlockingAPI extends
 int lineStart = 0;
 int lineEnd = resultString.indexOf('\n', 0);
 String line = resultString.substring(lineStart, lineEnd + 1);
-Assert.assertEquals("HTTP/1.1 200 OK\r\n", line);
+Assert.assertEquals("HTTP/1.1 200 \r\n", line);
 
 // Check headers - looking to see if response is chunked (it should be)
 boolean chunked = false;
@@ -337,7 +337,7 @@ public class TestNonBlockingAPI extends
 int lineStart = 0;
 int lineEnd = resultString.indexOf('\n', 0);
 String line = resultString.substring(lineStart, lineEnd + 1);
-Assert.assertEquals("HTTP/1.1 200 OK\r\n", line);
+Assert.assertEquals("HTTP/1.1 200 \r\n", line);
 
 // Listeners are invoked and access valve entries created on a 
different
 // thread so give that thread a chance to complete its work.



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



[Bug 58371] Data races on field org.apache.tomcat.util.buf.MessageBytes.hasStrValue & strValue

2015-09-14 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58371

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #2 from Mark Thomas  ---
root cause is trying to build the request statistics when switching from sync
to async rather than waiting until the request processing is complete.

Fixed in trunk and 8.0.x for 8.0.27 onwards.

-- 
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: r1702973 - in /tomcat/tc8.0.x/trunk: ./ java/org/apache/coyote/http11/AbstractHttp11Processor.java webapps/docs/changelog.xml

2015-09-14 Thread markt
Author: markt
Date: Mon Sep 14 15:42:41 2015
New Revision: 1702973

URL: http://svn.apache.org/r1702973
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58371
Fix data race accessing request URI in String form when switching from 
non-async to async due to early triggering of the gathering of request 
statistics.

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

tomcat/tc8.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc8.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Sep 14 15:42:41 2015
@@ -1 +1 @@
-/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886,1644890,1644892
 
,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657592,1657607,1657609,1657682,1657
 
907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966,1659043,1659053,1659059,1659188-1659189,1659216,1659263,1659293,1659304,1659306-1659307,1659382,1659384,1659428,1659471,1659486,1659505,1659516,1659521,1659524,1659559,1659562,1659803,1659806,1659814,1659833,1659862,1659905,1659919,1659948,1659967,1659983-1659984,1660060,1660074,1660077,1660133,1660168,1660331-1660332,1660353,1660358,1660924,1661386,1661867,1661972,1661990,1662200,1662308-1662309,1662548,1662614,1662736,1662985,1662988-1662989,1663264,1663277,1663298,1663534,1663562,1663676,1663715,1663754,1663768,1663772,1663781,1663893,1663995,1664143,1664163,1664174,1664301,1664317,1664347,1664657,1664659,1664710,1664863-1664864,1664866,1665085,1665292,1665559,1665653,1665661,1665672,1665694,1665697,1665736,1665779,1665976-1665977,1665980-1665981,1665985-1665986,1665989,1665998,1666004,1666008,1666013,1666017,1666024,1666116,1666386-1666387,1666494,1666496,1666552,1666569,1666579,137,149,1
 
666757,1666966,1666972,1666985,1666995,1666997,1667292,1667402,1667406,1667546,1667615,1667630,1667636,1667688,1667764,1667871,1668026,1668135,1668193,1668593,1668596,1668630,1668639,1668843,1669353,1669370,1669451,1669800,1669838,1669876,1669882,1670394,1670433,1670591,1670598-1670600,1670610,1670631,1670719,1670724,1670726,1670730,1670940,1671112,1672272,1672284,1673754,1674294,1675461,1675486,1675594,1675830,1676231,1676250-1676251,1676364,1676381,1676393,1676479,1676525,1676552,1676615,1676630,1676634,1676721,1676926,1676943,1677140,1677802,1678011,1678162,1678174,1678339,1678426-1678427,1678694,1678701,1679534,1679708,1679710,1679716,1680034,1680246,1681056,1681123,1681138,1681280,1681283,1681286,1681450,1681697,1681701,1681729,1681770,1681779,1681793,1681807,1681837-1681838,1681854,1681862,1681958,1682028,1682033,1682311,1682315,1682317,1682320,1682324,1682330,1682842,1684172,1684366,1684383,1684526-1684527,1684549-1684550,1685556,1685591,1685739,1685744,1685772,1685816,168582
 
6,1685891,1687242,1687261,1687268,1687340,1688563,1688841,1688878,165,1688896,1688901,1689345-1689346,1689357,1689656,1689675-1689677,1689679,1689687,1689825,1689856,1689918,1690011,1690021,1690054,1690080,1690209,1691134,1691487,1691813,1692744-1692747,1692849,1693088,1693105,1693

svn commit: r1702971 - /tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java

2015-09-14 Thread markt
Author: markt
Date: Mon Sep 14 15:39:46 2015
New Revision: 1702971

URL: http://svn.apache.org/r1702971
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58371
Fix data race accessing request URI in String form when switching from 
non-async to async due to early triggering of the gathering of request 
statistics.

Modified:
tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java?rev=1702971&r1=1702970&r2=1702971&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java Mon Sep 14 
15:39:46 2015
@@ -1142,9 +1142,9 @@ public class Http11Processor extends Abs
 if (getErrorState().isError()) {
 response.setStatus(500);
 }
-request.updateCounters();
 
 if (!isAsync() || getErrorState().isError()) {
+request.updateCounters();
 if (getErrorState().isIoAllowed()) {
 inputBuffer.nextRequest();
 outputBuffer.nextRequest();
@@ -1751,10 +1751,12 @@ public class Http11Processor extends Abs
 rp.setStage(org.apache.coyote.Constants.STAGE_ENDED);
 
 if (getErrorState().isError()) {
+request.updateCounters();
 return SocketState.CLOSED;
 } else if (isAsync()) {
 return SocketState.LONG;
 } else {
+request.updateCounters();
 if (!keepAlive) {
 return SocketState.CLOSED;
 } else {



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



svn commit: r1702970 - in /tomcat/trunk/test/org/apache/catalina/authenticator: TestNonLoginAndBasicAuthenticator.java TestSSOnonLoginAndBasicAuthenticator.java TestSSOnonLoginAndDigestAuthenticator.j

2015-09-14 Thread markt
Author: markt
Date: Mon Sep 14 15:36:35 2015
New Revision: 1702970

URL: http://svn.apache.org/r1702970
Log:
Fix various cookie related issues in Authenticator tests now the RFC6265 cookie 
parser is used by default

Modified:

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

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

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

Modified: 
tomcat/trunk/test/org/apache/catalina/authenticator/TestNonLoginAndBasicAuthenticator.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/authenticator/TestNonLoginAndBasicAuthenticator.java?rev=1702970&r1=1702969&r2=1702970&view=diff
==
--- 
tomcat/trunk/test/org/apache/catalina/authenticator/TestNonLoginAndBasicAuthenticator.java
 (original)
+++ 
tomcat/trunk/test/org/apache/catalina/authenticator/TestNonLoginAndBasicAuthenticator.java
 Mon Sep 14 15:36:35 2015
@@ -356,8 +356,8 @@ public class TestNonLoginAndBasicAuthent
 Map> reqHeaders = new HashMap<>();
 Map> respHeaders = new HashMap<>();
 
-if (useCookie && (cookies != null)) {
-reqHeaders.put(CLIENT_COOKIE_HEADER + ":", cookies);
+if (useCookie) {
+addCookies(reqHeaders);
 }
 
 ByteChunk bc = new ByteChunk();
@@ -379,8 +379,8 @@ public class TestNonLoginAndBasicAuthent
 Map> reqHeaders = new HashMap<>();
 Map> respHeaders = new HashMap<>();
 
-if (useCookie && (cookies != null)) {
-reqHeaders.put(CLIENT_COOKIE_HEADER + ":", cookies);
+if (useCookie) {
+addCookies(reqHeaders);
 }
 else {
 if (credentials != null) {
@@ -415,7 +415,7 @@ public class TestNonLoginAndBasicAuthent
 List newCookies = respHeaders.get(SERVER_COOKIE_HEADER);
 if (newCookies != null) {
 // harvest cookies whenever the server sends some new ones
-cookies = newCookies;
+saveCookies(respHeaders);
 }
 }
 }
@@ -568,4 +568,41 @@ public class TestNonLoginAndBasicAuthent
 return credentials;
 }
 }
+
+/*
+ * extract and save the server cookies from the incoming response
+ */
+protected void saveCookies(Map> respHeaders) {
+// we only save the Cookie values, not header prefix
+List cookieHeaders = respHeaders.get(SERVER_COOKIE_HEADER);
+if (cookieHeaders == null) {
+cookies = null;
+} else {
+cookies = new ArrayList<>(cookieHeaders.size());
+for (String cookieHeader : cookieHeaders) {
+cookies.add(cookieHeader.substring(0, 
cookieHeader.indexOf(';')));
+}
+}
+}
+
+/*
+ * add all saved cookies to the outgoing request
+ */
+protected void addCookies(Map> reqHeaders) {
+if ((cookies != null) && (cookies.size() > 0)) {
+StringBuilder cookieHeader = new StringBuilder();
+boolean first = true;
+for (String cookie : cookies) {
+if (!first) {
+cookieHeader.append(';');
+} else {
+first = false;
+}
+cookieHeader.append(cookie);
+}
+List cookieHeaderList = new ArrayList<>(1);
+cookieHeaderList.add(cookieHeader.toString());
+reqHeaders.put(CLIENT_COOKIE_HEADER, cookieHeaderList);
+}
+}
 }
\ No newline at end of file

Modified: 
tomcat/trunk/test/org/apache/catalina/authenticator/TestSSOnonLoginAndBasicAuthenticator.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/authenticator/TestSSOnonLoginAndBasicAuthenticator.java?rev=1702970&r1=1702969&r2=1702970&view=diff
==
--- 
tomcat/trunk/test/org/apache/catalina/authenticator/TestSSOnonLoginAndBasicAuthenticator.java
 (original)
+++ 
tomcat/trunk/test/org/apache/catalina/authenticator/TestSSOnonLoginAndBasicAuthenticator.java
 Mon Sep 14 15:36:35 2015
@@ -355,7 +355,7 @@ public class TestSSOnonLoginAndBasicAuth
 Map> respHeaders = new HashMap<>();
 
 if (useCookie && (cookies != null)) {
-reqHeaders.put(CLIENT_COOKIE_HEADER + ":", cookies);
+addCookies(reqHeaders);
 }
 
 ByteChunk bc = new ByteChunk();
@@ -379,7 +379,7 @@ public class TestSSOnonLoginAndBasicAuth
 Map> respHeaders = new HashMap<>();
 
 if (useCookie && (cookies != null)) {
-reqHeaders.put(CLIENT_COOKIE_HEADER + ":", cookies);
+addCookies(reqHeaders);
 }
 else {
 if (credentials != null) {
@@ -554,18 +554,36 @@ public class Test

svn commit: r1702962 - /tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

2015-09-14 Thread remm
Author: remm
Date: Mon Sep 14 14:44:06 2015
New Revision: 1702962

URL: http://svn.apache.org/r1702962
Log:
Similar to NIO2, async NIO sendfile needs to deallocate and recycle the buffer.

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

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1702962&r1=1702961&r2=1702962&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Mon Sep 14 
14:44:06 2015
@@ -552,6 +552,26 @@ public class NioEndpoint extends Abstrac
 }
 
 
+private void close(NioChannel socket, SelectionKey key) {
+try {
+if (socket.getPoller().cancelledKey(key) != null) {
+// SocketWrapper (attachment) was removed from the
+// key - recycle the key. This can only happen once
+// per attempted closure so it is used to determine
+// whether or not to return the key to the cache.
+// We do NOT want to do this more than once - see BZ
+// 57340 / 57943.
+if (running && !paused) {
+if (!nioChannels.push(socket)) {
+socket.free();
+}
+}
+}
+} catch (Exception x) {
+log.error("",x);
+}
+}
+
 private void closeSocket(SocketChannel socket) {
 try {
 socket.socket().close();
@@ -984,7 +1004,7 @@ public class NioEndpoint extends Abstrac
 if (log.isDebugEnabled()) {
 log.debug("Send file connection is being 
closed");
 }
-cancelledKey(sk);
+close(sc, sk);
 }
 }
 return SendfileState.DONE;
@@ -1001,11 +1021,19 @@ public class NioEndpoint extends Abstrac
 }
 } catch (IOException x) {
 if (log.isDebugEnabled()) log.debug("Unable to complete 
sendfile request:", x);
-cancelledKey(sk);
+if (!calledByProcessor && sc != null) {
+close(sc, sk);
+} else {
+cancelledKey(sk);
+}
 return SendfileState.ERROR;
 } catch (Throwable t) {
 log.error("", t);
-cancelledKey(sk);
+if (!calledByProcessor && sc != null) {
+close(sc, sk);
+} else {
+cancelledKey(sk);
+}
 return SendfileState.ERROR;
 } finally {
 if (sc!=null) sc.setSendFile(false);
@@ -1547,25 +1575,6 @@ public class NioEndpoint extends Abstrac
 }
 }
 
-private void close(NioChannel socket, SelectionKey key) {
-try {
-if (socket.getPoller().cancelledKey(key) != null) {
-// SocketWrapper (attachment) was removed from the
-// key - recycle the key. This can only happen once
-// per attempted closure so it is used to determine
-// whether or not to return the key to the cache.
-// We do NOT want to do this more than once - see BZ
-// 57340 / 57943.
-if (running && !paused) {
-if (!nioChannels.push(socket)) {
-socket.free();
-}
-}
-}
-} catch (Exception x) {
-log.error("",x);
-}
-}
 }
 
 // --- SendfileData Inner Class



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



Re: svn commit: r1702765 - in /tomcat/trunk: java/org/apache/coyote/ java/org/apache/coyote/ajp/ java/org/apache/coyote/http11/ java/org/apache/tomcat/util/http/ java/org/apache/tomcat/util/http/res/

2015-09-14 Thread Mark Thomas
On 14/09/2015 15:06, Mark Thomas wrote:
> On 14/09/2015 14:33, Rémy Maucherat wrote:
>> 2015-09-13 13:55 GMT+02:00 :
>>
>>> Author: markt
>>> Date: Sun Sep 13 11:55:39 2015
>>> New Revision: 1702765
>>>
>>> URL: http://svn.apache.org/r1702765
>>> Log:
>>> RFC 7230 states that clients should ignore reason phrases in HTTP/1.1
>>> response messages. Since the reason phrase is optional, Tomcat no longer
>>> sends it.
>>> As a result the system property
>>> org.apache.coyote.USE_CUSTOM_STATUS_MSG_IN_HEADER is no longer
>>> used and has been removed.
>>>
>>> Removed:
>>> tomcat/trunk/java/org/apache/tomcat/util/http/HttpMessages.java
>>> tomcat/trunk/java/org/apache/tomcat/util/http/res/
>>> Modified:
>>> tomcat/trunk/java/org/apache/coyote/Constants.java
>>> tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java
>>> tomcat/trunk/java/org/apache/coyote/http11/Http11OutputBuffer.java
>>> tomcat/trunk/webapps/docs/changelog.xml
>>> tomcat/trunk/webapps/docs/config/systemprops.xml
>>>
>> I suppose this is more modern and all, but a significant number of tests
>> used them and now fail. To be fixed later I guess.
> 
> Mainly faster / simpler more than anything else.
> 
> I haven't been keeping too close an eye on the tests because of the all
> the false positives. I generally only look at them around the release
> time. If this has broken some, I'll take a look now.

It looks like the change in CookieParser is the trigger for most of the
Authenticator failures. Working on a fix now.

Mark


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



Re: svn commit: r1702765 - in /tomcat/trunk: java/org/apache/coyote/ java/org/apache/coyote/ajp/ java/org/apache/coyote/http11/ java/org/apache/tomcat/util/http/ java/org/apache/tomcat/util/http/res/

2015-09-14 Thread Konstantin Kolinko
2015-09-13 14:55 GMT+03:00  :
> Author: markt
> Date: Sun Sep 13 11:55:39 2015
> New Revision: 1702765
>
> URL: http://svn.apache.org/r1702765
> Log:
> RFC 7230 states that clients should ignore reason phrases in HTTP/1.1 
> response messages. Since the reason phrase is optional, Tomcat no longer 
> sends it.
> As a result the system property 
> org.apache.coyote.USE_CUSTOM_STATUS_MSG_IN_HEADER is no longer 
> used and has been removed.
>

1. I verified that it is optional in legacy HTTP/1.0 specification as
well (RFC 1945)

   Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF

   Reason-Phrase  = *


2. I suspect that there might be non-browser clients, that may use
reason phrase. There may be some specific-use (targeted) clients, that
may break.

Personally I would prefer that this feature were optional.

An example: XMLHttpRequest object has statusText  property. If someone
uses it to display an error message, showing "404 Not Found" is better
than just "404". The reason phrase is useless, but it provides context
that helps a human user to interpret "404" as HTTP status code and not
some random numeric.
https://developer.mozilla.org/ru/docs/Web/API/XMLHttpRequest

3. Reviewing Servlet API,
 (HttpServletResponse#sendError(int,String), #setStatus(int, String)).

The sendError() does not mention that the string is a reason phrase,
but says that it will be used in text of a HTML error page. So we are
OK here.

The 2-arguments setStatus() method is deprecated. From javadoc one may
think that "the status message" argument here is the reason phrase.
If anybody relies on this behaviour, it is now broken.  Maybe clarify
the javadoc.

We are OK to change a depreated method, as it is bad to rely on
deprecated methods. But the reason for deprecation says that the
method is ambiguous, not that it is broken.


Best regards,
Konstantin Kolinko

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



Re: svn commit: r1702765 - in /tomcat/trunk: java/org/apache/coyote/ java/org/apache/coyote/ajp/ java/org/apache/coyote/http11/ java/org/apache/tomcat/util/http/ java/org/apache/tomcat/util/http/res/

2015-09-14 Thread Mark Thomas
On 14/09/2015 14:33, Rémy Maucherat wrote:
> 2015-09-13 13:55 GMT+02:00 :
> 
>> Author: markt
>> Date: Sun Sep 13 11:55:39 2015
>> New Revision: 1702765
>>
>> URL: http://svn.apache.org/r1702765
>> Log:
>> RFC 7230 states that clients should ignore reason phrases in HTTP/1.1
>> response messages. Since the reason phrase is optional, Tomcat no longer
>> sends it.
>> As a result the system property
>> org.apache.coyote.USE_CUSTOM_STATUS_MSG_IN_HEADER is no longer
>> used and has been removed.
>>
>> Removed:
>> tomcat/trunk/java/org/apache/tomcat/util/http/HttpMessages.java
>> tomcat/trunk/java/org/apache/tomcat/util/http/res/
>> Modified:
>> tomcat/trunk/java/org/apache/coyote/Constants.java
>> tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java
>> tomcat/trunk/java/org/apache/coyote/http11/Http11OutputBuffer.java
>> tomcat/trunk/webapps/docs/changelog.xml
>> tomcat/trunk/webapps/docs/config/systemprops.xml
>>
> I suppose this is more modern and all, but a significant number of tests
> used them and now fail. To be fixed later I guess.

Mainly faster / simpler more than anything else.

I haven't been keeping too close an eye on the tests because of the all
the false positives. I generally only look at them around the release
time. If this has broken some, I'll take a look now.

Mark


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



svn commit: r1702957 - /tomcat/trunk/java/org/apache/el/parser/SimpleCharStream.java

2015-09-14 Thread markt
Author: markt
Date: Mon Sep 14 14:04:46 2015
New Revision: 1702957

URL: http://svn.apache.org/r1702957
Log:
Revert r1702932

Modified:
tomcat/trunk/java/org/apache/el/parser/SimpleCharStream.java

Modified: tomcat/trunk/java/org/apache/el/parser/SimpleCharStream.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/el/parser/SimpleCharStream.java?rev=1702957&r1=1702956&r2=1702957&view=diff
==
--- tomcat/trunk/java/org/apache/el/parser/SimpleCharStream.java (original)
+++ tomcat/trunk/java/org/apache/el/parser/SimpleCharStream.java Mon Sep 14 
14:04:46 2015
@@ -202,6 +202,22 @@ public class SimpleCharStream
 return c;
   }
 
+  @Deprecated
+  /**
+   * @deprecated
+   * @see #getEndColumn
+   */
+
+  public int getColumn() {
+return bufcolumn[bufpos];
+  }
+
+  @Deprecated
+  /**
+   * @deprecated
+   * @see #getEndLine
+   */
+
   public int getLine() {
 return bufline[bufpos];
   }



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



Re: svn commit: r1702932 - /tomcat/trunk/java/org/apache/el/parser/SimpleCharStream.java

2015-09-14 Thread Mark Thomas
On 14/09/2015 14:01, Konstantin Kolinko wrote:
> 2015-09-14 15:48 GMT+03:00  :
>> Author: markt
>> Date: Mon Sep 14 12:48:08 2015
>> New Revision: 1702932
>>
>> URL: http://svn.apache.org/r1702932
>> Log:
>> Remove deprecated code
>>
>> Modified:
>> tomcat/trunk/java/org/apache/el/parser/SimpleCharStream.java
>>
>> Modified: tomcat/trunk/java/org/apache/el/parser/SimpleCharStream.java
>> URL: 
>> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/el/parser/SimpleCharStream.java?rev=1702932&r1=1702931&r2=1702932&view=diff
>> ==
>> --- tomcat/trunk/java/org/apache/el/parser/SimpleCharStream.java (original)
>> +++ tomcat/trunk/java/org/apache/el/parser/SimpleCharStream.java Mon Sep 14 
>> 12:48:08 2015
>> @@ -202,22 +202,6 @@ public class SimpleCharStream
>>  return c;
>>}
>>
>> -  @Deprecated
>> -  /**
>> -   * @deprecated
>> -   * @see #getEndColumn
>> -   */
>> -
>> -  public int getColumn() {
>> -return bufcolumn[bufpos];
>> -  }
>> -
>> -  @Deprecated
>> -  /**
>> -   * @deprecated
>> -   * @see #getEndLine
>> -   */
>> -
>>public int getLine() {
>>  return bufline[bufpos];
>>}
>>
> 
> 
> I guess you wanted to remove getLine() method.  You only removed
> deprecation marker/comment from it.

Actually, I probably didn't want to change this at all. It is generated
code. I didn't notice that going through the results of my search for
'deprecat'.

Mark


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



Re: svn commit: r1702765 - in /tomcat/trunk: java/org/apache/coyote/ java/org/apache/coyote/ajp/ java/org/apache/coyote/http11/ java/org/apache/tomcat/util/http/ java/org/apache/tomcat/util/http/res/

2015-09-14 Thread Rémy Maucherat
2015-09-13 13:55 GMT+02:00 :

> Author: markt
> Date: Sun Sep 13 11:55:39 2015
> New Revision: 1702765
>
> URL: http://svn.apache.org/r1702765
> Log:
> RFC 7230 states that clients should ignore reason phrases in HTTP/1.1
> response messages. Since the reason phrase is optional, Tomcat no longer
> sends it.
> As a result the system property
> org.apache.coyote.USE_CUSTOM_STATUS_MSG_IN_HEADER is no longer
> used and has been removed.
>
> Removed:
> tomcat/trunk/java/org/apache/tomcat/util/http/HttpMessages.java
> tomcat/trunk/java/org/apache/tomcat/util/http/res/
> Modified:
> tomcat/trunk/java/org/apache/coyote/Constants.java
> tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java
> tomcat/trunk/java/org/apache/coyote/http11/Http11OutputBuffer.java
> tomcat/trunk/webapps/docs/changelog.xml
> tomcat/trunk/webapps/docs/config/systemprops.xml
>
> I suppose this is more modern and all, but a significant number of tests
used them and now fail. To be fixed later I guess.

Rémy


svn commit: r1702949 - in /tomcat/trunk/java/org/apache/tomcat/util/net: Nio2Endpoint.java SecureNio2Channel.java

2015-09-14 Thread remm
Author: remm
Date: Mon Sep 14 13:31:30 2015
New Revision: 1702949

URL: http://svn.apache.org/r1702949
Log:
Improve processing for async IO errors so that it goes through the normal code 
(including the "free" buffer method).

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java?rev=1702949&r1=1702948&r2=1702949&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java Mon Sep 14 
13:31:30 2015
@@ -1639,6 +1639,8 @@ public class Nio2Endpoint extends Abstra
 if (socket.getSocket().isHandshakeComplete() ||
 status == SocketStatus.STOP) {
 handshake = 0;
+} else if (status == SocketStatus.ERROR) {
+handshake = -1;
 } else {
 handshake = socket.getSocket().handshake();
 // The handshake process reads/writes from/to 
the

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java?rev=1702949&r1=1702948&r2=1702949&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java Mon Sep 
14 13:31:30 2015
@@ -92,7 +92,7 @@ public class SecureNio2Channel extends N
 }
 @Override
 public void failed(Throwable exc, SocketWrapperBase 
attachment) {
-endpoint.closeSocket(attachment);
+endpoint.processSocket(attachment, SocketStatus.ERROR, false);
 }
 };
 handshakeWriteCompletionHandler = new CompletionHandler>() {
@@ -106,7 +106,7 @@ public class SecureNio2Channel extends N
 }
 @Override
 public void failed(Throwable exc, SocketWrapperBase 
attachment) {
-endpoint.closeSocket(attachment);
+endpoint.processSocket(attachment, SocketStatus.ERROR, false);
 }
 };
 }



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



Re: svn commit: r1702932 - /tomcat/trunk/java/org/apache/el/parser/SimpleCharStream.java

2015-09-14 Thread Konstantin Kolinko
2015-09-14 15:48 GMT+03:00  :
> Author: markt
> Date: Mon Sep 14 12:48:08 2015
> New Revision: 1702932
>
> URL: http://svn.apache.org/r1702932
> Log:
> Remove deprecated code
>
> Modified:
> tomcat/trunk/java/org/apache/el/parser/SimpleCharStream.java
>
> Modified: tomcat/trunk/java/org/apache/el/parser/SimpleCharStream.java
> URL: 
> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/el/parser/SimpleCharStream.java?rev=1702932&r1=1702931&r2=1702932&view=diff
> ==
> --- tomcat/trunk/java/org/apache/el/parser/SimpleCharStream.java (original)
> +++ tomcat/trunk/java/org/apache/el/parser/SimpleCharStream.java Mon Sep 14 
> 12:48:08 2015
> @@ -202,22 +202,6 @@ public class SimpleCharStream
>  return c;
>}
>
> -  @Deprecated
> -  /**
> -   * @deprecated
> -   * @see #getEndColumn
> -   */
> -
> -  public int getColumn() {
> -return bufcolumn[bufpos];
> -  }
> -
> -  @Deprecated
> -  /**
> -   * @deprecated
> -   * @see #getEndLine
> -   */
> -
>public int getLine() {
>  return bufline[bufpos];
>}
>


I guess you wanted to remove getLine() method.  You only removed
deprecation marker/comment from it.

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



Re: NIO sendfile

2015-09-14 Thread Rémy Maucherat
2015-09-14 14:45 GMT+02:00 jean-frederic clere :

> Somehow that didn't help:
> +++
> 745 Exception in thread "https-nio-8003-exec-95" Exception in thread
> "https-nio-8003-exec-56" Exception in thread "https-nio-8003-exec-66"
> Exception in thread "https-nio-8003-exec-58" Exception in thread
> "https-nio-8003-Acceptor-0" java.lang.OutOfMemoryError: Direct buffer memory
> 746 at java.nio.Bits.reserveMemory(Bits.java:658)
> 747 at
> java.nio.DirectByteBuffer.(DirectByteBuffer.java:123)
> 748 at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:311)
> 749 at org.apache.tomcat.util.net
> .SocketBufferHandler.(SocketBufferHandler.java:38)
> 750 at org.apache.tomcat.util.net
> .NioEndpoint.setSocketOptions(NioEndpoint.java:405)
> 751 at org.apache.tomcat.util.net
> .NioEndpoint$Acceptor.run(NioEndpoint.java:531)
> 752 at java.lang.Thread.run(Thread.java:745)
> 753 java.lang.OutOfMemoryError: Direct buffer memory
> 754 at java.nio.Bits.reserveMemory(Bits.java:658)
> 755 at
> java.nio.DirectByteBuffer.(DirectByteBuffer.java:123)
> 756 at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:311)
> 757 at
> org.apache.tomcat.util.buf.ByteBufferUtils.expand(ByteBufferUtils.java:80)
> 758 at org.apache.tomcat.util.net
> .SecureNioChannel.processSNI(SecureNioChannel.java:311)
> 759 at org.apache.tomcat.util.net
> .SecureNioChannel.handshake(SecureNioChannel.java:169)
> 760 at org.apache.tomcat.util.net
> .NioEndpoint$SocketProcessor.run(NioEndpoint.java:1498)
> 761 at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> 762 at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> 763 at
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
> 764 at java.lang.Thread.run(Thread.java:745)
> +++
>
> By default  -XX:MaxDirectMemorySize=0 (automatic, what is automatic here?)
>
> Any hints?
>
> I don't think everything is going through the buffer deallocation code,
but it's a bit hairy with NIO. And it shouldn't happen unless there are
already problems.

Rémy


buildbot failure in ASF Buildbot on tomcat-trunk

2015-09-14 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-trunk while building 
ASF Buildbot. Full details are available at:
http://ci.apache.org/builders/tomcat-trunk/builds/259

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

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' 
triggered this build
Build Source Stamp: [branch tomcat/trunk] 1702923
Blamelist: markt

BUILD FAILED: failed compile_1

Sincerely,
 -The Buildbot




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



svn commit: r1702933 - /tomcat/trunk/java/org/apache/tomcat/util/modeler/Registry.java

2015-09-14 Thread markt
Author: markt
Date: Mon Sep 14 12:48:25 2015
New Revision: 1702933

URL: http://svn.apache.org/r1702933
Log:
Remove comments that refer to code long since removed.

Modified:
tomcat/trunk/java/org/apache/tomcat/util/modeler/Registry.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/modeler/Registry.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/modeler/Registry.java?rev=1702933&r1=1702932&r2=1702933&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/modeler/Registry.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/modeler/Registry.java Mon Sep 14 
12:48:25 2015
@@ -59,10 +59,6 @@ import org.apache.tomcat.util.modeler.mo
  * This is the main entry point into modeler. It provides methods to create
  * and manipulate model mbeans and simplify their use.
  *
- * Starting with version 1.1, this is no longer a singleton and the static
- * methods are strongly deprecated. In a container environment we can expect
- * different applications to use different registries.
- *
  * This class is itself an mbean.
  *
  * IMPORTANT: public methods not marked with @since x.x are experimental or
@@ -134,9 +130,6 @@ public class Registry implements Registr
  * Factory method to create (if necessary) and return our
  * Registry instance.
  *
- * Use this method to obtain a Registry - all other static methods
- * are deprecated and shouldn't be used.
- *
  * The current version uses a static - future versions could use
  * the thread class loader.
  *



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



svn commit: r1702932 - /tomcat/trunk/java/org/apache/el/parser/SimpleCharStream.java

2015-09-14 Thread markt
Author: markt
Date: Mon Sep 14 12:48:08 2015
New Revision: 1702932

URL: http://svn.apache.org/r1702932
Log:
Remove deprecated code

Modified:
tomcat/trunk/java/org/apache/el/parser/SimpleCharStream.java

Modified: tomcat/trunk/java/org/apache/el/parser/SimpleCharStream.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/el/parser/SimpleCharStream.java?rev=1702932&r1=1702931&r2=1702932&view=diff
==
--- tomcat/trunk/java/org/apache/el/parser/SimpleCharStream.java (original)
+++ tomcat/trunk/java/org/apache/el/parser/SimpleCharStream.java Mon Sep 14 
12:48:08 2015
@@ -202,22 +202,6 @@ public class SimpleCharStream
 return c;
   }
 
-  @Deprecated
-  /**
-   * @deprecated
-   * @see #getEndColumn
-   */
-
-  public int getColumn() {
-return bufcolumn[bufpos];
-  }
-
-  @Deprecated
-  /**
-   * @deprecated
-   * @see #getEndLine
-   */
-
   public int getLine() {
 return bufline[bufpos];
   }



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



Re: NIO sendfile

2015-09-14 Thread jean-frederic clere

On 09/14/2015 10:44 AM, jean-frederic clere wrote:

On 09/14/2015 10:21 AM, Mark Thomas wrote:

On 14/09/2015 09:16, jean-frederic clere wrote:

Hi,

I have noted that "sendfile" with the NIO connector doesn't fill the CPU
on a load test I am testing HTTP/1.1 with:
sslImplementationName="org.apache.tomcat.util.net.openssl.OpenSSLImplementation"



16 ab creating 80 connections requesting files from 4K to 32M

NIO2 works as excepted with the same configuration but NIO doesn't use
the CPU available on the box.

Any ideas?


Number of Poller threads available?


I am using the default... I will now try 8 (8 processors on the box).


Somehow that didn't help:
+++
745 Exception in thread "https-nio-8003-exec-95" Exception in thread 
"https-nio-8003-exec-56" Exception in thread "https-nio-8003-exec-66" 
Exception in thread "https-nio-8003-exec-58" Exception in thread 
"https-nio-8003-Acceptor-0" java.lang.OutOfMemoryError: Direct buffer memory

746 at java.nio.Bits.reserveMemory(Bits.java:658)
747 at 
java.nio.DirectByteBuffer.(DirectByteBuffer.java:123)

748 at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:311)
749 at 
org.apache.tomcat.util.net.SocketBufferHandler.(SocketBufferHandler.java:38)
750 at 
org.apache.tomcat.util.net.NioEndpoint.setSocketOptions(NioEndpoint.java:405)
751 at 
org.apache.tomcat.util.net.NioEndpoint$Acceptor.run(NioEndpoint.java:531)

752 at java.lang.Thread.run(Thread.java:745)
753 java.lang.OutOfMemoryError: Direct buffer memory
754 at java.nio.Bits.reserveMemory(Bits.java:658)
755 at 
java.nio.DirectByteBuffer.(DirectByteBuffer.java:123)

756 at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:311)
757 at 
org.apache.tomcat.util.buf.ByteBufferUtils.expand(ByteBufferUtils.java:80)
758 at 
org.apache.tomcat.util.net.SecureNioChannel.processSNI(SecureNioChannel.java:311)
759 at 
org.apache.tomcat.util.net.SecureNioChannel.handshake(SecureNioChannel.java:169)
760 at 
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1498)
761 at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
762 at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
763 at 
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

764 at java.lang.Thread.run(Thread.java:745)
+++

By default  -XX:MaxDirectMemorySize=0 (automatic, what is automatic here?)

Any hints?

Cheers

Jean-Frederic

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



buildbot success in ASF Buildbot on tomcat-8-trunk

2015-09-14 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-8-trunk while 
building ASF Buildbot. Full details are available at:
http://ci.apache.org/builders/tomcat-8-trunk/builds/112

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

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-8-commit' 
triggered this build
Build Source Stamp: [branch tomcat/tc8.0.x/trunk] 1702911
Blamelist: markt

Build succeeded!

Sincerely,
 -The Buildbot




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



svn commit: r1702930 - /tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java

2015-09-14 Thread markt
Author: markt
Date: Mon Sep 14 12:42:21 2015
New Revision: 1702930

URL: http://svn.apache.org/r1702930
Log:
Refactor to remove remaining deprecated code

Modified:
tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java

Modified: tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java?rev=1702930&r1=1702929&r2=1702930&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java (original)
+++ tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java Mon Sep 14 
12:42:21 2015
@@ -203,39 +203,6 @@ public abstract class RealmBase extends
 
 
 /**
- * Returns the digest encoding charset.
- *
- * @return The charset (may be null) for platform default
- *
- * @deprecated  This will be removed in Tomcat 9.0.x as it has been 
replaced
- *  by the CredentialHandler
- */
-@Deprecated
-public String getDigestEncoding() {
-CredentialHandler ch = credentialHandler;
-if (ch instanceof MessageDigestCredentialHandler) {
-return ((MessageDigestCredentialHandler) ch).getEncoding();
-}
-return null;
-}
-
-
-/**
- * @deprecated  This will be removed in Tomcat 9.0.x as it has been 
replaced
- *  by the CredentialHandler
- */
-@Deprecated
-protected Charset getDigestCharset() throws UnsupportedEncodingException {
-String charset = getDigestEncoding();
-if (charset == null) {
-return StandardCharsets.ISO_8859_1;
-} else {
-return B2CConverter.getCharset(charset);
-}
-}
-
-
-/**
  * Return the "validate certificate chains" flag.
  * @return The value of the validate certificate chains flag
  */
@@ -1122,6 +1089,25 @@ public abstract class RealmBase extends
 }
 
 
+private String getDigestEncoding() {
+CredentialHandler ch = credentialHandler;
+if (ch instanceof MessageDigestCredentialHandler) {
+return ((MessageDigestCredentialHandler) ch).getEncoding();
+}
+return null;
+}
+
+
+private Charset getDigestCharset() throws UnsupportedEncodingException {
+String charset = getDigestEncoding();
+if (charset == null) {
+return StandardCharsets.ISO_8859_1;
+} else {
+return B2CConverter.getCharset(charset);
+}
+}
+
+
 /**
  * Return a short name for this Realm implementation, for use in
  * log messages.



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



svn commit: r1702929 - /tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java

2015-09-14 Thread markt
Author: markt
Date: Mon Sep 14 12:41:03 2015
New Revision: 1702929

URL: http://svn.apache.org/r1702929
Log:
Refactor to remove deprecated code

Modified:
tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java

Modified: tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java?rev=1702929&r1=1702928&r2=1702929&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java (original)
+++ tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java Mon Sep 14 
12:41:03 2015
@@ -203,25 +203,6 @@ public abstract class RealmBase extends
 
 
 /**
- * Return the digest algorithm used for storing credentials.
- *
- * @return The currently configured algorithm used to digest stored
- * credentials
- *
- * @deprecated  This will be removed in Tomcat 9.0.x as it has been 
replaced
- *  by the CredentialHandler
- */
-@Deprecated
-public String getDigest() {
-CredentialHandler ch = credentialHandler;
-if (ch instanceof MessageDigestCredentialHandler) {
-return ((MessageDigestCredentialHandler) ch).getAlgorithm();
-}
-return null;
-}
-
-
-/**
  * Returns the digest encoding charset.
  *
  * @return The charset (may be null) for platform default
@@ -1109,9 +1090,14 @@ public abstract class RealmBase extends
 // -- Protected Methods
 
 protected boolean hasMessageDigest() {
-return getDigest() != null;
+CredentialHandler ch = credentialHandler;
+if (ch instanceof MessageDigestCredentialHandler) {
+return ((MessageDigestCredentialHandler) ch).getAlgorithm() != 
null;
+}
+return false;
 }
 
+
 /**
  * Return the digest associated with given principal's user name.
  */



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



svn commit: r1702927 - /tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java

2015-09-14 Thread markt
Author: markt
Date: Mon Sep 14 12:39:23 2015
New Revision: 1702927

URL: http://svn.apache.org/r1702927
Log:
Remove deprecated code

Modified:
tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java

Modified: tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java?rev=1702927&r1=1702926&r2=1702927&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java (original)
+++ tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java Mon Sep 14 
12:39:23 2015
@@ -1108,44 +1108,6 @@ public abstract class RealmBase extends
 
 // -- Protected Methods
 
-
-/**
- * Digest the password using the specified algorithm and
- * convert the result to a corresponding hexadecimal string.
- * If exception, the plain credentials string is returned.
- *
- * @param credentials Password or other credentials to use in
- *  authenticating this username
- *
- * @deprecated Used. Will be removed in Tomcat 9.
- */
-@Deprecated
-protected String digest(String credentials)  {
-
-// If no MessageDigest instance is specified, return unchanged
-if (hasMessageDigest() == false)
-return (credentials);
-
-// Digest the user credentials and return as hexadecimal
-synchronized (this) {
-try {
-byte[] bytes = null;
-try {
-bytes = credentials.getBytes(getDigestCharset());
-} catch (UnsupportedEncodingException uee) {
-log.error("Illegal digestEncoding: " + 
getDigestEncoding(), uee);
-throw new IllegalArgumentException(uee.getMessage());
-}
-
-return 
(HexUtils.toHexString(ConcurrentMessageDigest.digest(getDigest(), bytes)));
-} catch (Exception e) {
-log.error(sm.getString("realmBase.digest"), e);
-return (credentials);
-}
-}
-
-}
-
 protected boolean hasMessageDigest() {
 return getDigest() != null;
 }



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



svn commit: r1702924 - in /tomcat/tc8.0.x/trunk: ./ java/org/apache/catalina/realm/JAASCallbackHandler.java java/org/apache/catalina/realm/RealmBase.java webapps/docs/changelog.xml

2015-09-14 Thread markt
Author: markt
Date: Mon Sep 14 12:35:39 2015
New Revision: 1702924

URL: http://svn.apache.org/r1702924
Log:
JAAS Realm should be using CredentialHandler to mutate passwords

Modified:
tomcat/tc8.0.x/trunk/   (props changed)
tomcat/tc8.0.x/trunk/java/org/apache/catalina/realm/JAASCallbackHandler.java
tomcat/tc8.0.x/trunk/java/org/apache/catalina/realm/RealmBase.java
tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc8.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Sep 14 12:35:39 2015
@@ -1 +1 @@
-/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886,1644890,1644892
 
,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657592,1657607,1657609,1657682,1657
 
907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966,1659043,1659053,1659059,1659188-1659189,1659216,1659263,1659293,1659304,1659306-1659307,1659382,1659384,1659428,1659471,1659486,1659505,1659516,1659521,1659524,1659559,1659562,1659803,1659806,1659814,1659833,1659862,1659905,1659919,1659948,1659967,1659983-1659984,1660060,1660074,1660077,1660133,1660168,1660331-1660332,1660353,1660358,1660924,1661386,1661867,1661972,1661990,1662200,1662308-1662309,1662548,1662614,1662736,1662985,1662988-1662989,1663264,1663277,1663298,1663534,1663562,1663676,1663715,1663754,1663768,1663772,1663781,1663893,1663995,1664143,1664163,1664174,1664301,1664317,1664347,1664657,1664659,1664710,1664863-1664864,1664866,1665085,1665292,1665559,1665653,1665661,1665672,1665694,1665697,1665736,1665779,1665976-1665977,1665980-1665981,1665985-1665986,1665989,1665998,1666004,1666008,1666013,1666017,1666024,1666116,1666386-1666387,1666494,1666496,1666552,1666569,1666579,137,149,1
 
666757,1666966,1666972,1666985,1666995,1666997,1667292,1667402,1667406,1667546,1667615,1667630,1667636,1667688,1667764,1667871,1668026,1668135,1668193,1668593,1668596,1668630,1668639,1668843,1669353,1669370,1669451,1669800,1669838,1669876,1669882,1670394,1670433,1670591,1670598-1670600,1670610,1670631,1670719,1670724,1670726,1670730,1670940,1671112,1672272,1672284,1673754,1674294,1675461,1675486,1675594,1675830,1676231,1676250-1676251,1676364,1676381,1676393,1676479,1676525,1676552,1676615,1676630,1676634,1676721,1676926,1676943,1677140,1677802,1678011,1678162,1678174,1678339,1678426-1678427,1678694,1678701,1679534,1679708,1679710,1679716,1680034,1680246,1681056,1681123,1681138,1681280,1681283,1681286,1681450,1681697,1681701,1681729,1681770,1681779,1681793,1681807,1681837-1681838,1681854,1681862,1681958,1682028,1682033,1682311,1682315,1682317,1682320,1682324,1682330,1682842,1684172,1684366,1684383,1684526-1684527,1684549-1684550,1685556,1685591,1685739,1685744,1685772,1685816,168582
 
6,1685891,1687242,1687261,1687268,1687340,1688563,1688841,1688878,165,1688896,1688901,1689345-1689346,1689357,1689656,1689675-1689677,1689679,1689687,1689825,1689856,1689918,1690011,1690021,1690054,1690080,1690209,1691134,1691487,1691813,1692744-1692747,1692849,1693088,1693105,1693429,1693461,1694058,1694111,1694290,1694501,1694548,1694658,1694660,1694788,16948

svn commit: r1702923 - in /tomcat/trunk/java/org/apache/catalina/realm: JAASCallbackHandler.java RealmBase.java

2015-09-14 Thread markt
Author: markt
Date: Mon Sep 14 12:33:37 2015
New Revision: 1702923

URL: http://svn.apache.org/r1702923
Log:
JAAS Realm should be using CredentialHandler to mutate passwords

Modified:
tomcat/trunk/java/org/apache/catalina/realm/JAASCallbackHandler.java
tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java

Modified: tomcat/trunk/java/org/apache/catalina/realm/JAASCallbackHandler.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/JAASCallbackHandler.java?rev=1702923&r1=1702922&r2=1702923&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/realm/JAASCallbackHandler.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/realm/JAASCallbackHandler.java Mon 
Sep 14 12:33:37 2015
@@ -91,7 +91,7 @@ public class JAASCallbackHandler impleme
 this.username = username;
 
 if (realm.hasMessageDigest()) {
-this.password = realm.digest(password);
+this.password = realm.getCredentialHandler().mutate(password);
 }
 else {
 this.password = password;

Modified: tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java?rev=1702923&r1=1702922&r2=1702923&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java (original)
+++ tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java Mon Sep 14 
12:33:37 2015
@@ -1116,7 +1116,10 @@ public abstract class RealmBase extends
  *
  * @param credentials Password or other credentials to use in
  *  authenticating this username
+ *
+ * @deprecated Used. Will be removed in Tomcat 9.
  */
+@Deprecated
 protected String digest(String credentials)  {
 
 // If no MessageDigest instance is specified, return unchanged



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



buildbot exception in ASF Buildbot on tomcat-trunk

2015-09-14 Thread buildbot
The Buildbot has detected a build exception on builder tomcat-trunk while 
building ASF Buildbot. Full details are available at:
http://ci.apache.org/builders/tomcat-trunk/builds/258

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

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' 
triggered this build
Build Source Stamp: [branch tomcat/trunk] 1702914
Blamelist: markt

BUILD FAILED: exception upload_2

Sincerely,
 -The Buildbot




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



svn commit: r1702914 - /tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java

2015-09-14 Thread markt
Author: markt
Date: Mon Sep 14 11:53:58 2015
New Revision: 1702914

URL: http://svn.apache.org/r1702914
Log:
Remove more deprecated code

Modified:
tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java

Modified: tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java?rev=1702914&r1=1702913&r2=1702914&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java (original)
+++ tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java Mon Sep 14 
11:53:58 2015
@@ -100,26 +100,6 @@ public abstract class RealmBase extends
 protected Log containerLog = null;
 
 
-/**
- * Digest algorithm used in storing passwords in a non-plaintext format.
- * Valid values are those accepted for the algorithm name by the
- * MessageDigest class, or null if no digesting should
- * be performed.
- *
- * @deprecated Unused. Will be removed in Tomcat 9.0.x onwards.
- */
-@Deprecated
-protected String digest = null;
-
-/**
- * The encoding charset for the digest.
- *
- * @deprecated Unused. Will be removed in Tomcat 9.0.x onwards.
- */
-@Deprecated
-protected String digestEncoding = null;
-
-
 private CredentialHandler credentialHandler;
 
 
@@ -242,34 +222,6 @@ public abstract class RealmBase extends
 
 
 /**
- * Set the digest algorithm used for storing credentials.
- *
- * @param digest The new digest algorithm
- *
- * @deprecated  This will be removed in Tomcat 9.0.x as it has been 
replaced
- *  by the CredentialHandler
- */
-@Deprecated
-public void setDigest(String digest) {
-CredentialHandler ch = credentialHandler;
-if (ch == null) {
-ch = new MessageDigestCredentialHandler();
-credentialHandler = ch;
-}
-if (ch instanceof MessageDigestCredentialHandler) {
-try {
-((MessageDigestCredentialHandler) ch).setAlgorithm(digest);
-} catch (NoSuchAlgorithmException e) {
-throw new IllegalArgumentException(e);
-}
-} else {
-
log.warn(sm.getString("realmBase.credentialHandler.customCredentialHandler",
-"digest", digest));
-}
-this.digest = digest;
-}
-
-/**
  * Returns the digest encoding charset.
  *
  * @return The charset (may be null) for platform default
@@ -286,30 +238,6 @@ public abstract class RealmBase extends
 return null;
 }
 
-/**
- * Sets the digest encoding charset.
- *
- * @param charset The charset (null for platform default)
- *
- * @deprecated  This will be removed in Tomcat 9.0.x as it has been 
replaced
- *  by the CredentialHandler
- */
-@Deprecated
-public void setDigestEncoding(String charset) {
-CredentialHandler ch = credentialHandler;
-if (ch == null) {
-ch = new MessageDigestCredentialHandler();
-credentialHandler = ch;
-}
-if (ch instanceof MessageDigestCredentialHandler) {
-((MessageDigestCredentialHandler) ch).setEncoding(charset);
-} else {
-
log.warn(sm.getString("realmBase.credentialHandler.customCredentialHandler",
-"digestEncoding", charset));
-}
-this.digestEncoding = charset;
-}
-
 
 /**
  * @deprecated  This will be removed in Tomcat 9.0.x as it has been 
replaced



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



svn commit: r1702913 - /tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java

2015-09-14 Thread markt
Author: markt
Date: Mon Sep 14 11:50:21 2015
New Revision: 1702913

URL: http://svn.apache.org/r1702913
Log:
Remove some of the deprecated code

Modified:
tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java

Modified: tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java?rev=1702913&r1=1702912&r2=1702913&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java (original)
+++ tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java Mon Sep 14 
11:50:21 2015
@@ -28,7 +28,6 @@ import java.security.NoSuchAlgorithmExce
 import java.security.Principal;
 import java.security.cert.X509Certificate;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.List;
 import java.util.Locale;
 
@@ -54,7 +53,6 @@ import org.apache.juli.logging.LogFactor
 import org.apache.tomcat.util.IntrospectionUtils;
 import org.apache.tomcat.util.buf.B2CConverter;
 import org.apache.tomcat.util.buf.HexUtils;
-import org.apache.tomcat.util.codec.binary.Base64;
 import org.apache.tomcat.util.descriptor.web.SecurityCollection;
 import org.apache.tomcat.util.descriptor.web.SecurityConstraint;
 import org.apache.tomcat.util.res.StringManager;
@@ -126,24 +124,6 @@ public abstract class RealmBase extends
 
 
 /**
- * The MessageDigest object for digesting user credentials (passwords).
- *
- * @deprecated Unused. Will be removed in Tomcat 9.0.x onwards.
- */
-@Deprecated
-protected volatile MessageDigest md = null;
-
-
-/**
- * MD5 message digest provider.
- *
- * @deprecated Unused. Will be removed in Tomcat 9.0.x onwards.
- */
-@Deprecated
-protected static volatile MessageDigest md5Helper;
-
-
-/**
  * The string manager for this package.
  */
 protected static final StringManager sm =
@@ -606,69 +586,6 @@ public abstract class RealmBase extends
 
 
 /**
- * @deprecated Unused. Will be removed in Tomcat 9.0.x onwards.
- */
-@Deprecated
-protected boolean compareCredentials(String userCredentials,
-String serverCredentials) {
-
-if (serverCredentials == null) {
-return false;
-}
-
-if (hasMessageDigest()) {
-// Some directories and databases prefix the password with the hash
-// type. The string is in a format compatible with Base64.encode 
not
-// the normal hex encoding of the digest
-if (serverCredentials.startsWith("{MD5}") ||
-serverCredentials.startsWith("{SHA}")) {
-// Server is storing digested passwords with a prefix 
indicating
-// the digest type
-String serverDigest = serverCredentials.substring(5);
-String userDigest = 
Base64.encodeBase64String(ConcurrentMessageDigest.digest(
-getDigest(), 
userCredentials.getBytes(StandardCharsets.ISO_8859_1)));
-return userDigest.equals(serverDigest);
-
-} else if (serverCredentials.startsWith("{SSHA}")) {
-// Server is storing digested passwords with a prefix 
indicating
-// the digest type and the salt used when creating that digest
-
-String serverDigestPlusSalt = serverCredentials.substring(6);
-
-// Need to convert the salt to bytes to apply it to the user's
-// digested password.
-byte[] serverDigestPlusSaltBytes =
-Base64.decodeBase64(serverDigestPlusSalt);
-final int saltPos = 20;
-byte[] serverDigestBytes = new byte[saltPos];
-System.arraycopy(serverDigestPlusSaltBytes, 0,
-serverDigestBytes, 0, saltPos);
-final int saltLength = serverDigestPlusSaltBytes.length - 
saltPos;
-byte[] serverSaltBytes = new byte[saltLength];
-System.arraycopy(serverDigestPlusSaltBytes, saltPos,
-serverSaltBytes, 0, saltLength);
-
-// Generate the digested form of the user provided password
-// using the salt
-byte[] userDigestBytes = 
ConcurrentMessageDigest.digest(getDigest(),
-userCredentials.getBytes(StandardCharsets.ISO_8859_1),
-serverSaltBytes);
-
-return Arrays.equals(userDigestBytes, serverDigestBytes);
-
-} else {
-// Hex hashes should be compared case-insensitively
-String userDigest = digest(userCredentials);
-return serverCredentials.equalsIgnoreCase(userDigest);
-}
-} else {
-// No digests, compare directly
-return serverCredentials.equals(userCredentials);
-}
-}
-
-
-/

svn commit: r1702911 - in /tomcat/tc8.0.x/trunk: ./ java/org/apache/tomcat/util/net/AbstractEndpoint.java

2015-09-14 Thread markt
Author: markt
Date: Mon Sep 14 11:25:43 2015
New Revision: 1702911

URL: http://svn.apache.org/r1702911
Log:
Fix regression in r1702887

Modified:
tomcat/tc8.0.x/trunk/   (props changed)
tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java

Propchange: tomcat/tc8.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Sep 14 11:25:43 2015
@@ -1 +1 @@
-/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886,1644890,1644892
 
,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657592,1657607,1657609,1657682,1657
 
907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966,1659043,1659053,1659059,1659188-1659189,1659216,1659263,1659293,1659304,1659306-1659307,1659382,1659384,1659428,1659471,1659486,1659505,1659516,1659521,1659524,1659559,1659562,1659803,1659806,1659814,1659833,1659862,1659905,1659919,1659948,1659967,1659983-1659984,1660060,1660074,1660077,1660133,1660168,1660331-1660332,1660353,1660358,1660924,1661386,1661867,1661972,1661990,1662200,1662308-1662309,1662548,1662614,1662736,1662985,1662988-1662989,1663264,1663277,1663298,1663534,1663562,1663676,1663715,1663754,1663768,1663772,1663781,1663893,1663995,1664143,1664163,1664174,1664301,1664317,1664347,1664657,1664659,1664710,1664863-1664864,1664866,1665085,1665292,1665559,1665653,1665661,1665672,1665694,1665697,1665736,1665779,1665976-1665977,1665980-1665981,1665985-1665986,1665989,1665998,1666004,1666008,1666013,1666017,1666024,1666116,1666386-1666387,1666494,1666496,1666552,1666569,1666579,137,149,1
 
666757,1666966,1666972,1666985,1666995,1666997,1667292,1667402,1667406,1667546,1667615,1667630,1667636,1667688,1667764,1667871,1668026,1668135,1668193,1668593,1668596,1668630,1668639,1668843,1669353,1669370,1669451,1669800,1669838,1669876,1669882,1670394,1670433,1670591,1670598-1670600,1670610,1670631,1670719,1670724,1670726,1670730,1670940,1671112,1672272,1672284,1673754,1674294,1675461,1675486,1675594,1675830,1676231,1676250-1676251,1676364,1676381,1676393,1676479,1676525,1676552,1676615,1676630,1676634,1676721,1676926,1676943,1677140,1677802,1678011,1678162,1678174,1678339,1678426-1678427,1678694,1678701,1679534,1679708,1679710,1679716,1680034,1680246,1681056,1681123,1681138,1681280,1681283,1681286,1681450,1681697,1681701,1681729,1681770,1681779,1681793,1681807,1681837-1681838,1681854,1681862,1681958,1682028,1682033,1682311,1682315,1682317,1682320,1682324,1682330,1682842,1684172,1684366,1684383,1684526-1684527,1684549-1684550,1685556,1685591,1685739,1685744,1685772,1685816,168582
 
6,1685891,1687242,1687261,1687268,1687340,1688563,1688841,1688878,165,1688896,1688901,1689345-1689346,1689357,1689656,1689675-1689677,1689679,1689687,1689825,1689856,1689918,1690011,1690021,1690054,1690080,1690209,1691134,1691487,1691813,1692744-1692747,1692849,1693088,1693105,1693429,1693461,1694058,1694111,1694290,1694501,1694548,1694658,1694660,1694788,1694872,1694878,1695006,1695354,1695371,1695459,1695582,1695706,1695778,1696199,1696272,1696280,1696366-1696368,1696378,1696390,1696392,1696467,1700607,1700870,1700896,

svn commit: r1702910 - /tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java

2015-09-14 Thread markt
Author: markt
Date: Mon Sep 14 11:24:05 2015
New Revision: 1702910

URL: http://svn.apache.org/r1702910
Log:
Fix regression in r1702886

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java?rev=1702910&r1=1702909&r2=1702910&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java Mon Sep 
14 11:24:05 2015
@@ -700,8 +700,8 @@ public abstract class AbstractEndpoint

Re: svn commit: r1702887 - in /tomcat/tc8.0.x/trunk: ./ java/org/apache/tomcat/util/net/AbstractEndpoint.java webapps/docs/changelog.xml

2015-09-14 Thread Mark Thomas
On 14/09/2015 11:42, Konstantin Kolinko wrote:
> 2015-09-14 12:47 GMT+03:00  :
>> Author: markt
>> Date: Mon Sep 14 09:47:50 2015
>> New Revision: 1702887
>>
>> URL: http://svn.apache.org/r1702887
>> Log:
>> Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58370
>> Fix data races when executor is being shut down
>>
>> Modified:
>> tomcat/tc8.0.x/trunk/   (props changed)
>> 
>> tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
>> tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml
>>
> 
>> Modified: 
>> tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
>> URL: 
>> http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java?rev=1702887&r1=1702886&r2=1702887&view=diff
>> ==
>> --- 
>> tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java 
>> (original)
>> +++ 
>> tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java 
>> Mon Sep 14 09:47:50 2015
> 
> 
>> @@ -576,8 +581,10 @@ public abstract class AbstractEndpoint>  }
>>
>>  public void shutdownExecutor() {
>> -if ( executor!=null && internalExecutor ) {
>> -if ( executor instanceof ThreadPoolExecutor ) {
>> +Executor executor = this.executor;
>> +this.executor = null;
>> +if (executor != null && internalExecutor) {
>> +if (executor instanceof ThreadPoolExecutor) {
>>  //this is our internal one, so we need to shut it down
>>  ThreadPoolExecutor tpe = (ThreadPoolExecutor) executor;
>>  tpe.shutdownNow();
>> @@ -595,7 +602,6 @@ public abstract class AbstractEndpoint>  TaskQueue queue = (TaskQueue) tpe.getQueue();
>>  queue.setParent(null);
>>  }
>> -executor = null;
>>  }
>>  }
>>
> 
> 
> In the old implementation of shutdownExecutor() the "executor = null;"
> assignment is conditioned by internalExecutor flag.  In the new
> implementation it is assigned unconditionally.
> 
> I think this change in behaviour is wrong.  If it is an external
> executor (internalExecutor flag is false), this reference should not
> be nulled.   shutdownExecutor() is called from stopInternal() of
> NioEndpoint etc., so in theory it is possible to call start() on
> endpoint if it has not been destroy()ed yet. Nulling the reference
> changes behaviour of such start().

Yep. Good catch. I'll get that fixed.

Mark


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



Re: svn commit: r1702887 - in /tomcat/tc8.0.x/trunk: ./ java/org/apache/tomcat/util/net/AbstractEndpoint.java webapps/docs/changelog.xml

2015-09-14 Thread Konstantin Kolinko
2015-09-14 12:47 GMT+03:00  :
> Author: markt
> Date: Mon Sep 14 09:47:50 2015
> New Revision: 1702887
>
> URL: http://svn.apache.org/r1702887
> Log:
> Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58370
> Fix data races when executor is being shut down
>
> Modified:
> tomcat/tc8.0.x/trunk/   (props changed)
> tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
> tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml
>

> Modified: 
> tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
> URL: 
> http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java?rev=1702887&r1=1702886&r2=1702887&view=diff
> ==
> --- 
> tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java 
> (original)
> +++ 
> tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java 
> Mon Sep 14 09:47:50 2015


> @@ -576,8 +581,10 @@ public abstract class AbstractEndpoint  }
>
>  public void shutdownExecutor() {
> -if ( executor!=null && internalExecutor ) {
> -if ( executor instanceof ThreadPoolExecutor ) {
> +Executor executor = this.executor;
> +this.executor = null;
> +if (executor != null && internalExecutor) {
> +if (executor instanceof ThreadPoolExecutor) {
>  //this is our internal one, so we need to shut it down
>  ThreadPoolExecutor tpe = (ThreadPoolExecutor) executor;
>  tpe.shutdownNow();
> @@ -595,7 +602,6 @@ public abstract class AbstractEndpoint  TaskQueue queue = (TaskQueue) tpe.getQueue();
>  queue.setParent(null);
>  }
> -executor = null;
>  }
>  }
>


In the old implementation of shutdownExecutor() the "executor = null;"
assignment is conditioned by internalExecutor flag.  In the new
implementation it is assigned unconditionally.

I think this change in behaviour is wrong.  If it is an external
executor (internalExecutor flag is false), this reference should not
be nulled.   shutdownExecutor() is called from stopInternal() of
NioEndpoint etc., so in theory it is possible to call start() on
endpoint if it has not been destroy()ed yet. Nulling the reference
changes behaviour of such start().

Best regards,
Konstantin Kolinko

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



buildbot exception in ASF Buildbot on tomcat-8-trunk

2015-09-14 Thread buildbot
The Buildbot has detected a build exception on builder tomcat-8-trunk while 
building ASF Buildbot. Full details are available at:
http://ci.apache.org/builders/tomcat-8-trunk/builds/111

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

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-8-commit' 
triggered this build
Build Source Stamp: [branch tomcat/tc8.0.x/trunk] 1702887
Blamelist: markt

BUILD FAILED: exception upload_2

Sincerely,
 -The Buildbot




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



[Bug 58370] Data race on field org.apache.tomcat.util.net.AbstractEndpoint.executor

2015-09-14 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58370

Mark Thomas  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #1 from Mark Thomas  ---
Fixed in trunk and 8.0.x for 8.0.27 onwards.

-- 
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: r1702887 - in /tomcat/tc8.0.x/trunk: ./ java/org/apache/tomcat/util/net/AbstractEndpoint.java webapps/docs/changelog.xml

2015-09-14 Thread markt
Author: markt
Date: Mon Sep 14 09:47:50 2015
New Revision: 1702887

URL: http://svn.apache.org/r1702887
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58370
Fix data races when executor is being shut down

Modified:
tomcat/tc8.0.x/trunk/   (props changed)
tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc8.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Sep 14 09:47:50 2015
@@ -1 +1 @@
-/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886,1644890,1644892
 
,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657592,1657607,1657609,1657682,1657
 
907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966,1659043,1659053,1659059,1659188-1659189,1659216,1659263,1659293,1659304,1659306-1659307,1659382,1659384,1659428,1659471,1659486,1659505,1659516,1659521,1659524,1659559,1659562,1659803,1659806,1659814,1659833,1659862,1659905,1659919,1659948,1659967,1659983-1659984,1660060,1660074,1660077,1660133,1660168,1660331-1660332,1660353,1660358,1660924,1661386,1661867,1661972,1661990,1662200,1662308-1662309,1662548,1662614,1662736,1662985,1662988-1662989,1663264,1663277,1663298,1663534,1663562,1663676,1663715,1663754,1663768,1663772,1663781,1663893,1663995,1664143,1664163,1664174,1664301,1664317,1664347,1664657,1664659,1664710,1664863-1664864,1664866,1665085,1665292,1665559,1665653,1665661,1665672,1665694,1665697,1665736,1665779,1665976-1665977,1665980-1665981,1665985-1665986,1665989,1665998,1666004,1666008,1666013,1666017,1666024,1666116,1666386-1666387,1666494,1666496,1666552,1666569,1666579,137,149,1
 
666757,1666966,1666972,1666985,1666995,1666997,1667292,1667402,1667406,1667546,1667615,1667630,1667636,1667688,1667764,1667871,1668026,1668135,1668193,1668593,1668596,1668630,1668639,1668843,1669353,1669370,1669451,1669800,1669838,1669876,1669882,1670394,1670433,1670591,1670598-1670600,1670610,1670631,1670719,1670724,1670726,1670730,1670940,1671112,1672272,1672284,1673754,1674294,1675461,1675486,1675594,1675830,1676231,1676250-1676251,1676364,1676381,1676393,1676479,1676525,1676552,1676615,1676630,1676634,1676721,1676926,1676943,1677140,1677802,1678011,1678162,1678174,1678339,1678426-1678427,1678694,1678701,1679534,1679708,1679710,1679716,1680034,1680246,1681056,1681123,1681138,1681280,1681283,1681286,1681450,1681697,1681701,1681729,1681770,1681779,1681793,1681807,1681837-1681838,1681854,1681862,1681958,1682028,1682033,1682311,1682315,1682317,1682320,1682324,1682330,1682842,1684172,1684366,1684383,1684526-1684527,1684549-1684550,1685556,1685591,1685739,1685744,1685772,1685816,168582
 
6,1685891,1687242,1687261,1687268,1687340,1688563,1688841,1688878,165,1688896,1688901,1689345-1689346,1689357,1689656,1689675-1689677,1689679,1689687,1689825,1689856,1689918,1690011,1690021,1690054,1690080,1690209,1691134,1691487,1691813,1692744-1692747,1692849,1693088,1693105,1693429,1693461,1694058,1694111,1694290,1694501,1694548,1694658,1694660,1694788,1694872,1694878,1695006,1695354,169537

svn commit: r1702886 - /tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java

2015-09-14 Thread markt
Author: markt
Date: Mon Sep 14 09:46:34 2015
New Revision: 1702886

URL: http://svn.apache.org/r1702886
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58370
Fix data races when executor is being shut down

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java?rev=1702886&r1=1702885&r2=1702886&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java Mon Sep 
14 09:46:34 2015
@@ -379,7 +379,7 @@ public abstract class AbstractEndpoint

[Bug 58369] Data race on field org.apache.catalina.core.StandardContext.cookieProcessor

2015-09-14 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58369

Mark Thomas  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #1 from Mark Thomas  ---
Fixed in trunk and 8.0.x for 8.0.27 onwards.

-- 
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: r1702884 - in /tomcat/trunk: java/org/apache/catalina/core/StandardContext.java webapps/docs/changelog.xml webapps/docs/config/cookie-processor.xml

2015-09-14 Thread markt
Author: markt
Date: Mon Sep 14 09:34:38 2015
New Revision: 1702884

URL: http://svn.apache.org/r1702884
Log:
Switch the default cookie parser to the one based on RFC6265

Modified:
tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
tomcat/trunk/webapps/docs/changelog.xml
tomcat/trunk/webapps/docs/config/cookie-processor.xml

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContext.java?rev=1702884&r1=1702883&r2=1702884&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Mon Sep 14 
09:34:38 2015
@@ -129,7 +129,7 @@ import org.apache.tomcat.util.descriptor
 import org.apache.tomcat.util.descriptor.web.SecurityCollection;
 import org.apache.tomcat.util.descriptor.web.SecurityConstraint;
 import org.apache.tomcat.util.http.CookieProcessor;
-import org.apache.tomcat.util.http.LegacyCookieProcessor;
+import org.apache.tomcat.util.http.Rfc6265CookieProcessor;
 import org.apache.tomcat.util.scan.StandardJarScanner;
 import org.apache.tomcat.util.security.PrivilegedGetTccl;
 import org.apache.tomcat.util.security.PrivilegedSetTccl;
@@ -4981,7 +4981,7 @@ public class StandardContext extends Con
 
 // An explicit cookie processor hasn't been specified; use the default
 if (cookieProcessor == null) {
-cookieProcessor = new LegacyCookieProcessor();
+cookieProcessor = new Rfc6265CookieProcessor();
 }
 
 // Initialize character set mapper

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1702884&r1=1702883&r2=1702884&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Mon Sep 14 09:34:38 2015
@@ -60,6 +60,14 @@
   
 
   
+  
+
+  
+The default HTTP cookie parser has been changed to
+org.apache.tomcat.util.http.Rfc6265CookieProcessor. 
(markt)
+  
+
+  
   
 
   

Modified: tomcat/trunk/webapps/docs/config/cookie-processor.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/cookie-processor.xml?rev=1702884&r1=1702883&r2=1702884&view=diff
==
--- tomcat/trunk/webapps/docs/config/cookie-processor.xml (original)
+++ tomcat/trunk/webapps/docs/config/cookie-processor.xml Mon Sep 14 09:34:38 
2015
@@ -45,34 +45,6 @@
   Context component. If it is not included, a 
default
   implementation will be created automatically.
 
-  Note: CookieProcessor is a new
-  configuration element, introduced in Tomcat 8.0.15.
-  This is work in progress.
-  The goal is to review the current implementation of HTTP Cookie headers
-  processing in Tomcat to provide better compliance with RFC6265 specification.
-  The ideas are summarized on a
-  https://wiki.apache.org/tomcat/Cookies";>Wiki page and discussed
-  on http://tomcat.apache.org/lists.html";>mailing lists.
-  Notable points:
-
-  
-CookieProcessor element allows to configure cookie
-parsing separately in each web application, or globally in the default
-conf/context.xml file. The legacy cookie parsing algorithm
-supported only limited global configuration via several
-system properties. Those
-system properties are still supported, but are going to be deprecated in
-favor of this new configuration element.
-
-The new RFC6265-compliant (work in progress) implementation
-is a stand-in replacement for the original legacy one. Until the new code
-is stabilized, the legacy implementation remains the default one.
-You can select the implementation by setting className
-attribute on CookieProcessor element.
-This is work in progress. Configuration attributes may change in a
-future release.
-  
-
 
 
 
@@ -100,10 +72,34 @@
   
 
 The standard implementation of CookieProcessor is
-org.apache.tomcat.util.http.LegacyCookieProcessor. Note
-that it is anticipated that this will change to
-org.apache.tomcat.util.http.Rfc6265CookieProcessor in a future
-Tomcat 8 release.
+org.apache.tomcat.util.http.Rfc6265CookieProcessor.
+
+This cookie processor is based on RFC6265 with the following changes to
+support better interoperability:
+
+
+  Values 0x80 to 0xFF are permitted in cookie-octet to support the use
+  of UTF-8 in cookie values as used by HTML 5.
+  For cookies without a value, the '=' is not required after the name 
as
+  some browsers do not sent it.
+
+
+The RFC 6265 cookie processor is generally more lenient than the legacy
+cookie parser. In partic

svn commit: r1702882 - in /tomcat/tc8.0.x/trunk: ./ java/org/apache/catalina/Context.java java/org/apache/catalina/core/LocalStrings.properties java/org/apache/catalina/core/StandardContext.java webap

2015-09-14 Thread markt
Author: markt
Date: Mon Sep 14 09:28:59 2015
New Revision: 1702882

URL: http://svn.apache.org/r1702882
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58369
Fix a rare data race in the code that obtains the CookieProcessor instance for 
the Context.

Modified:
tomcat/tc8.0.x/trunk/   (props changed)
tomcat/tc8.0.x/trunk/java/org/apache/catalina/Context.java
tomcat/tc8.0.x/trunk/java/org/apache/catalina/core/LocalStrings.properties
tomcat/tc8.0.x/trunk/java/org/apache/catalina/core/StandardContext.java
tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc8.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Sep 14 09:28:59 2015
@@ -1 +1 @@
-/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886,1644890,1644892
 
,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657592,1657607,1657609,1657682,1657
 
907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966,1659043,1659053,1659059,1659188-1659189,1659216,1659263,1659293,1659304,1659306-1659307,1659382,1659384,1659428,1659471,1659486,1659505,1659516,1659521,1659524,1659559,1659562,1659803,1659806,1659814,1659833,1659862,1659905,1659919,1659948,1659967,1659983-1659984,1660060,1660074,1660077,1660133,1660168,1660331-1660332,1660353,1660358,1660924,1661386,1661867,1661972,1661990,1662200,1662308-1662309,1662548,1662614,1662736,1662985,1662988-1662989,1663264,1663277,1663298,1663534,1663562,1663676,1663715,1663754,1663768,1663772,1663781,1663893,1663995,1664143,1664163,1664174,1664301,1664317,1664347,1664657,1664659,1664710,1664863-1664864,1664866,1665085,1665292,1665559,1665653,1665661,1665672,1665694,1665697,1665736,1665779,1665976-1665977,1665980-1665981,1665985-1665986,1665989,1665998,1666004,1666008,1666013,1666017,1666024,1666116,1666386-1666387,1666494,1666496,1666552,1666569,1666579,137,149,1
 
666757,1666966,1666972,1666985,1666995,1666997,1667292,1667402,1667406,1667546,1667615,1667630,1667636,1667688,1667764,1667871,1668026,1668135,1668193,1668593,1668596,1668630,1668639,1668843,1669353,1669370,1669451,1669800,1669838,1669876,1669882,1670394,1670433,1670591,1670598-1670600,1670610,1670631,1670719,1670724,1670726,1670730,1670940,1671112,1672272,1672284,1673754,1674294,1675461,1675486,1675594,1675830,1676231,1676250-1676251,1676364,1676381,1676393,1676479,1676525,1676552,1676615,1676630,1676634,1676721,1676926,1676943,1677140,1677802,1678011,1678162,1678174,1678339,1678426-1678427,1678694,1678701,1679534,1679708,1679710,1679716,1680034,1680246,1681056,1681123,1681138,1681280,1681283,1681286,1681450,1681697,1681701,1681729,1681770,1681779,1681793,1681807,1681837-1681838,1681854,1681862,1681958,1682028,1682033,1682311,1682315,1682317,1682320,1682324,1682330,1682842,1684172,1684366,1684383,1684526-1684527,1684549-1684550,1685556,1685591,1685739,1685744,1685772,1685816,168582
 
6,1685891,1687242,1687261,1687268,1687340,1688563,1688841,1688878,165,1688896,1688901,1689345-1689346,1689357,1689656,1689675-1689677,1689679,1689687,1689825,1689856,1689918,1690011,1690021,1690054,1690080,169020

svn commit: r1702881 - in /tomcat/trunk/java/org/apache/catalina: Context.java core/LocalStrings.properties core/StandardContext.java

2015-09-14 Thread markt
Author: markt
Date: Mon Sep 14 09:27:05 2015
New Revision: 1702881

URL: http://svn.apache.org/r1702881
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58369
Fix a rare data race in the code that obtains the CookieProcessor instance for 
the Context.

Modified:
tomcat/trunk/java/org/apache/catalina/Context.java
tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties
tomcat/trunk/java/org/apache/catalina/core/StandardContext.java

Modified: tomcat/trunk/java/org/apache/catalina/Context.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Context.java?rev=1702881&r1=1702880&r2=1702881&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/Context.java (original)
+++ tomcat/trunk/java/org/apache/catalina/Context.java Mon Sep 14 09:27:05 2015
@@ -1669,6 +1669,9 @@ public interface Context extends Contain
  * for this Context.
  *
  * @param cookieProcessor   The new cookie processor
+ *
+ * @throws IllegalArgumentException If a {@code null} CookieProcessor is
+ * specified
  */
 public void setCookieProcessor(CookieProcessor cookieProcessor);
 

Modified: tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties?rev=1702881&r1=1702880&r2=1702881&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties 
(original)
+++ tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties Mon Sep 
14 09:27:05 2015
@@ -110,6 +110,7 @@ standardContext.backgroundProcess.manage
 standardContext.backgroundProcess.resources=Exception processing resources {0} 
background process
 standardContext.cluster.noManager=No manager found. Checking if cluster 
manager should be used. Cluster configured: [{0}], Application distributable: 
[{1}]
 standardContext.configurationFail=One or more components marked the context as 
not correctly configured
+standardContext.cookieProcessor.null=It is not permitted to set the 
CookieProcessor for a Context to null
 standardContext.duplicateListener=The listener "{0}" is already configured for 
this context. The duplicate definition has been ignored.
 standardContext.errorPage.error=Error page location {0} must start with a ''/''
 standardContext.errorPage.required=ErrorPage cannot be null

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContext.java?rev=1702881&r1=1702880&r2=1702881&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Mon Sep 14 
09:27:05 2015
@@ -818,15 +818,16 @@ public class StandardContext extends Con
 
 @Override
 public void setCookieProcessor(CookieProcessor cookieProcessor) {
+if (cookieProcessor == null) {
+throw new IllegalArgumentException(
+sm.getString("standardContext.cookieProcessor.null"));
+}
 this.cookieProcessor = cookieProcessor;
 }
 
 
 @Override
 public CookieProcessor getCookieProcessor() {
-if (cookieProcessor == null) {
-cookieProcessor = new LegacyCookieProcessor();
-}
 return cookieProcessor;
 }
 
@@ -4978,6 +4979,11 @@ public class StandardContext extends Con
 setLoader(webappLoader);
 }
 
+// An explicit cookie processor hasn't been specified; use the default
+if (cookieProcessor == null) {
+cookieProcessor = new LegacyCookieProcessor();
+}
+
 // Initialize character set mapper
 getCharsetMapper();
 



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



svn commit: r1702878 - in /tomcat/trunk: java/org/apache/tomcat/util/http/CookieSupport.java java/org/apache/tomcat/util/http/LegacyCookieProcessor.java webapps/docs/config/cookie-processor.xml webapp

2015-09-14 Thread markt
Author: markt
Date: Mon Sep 14 09:14:23 2015
New Revision: 1702878

URL: http://svn.apache.org/r1702878
Log:
Remove deprecated code.

Removed:
tomcat/trunk/java/org/apache/tomcat/util/http/CookieSupport.java
Modified:
tomcat/trunk/java/org/apache/tomcat/util/http/LegacyCookieProcessor.java
tomcat/trunk/webapps/docs/config/cookie-processor.xml
tomcat/trunk/webapps/docs/config/systemprops.xml

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/http/LegacyCookieProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/LegacyCookieProcessor.java?rev=1702878&r1=1702877&r2=1702878&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/http/LegacyCookieProcessor.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/http/LegacyCookieProcessor.java 
Mon Sep 14 09:14:23 2015
@@ -87,18 +87,13 @@ public final class LegacyCookieProcessor
 private final boolean STRICT_SERVLET_COMPLIANCE =
 
Boolean.getBoolean("org.apache.catalina.STRICT_SERVLET_COMPLIANCE");
 
-@SuppressWarnings("deprecation") // Default to false when deprecated code 
is removed
-private boolean allowEqualsInValue = CookieSupport.ALLOW_EQUALS_IN_VALUE;
+private boolean allowEqualsInValue = false;
 
-@SuppressWarnings("deprecation") // Default to false when deprecated code 
is removed
-private boolean allowNameOnly = CookieSupport.ALLOW_NAME_ONLY;
+private boolean allowNameOnly = false;
 
-@SuppressWarnings("deprecation") // Default to false when deprecated code 
is removed
-private boolean allowHttpSepsInV0 = 
CookieSupport.ALLOW_HTTP_SEPARATORS_IN_V0;
+private boolean allowHttpSepsInV0 = false;
 
-@SuppressWarnings("deprecation") // Default to STRICT_SERVLET_COMPLIANCE
- // when deprecated code is removed
-private boolean preserveCookieHeader = 
CookieSupport.PRESERVE_COOKIE_HEADER;
+private boolean preserveCookieHeader = STRICT_SERVLET_COMPLIANCE;
 
 private boolean alwaysAddExpires = !STRICT_SERVLET_COMPLIANCE;
 
@@ -112,9 +107,7 @@ public final class LegacyCookieProcessor
 for (char c : HTTP_SEPARATORS) {
 httpSeparatorFlags.set(c);
 }
-@SuppressWarnings("deprecation") // Default to 
STRICT_SERVLET_COMPLIANCE
- // when deprecated code is removed
-boolean b = CookieSupport.FWD_SLASH_IS_SEPARATOR;
+boolean b = STRICT_SERVLET_COMPLIANCE;
 if (b) {
 httpSeparatorFlags.set('/');
 }

Modified: tomcat/trunk/webapps/docs/config/cookie-processor.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/cookie-processor.xml?rev=1702878&r1=1702877&r2=1702878&view=diff
==
--- tomcat/trunk/webapps/docs/config/cookie-processor.xml (original)
+++ tomcat/trunk/webapps/docs/config/cookie-processor.xml Mon Sep 14 09:14:23 
2015
@@ -120,20 +120,14 @@
 '=' is encountered and the remainder of the cookie value
 will be dropped.
 If not set the specification compliant default value of
-false will be used. This default may be changed by setting
-the
-
org.apache.tomcat.util.http.ServerCookie.ALLOW_EQUALS_IN_VALUE
-system property.
+false will be used.
   
 
   
 If this is true Tomcat will allow HTTP separators in
 cookie names and values.
 If not specified, the default specification compliant value of
-false will be used. This default may be changed by setting
-the
-
org.apache.tomcat.util.http.ServerCookie.ALLOW_HTTP_SEPARATORS_IN_V0
-system property.
+false will be used.
   
 
   
@@ -141,10 +135,7 @@
 (with or without trailing '=') when parsing cookie 
headers.
 If false, name only cookies will be dropped.
 If not set the specification compliant default value of
-false will be used. This default may be changed by setting
-the
-org.apache.tomcat.util.http.ServerCookie.ALLOW_NAME_ONLY
-system property.
+false will be used.
   
 
   
@@ -164,9 +155,7 @@
 headers. If org.apache.catalina.STRICT_SERVLET_COMPLIANCE
 is set to true, the default of this setting will be
 true, else the default value will be false.
-This default may be overridden by setting the
-
org.apache.tomcat.util.http.ServerCookie.FWD_SLASH_IS_SEPARATOR
-system property.
+
   
 
   
@@ -176,9 +165,7 @@
 org.apache.catalina.STRICT_SERVLET_COMPLIANCE is set to
 true, the default of this setting will be
 true, else the default value will be false.
-This default may be overridden by setting the
-
org.apache.tomcat.util.http.ServerCookie.PRESERVE_COOK

svn commit: r1702875 - in /tomcat/trunk/java/org/apache/tomcat/util/http: LegacyCookieProcessor.java SetCookieSupport.java

2015-09-14 Thread markt
Author: markt
Date: Mon Sep 14 09:07:34 2015
New Revision: 1702875

URL: http://svn.apache.org/r1702875
Log:
Remove deprecated code.

Removed:
tomcat/trunk/java/org/apache/tomcat/util/http/SetCookieSupport.java
Modified:
tomcat/trunk/java/org/apache/tomcat/util/http/LegacyCookieProcessor.java

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/http/LegacyCookieProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/LegacyCookieProcessor.java?rev=1702875&r1=1702874&r2=1702875&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/http/LegacyCookieProcessor.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/http/LegacyCookieProcessor.java 
Mon Sep 14 09:07:34 2015
@@ -84,6 +84,8 @@ public final class LegacyCookieProcessor
 ANCIENT_DATE = COOKIE_DATE_FORMAT.get().format(new Date(1));
 }
 
+private final boolean STRICT_SERVLET_COMPLIANCE =
+
Boolean.getBoolean("org.apache.catalina.STRICT_SERVLET_COMPLIANCE");
 
 @SuppressWarnings("deprecation") // Default to false when deprecated code 
is removed
 private boolean allowEqualsInValue = CookieSupport.ALLOW_EQUALS_IN_VALUE;
@@ -98,9 +100,7 @@ public final class LegacyCookieProcessor
  // when deprecated code is removed
 private boolean preserveCookieHeader = 
CookieSupport.PRESERVE_COOKIE_HEADER;
 
-@SuppressWarnings("deprecation") // Default to !STRICT_SERVLET_COMPLIANCE
- // when deprecated code is removed
-private boolean alwaysAddExpires = SetCookieSupport.ALWAYS_ADD_EXPIRES;
+private boolean alwaysAddExpires = !STRICT_SERVLET_COMPLIANCE;
 
 private final BitSet httpSeparatorFlags = new BitSet(128);
 



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



svn commit: r1702874 - /tomcat/tc8.0.x/trunk/test/org/apache/tomcat/util/http/TesterHttpMessagesPerformance.java

2015-09-14 Thread markt
Author: markt
Date: Mon Sep 14 09:04:55 2015
New Revision: 1702874

URL: http://svn.apache.org/r1702874
Log:
Add test class I've been using for benchmarking

Added:

tomcat/tc8.0.x/trunk/test/org/apache/tomcat/util/http/TesterHttpMessagesPerformance.java
   (with props)

Added: 
tomcat/tc8.0.x/trunk/test/org/apache/tomcat/util/http/TesterHttpMessagesPerformance.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/test/org/apache/tomcat/util/http/TesterHttpMessagesPerformance.java?rev=1702874&view=auto
==
--- 
tomcat/tc8.0.x/trunk/test/org/apache/tomcat/util/http/TesterHttpMessagesPerformance.java
 (added)
+++ 
tomcat/tc8.0.x/trunk/test/org/apache/tomcat/util/http/TesterHttpMessagesPerformance.java
 Mon Sep 14 09:04:55 2015
@@ -0,0 +1,28 @@
+package org.apache.tomcat.util.http;
+
+import java.util.Locale;
+
+import org.junit.Test;
+
+public class TesterHttpMessagesPerformance {
+
+@Test
+public void testGetMessage() {
+int iterations = 1000;
+int status = 200;
+
+HttpMessages msgs = HttpMessages.getInstance(Locale.ENGLISH);
+
+for (int i = 0; i < iterations; i++) {
+msgs.getMessage(status);
+}
+
+long start = System.nanoTime();
+for (int i = 0; i < iterations; i++) {
+msgs.getMessage(status);
+}
+long end = System.nanoTime();
+
+System.out.println((end -start) + "ns");
+}
+}

Propchange: 
tomcat/tc8.0.x/trunk/test/org/apache/tomcat/util/http/TesterHttpMessagesPerformance.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: r1702873 - /tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/http/HttpMessages.java

2015-09-14 Thread markt
Author: markt
Date: Mon Sep 14 08:54:24 2015
New Revision: 1702873

URL: http://svn.apache.org/r1702873
Log:
Simpler, thread-safe code.
Better throughput over anything more than 1000 requests.

Modified:
tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/http/HttpMessages.java

Modified: 
tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/http/HttpMessages.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/http/HttpMessages.java?rev=1702873&r1=1702872&r2=1702873&view=diff
==
--- tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/http/HttpMessages.java 
(original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/http/HttpMessages.java Mon 
Sep 14 08:54:24 2015
@@ -44,13 +44,28 @@ public class HttpMessages {
 
 private final StringManager sm;
 
-private String st_200 = null;
-private String st_302 = null;
-private String st_400 = null;
-private String st_404 = null;
+private final String st_200;
+private final String st_302;
+private final String st_400;
+private final String st_404;
 
 private HttpMessages(StringManager sm) {
+// There is a performance tradeoff here. This implementation incurs
+// ~160ns (40ns per StringManager) lookup delay on first access but all
+// subsequent lookups take ~0.25ns.
+// The alternative approach (lazy init of each cached String) delays 
the
+// StringManager lookup until required but increases the time for
+// subsequent lookups to ~0.5ns.
+// These times will be in the noise for most requests. This
+// implementation was chosen because:
+// - Over anything more than a few hundred requests it is faster.
+// - The code is a lot simpler. Thread safe lazy init needs care to get
+//   right. See http://markmail.org/thread/wjp3oejdyxcrz7do
 this.sm = sm;
+st_200 = sm.getString("sc.200");
+st_302 = sm.getString("sc.302");
+st_400 = sm.getString("sc.400");
+st_404 = sm.getString("sc.404");
 }
 
 
@@ -64,37 +79,18 @@ public class HttpMessages {
  * HTTP specification
  */
 public String getMessage(int status) {
-switch( status ) {
-case 200: {
-String s = st_200;
-if(s == null ) {
-st_200 = s = sm.getString("sc.200");
-}
-return s;
+switch (status) {
+case 200:
+return st_200;
+case 302:
+return st_302;
+case 400:
+return st_400;
+case 404:
+return st_404;
+default:
+return sm.getString("sc."+ status);
 }
-case 302: {
-String s = st_302;
-if(s == null ) {
-st_302 = s = sm.getString("sc.302");
-}
-return s;
-}
-case 400: {
-String s = st_400;
-if(s == null ) {
-st_400 = s = sm.getString("sc.400");
-}
-return s;
-}
-case 404: {
-String s = st_404;
-if(s == null ) {
-st_404 = s = sm.getString("sc.404");
-}
-return s;
-}
-}
-return sm.getString("sc."+ status);
 }
 
 



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



Re: NIO sendfile

2015-09-14 Thread jean-frederic clere

On 09/14/2015 10:21 AM, Mark Thomas wrote:

On 14/09/2015 09:16, jean-frederic clere wrote:

Hi,

I have noted that "sendfile" with the NIO connector doesn't fill the CPU
on a load test I am testing HTTP/1.1 with:
sslImplementationName="org.apache.tomcat.util.net.openssl.OpenSSLImplementation"


16 ab creating 80 connections requesting files from 4K to 32M

NIO2 works as excepted with the same configuration but NIO doesn't use
the CPU available on the box.

Any ideas?


Number of Poller threads available?


I am using the default... I will now try 8 (8 processors on the box).

Cheers

Jean-Frederic



Mark



Cheers

Jean-Frederic

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




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





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



Re: NIO sendfile

2015-09-14 Thread Mark Thomas
On 14/09/2015 09:16, jean-frederic clere wrote:
> Hi,
> 
> I have noted that "sendfile" with the NIO connector doesn't fill the CPU
> on a load test I am testing HTTP/1.1 with:
> sslImplementationName="org.apache.tomcat.util.net.openssl.OpenSSLImplementation"
> 
> 
> 16 ab creating 80 connections requesting files from 4K to 32M
> 
> NIO2 works as excepted with the same configuration but NIO doesn't use
> the CPU available on the box.
> 
> Any ideas?

Number of Poller threads available?

Mark

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


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



Re: svn commit: r1702821 - in /tomcat/tc8.0.x/trunk: java/org/apache/tomcat/util/http/HttpMessages.java webapps/docs/changelog.xml

2015-09-14 Thread Mark Thomas
On 14/09/2015 09:00, Mark Thomas wrote:
> On 13/09/2015 23:11, Caldarale, Charles R wrote:
>>> From: ma...@apache.org [mailto:ma...@apache.org] 
>>> Subject: svn commit: r1702821 - in /tomcat/tc8.0.x/trunk: 
>>> java/org/apache/tomcat/util/http/HttpMessages.java 
>>> webapps/docs/changelog.xml
>>
>>> --- tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/http/HttpMessages.java 
>>> (original)
>>> +++ tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/http/HttpMessages.java 
>>> Sun Sep 13 20:36:40 2015
>>> @@ -69,26 +69,34 @@ public class HttpMessages {
>>>  // Does HTTP requires/allow international messages or
>>>  // are pre-defined? The user doesn't see them most of the time
>>>  switch( status ) {
>>> -case 200:
>>> -if(st_200 == null ) {
>>> -st_200 = sm.getString("sc.200");
>>> +case 200: {
>>> +String s = st_200;
>>> +if(s == null ) {
>>> +st_200 = s = sm.getString("sc.200");
>>>  }
>>> -return st_200;
>>
>> I'm not convinced this removes the data race, since there's still no 
>> guarantee that the storage writes that are part of the object initialization 
>> inside sm.getString() will be visible to another thread before the write to 
>> st_200. Shipilёv's blog has some interesting studies: 
>> http://shipilev.net/blog/2014/safe-public-construction/
> 
> OK. Let me have a read of that blog.

Thanks Chuck. That is the best explanation of all of this that I have
seen so far.

Mark


> 
> At the moment we have two people who claim to be expert in this area
> with different opinions on whether or not the above is safe. Personally,
> my money is on Chuck being right.
> 
> I don't know the JMM well enough to have a definitive opinion at this
> point. I suspect that is going to have to change. This is why I *really*
> want to see an explanation if why a data race occurs here - with
> references to the JMM to back it up - not only to justify the work in
> this area but to help those who are new to the JMM to understand exactly
> why this is a problem. The more of us that understand this, the more
> likely we are as a community to avoid issues like this in the future
> and/or to spot them if one of us makes a mistake.
> 
>> P.S.  The formatting looks a little odd here, with no space after an "if" 
>> nor its opening parenthesis, but a space before the closing one.
> 
> I spotted that and meant to fix it but got distracted and forgot. It
> looks like I'm going to have to revist this code so I'll get that fixed
> as well.
> 
>>  Also, the braces on the case statements aren't needed; using them results 
>> in having two closing braces in the same column at the end of the switch.
> 
> The braces are required because of the repeat declarations of String s.
> 
> Mark
> 
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
> 


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



NIO sendfile

2015-09-14 Thread jean-frederic clere

Hi,

I have noted that "sendfile" with the NIO connector doesn't fill the CPU 
on a load test I am testing HTTP/1.1 with:

sslImplementationName="org.apache.tomcat.util.net.openssl.OpenSSLImplementation"

16 ab creating 80 connections requesting files from 4K to 32M

NIO2 works as excepted with the same configuration but NIO doesn't use 
the CPU available on the box.


Any ideas?

Cheers

Jean-Frederic

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



svn commit: r1702863 - in /tomcat/tc8.0.x/trunk: ./ webapps/docs/changelog.xml webapps/docs/config/cookie-processor.xml

2015-09-14 Thread markt
Author: markt
Date: Mon Sep 14 08:03:09 2015
New Revision: 1702863

URL: http://svn.apache.org/r1702863
Log:
Add docs for missing property alwaysAddExpires on LegacyCookieProcessor

Modified:
tomcat/tc8.0.x/trunk/   (props changed)
tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml
tomcat/tc8.0.x/trunk/webapps/docs/config/cookie-processor.xml

Propchange: tomcat/tc8.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Sep 14 08:03:09 2015
@@ -1 +1 @@
-/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886,1644890,1644892
 
,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657592,1657607,1657609,1657682,1657
 
907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966,1659043,1659053,1659059,1659188-1659189,1659216,1659263,1659293,1659304,1659306-1659307,1659382,1659384,1659428,1659471,1659486,1659505,1659516,1659521,1659524,1659559,1659562,1659803,1659806,1659814,1659833,1659862,1659905,1659919,1659948,1659967,1659983-1659984,1660060,1660074,1660077,1660133,1660168,1660331-1660332,1660353,1660358,1660924,1661386,1661867,1661972,1661990,1662200,1662308-1662309,1662548,1662614,1662736,1662985,1662988-1662989,1663264,1663277,1663298,1663534,1663562,1663676,1663715,1663754,1663768,1663772,1663781,1663893,1663995,1664143,1664163,1664174,1664301,1664317,1664347,1664657,1664659,1664710,1664863-1664864,1664866,1665085,1665292,1665559,1665653,1665661,1665672,1665694,1665697,1665736,1665779,1665976-1665977,1665980-1665981,1665985-1665986,1665989,1665998,1666004,1666008,1666013,1666017,1666024,1666116,1666386-1666387,1666494,1666496,1666552,1666569,1666579,137,149,1
 
666757,1666966,1666972,1666985,1666995,1666997,1667292,1667402,1667406,1667546,1667615,1667630,1667636,1667688,1667764,1667871,1668026,1668135,1668193,1668593,1668596,1668630,1668639,1668843,1669353,1669370,1669451,1669800,1669838,1669876,1669882,1670394,1670433,1670591,1670598-1670600,1670610,1670631,1670719,1670724,1670726,1670730,1670940,1671112,1672272,1672284,1673754,1674294,1675461,1675486,1675594,1675830,1676231,1676250-1676251,1676364,1676381,1676393,1676479,1676525,1676552,1676615,1676630,1676634,1676721,1676926,1676943,1677140,1677802,1678011,1678162,1678174,1678339,1678426-1678427,1678694,1678701,1679534,1679708,1679710,1679716,1680034,1680246,1681056,1681123,1681138,1681280,1681283,1681286,1681450,1681697,1681701,1681729,1681770,1681779,1681793,1681807,1681837-1681838,1681854,1681862,1681958,1682028,1682033,1682311,1682315,1682317,1682320,1682324,1682330,1682842,1684172,1684366,1684383,1684526-1684527,1684549-1684550,1685556,1685591,1685739,1685744,1685772,1685816,168582
 
6,1685891,1687242,1687261,1687268,1687340,1688563,1688841,1688878,165,1688896,1688901,1689345-1689346,1689357,1689656,1689675-1689677,1689679,1689687,1689825,1689856,1689918,1690011,1690021,1690054,1690080,1690209,1691134,1691487,1691813,1692744-1692747,1692849,1693088,1693105,1693429,1693461,1694058,1694111,1694290,1694501,1694548,1694658,1694660,1694788,1694872,1694878,1695006,1695354,1695371,1695459,1695582,1695706,1695778,1696199,1696

svn commit: r1702862 - /tomcat/trunk/webapps/docs/config/cookie-processor.xml

2015-09-14 Thread markt
Author: markt
Date: Mon Sep 14 08:00:49 2015
New Revision: 1702862

URL: http://svn.apache.org/r1702862
Log:
Add docs for missing property alwaysAddExpires on LegacyCookieProcessor

Modified:
tomcat/trunk/webapps/docs/config/cookie-processor.xml

Modified: tomcat/trunk/webapps/docs/config/cookie-processor.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/cookie-processor.xml?rev=1702862&r1=1702861&r2=1702862&view=diff
==
--- tomcat/trunk/webapps/docs/config/cookie-processor.xml (original)
+++ tomcat/trunk/webapps/docs/config/cookie-processor.xml Mon Sep 14 08:00:49 
2015
@@ -147,6 +147,17 @@
 system property.
   
 
+  
+If this is true Tomcat will always add an expires
+parameter to a SetCookie header even for cookies with version greater
+than zero. This is to work around a known IE6 and IE7 bug that causes I
+to ignore the Max-Age parameter in a SetCookie header.
+If org.apache.catalina.STRICT_SERVLET_COMPLIANCE is set
+to true, the default of this setting will be
+false, else the default value will be true.
+
+  
+
   
 If this is true Tomcat will treat the forward slash
 character ('/') as an HTTP separator when processing 
cookie



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



Re: svn commit: r1702821 - in /tomcat/tc8.0.x/trunk: java/org/apache/tomcat/util/http/HttpMessages.java webapps/docs/changelog.xml

2015-09-14 Thread Mark Thomas
On 13/09/2015 23:11, Caldarale, Charles R wrote:
>> From: ma...@apache.org [mailto:ma...@apache.org] 
>> Subject: svn commit: r1702821 - in /tomcat/tc8.0.x/trunk: 
>> java/org/apache/tomcat/util/http/HttpMessages.java webapps/docs/changelog.xml
> 
>> --- tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/http/HttpMessages.java 
>> (original)
>> +++ tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/http/HttpMessages.java 
>> Sun Sep 13 20:36:40 2015
>> @@ -69,26 +69,34 @@ public class HttpMessages {
>>  // Does HTTP requires/allow international messages or
>>  // are pre-defined? The user doesn't see them most of the time
>>  switch( status ) {
>> -case 200:
>> -if(st_200 == null ) {
>> -st_200 = sm.getString("sc.200");
>> +case 200: {
>> +String s = st_200;
>> +if(s == null ) {
>> +st_200 = s = sm.getString("sc.200");
>>  }
>> -return st_200;
> 
> I'm not convinced this removes the data race, since there's still no 
> guarantee that the storage writes that are part of the object initialization 
> inside sm.getString() will be visible to another thread before the write to 
> st_200. Shipilёv's blog has some interesting studies: 
> http://shipilev.net/blog/2014/safe-public-construction/

OK. Let me have a read of that blog.

At the moment we have two people who claim to be expert in this area
with different opinions on whether or not the above is safe. Personally,
my money is on Chuck being right.

I don't know the JMM well enough to have a definitive opinion at this
point. I suspect that is going to have to change. This is why I *really*
want to see an explanation if why a data race occurs here - with
references to the JMM to back it up - not only to justify the work in
this area but to help those who are new to the JMM to understand exactly
why this is a problem. The more of us that understand this, the more
likely we are as a community to avoid issues like this in the future
and/or to spot them if one of us makes a mistake.

> P.S.  The formatting looks a little odd here, with no space after an "if" nor 
> its opening parenthesis, but a space before the closing one.

I spotted that and meant to fix it but got distracted and forgot. It
looks like I'm going to have to revist this code so I'll get that fixed
as well.

>  Also, the braces on the case statements aren't needed; using them results in 
> having two closing braces in the same column at the end of the switch.

The braces are required because of the repeat declarations of String s.

Mark


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