svn commit: r1691134 - in /tomcat/trunk: java/org/apache/coyote/http11/AbstractHttp11Protocol.java webapps/docs/config/http.xml

2015-07-15 Thread violetagg
Author: violetagg
Date: Wed Jul 15 07:07:09 2015
New Revision: 1691134

URL: http://svn.apache.org/r1691134
Log:
Add text/javascript and application/javascript to the default for 
compressableMimeType

Modified:
tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
tomcat/trunk/webapps/docs/config/http.xml

Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java?rev=1691134&r1=1691133&r2=1691134&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java Wed 
Jul 15 07:07:09 2015
@@ -140,7 +140,7 @@ public abstract class AbstractHttp11Prot
 }
 
 
-private String compressableMimeType = 
"text/html,text/xml,text/plain,text/css";
+private String compressableMimeType = 
"text/html,text/xml,text/plain,text/css,text/javascript,application/javascript";
 private String[] compressableMimeTypes = null;
 public String getCompressableMimeType() { return compressableMimeType; }
 public void setCompressableMimeType(String valueS) {

Modified: tomcat/trunk/webapps/docs/config/http.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/http.xml?rev=1691134&r1=1691133&r2=1691134&view=diff
==
--- tomcat/trunk/webapps/docs/config/http.xml (original)
+++ tomcat/trunk/webapps/docs/config/http.xml Wed Jul 15 07:07:09 2015
@@ -340,7 +340,10 @@
 
   The value is a comma separated list of MIME types for which HTTP
   compression may be used.
-  The default value is text/html,text/xml,text/plain,text/css.
+  The default value is
+  
+  
text/html,text/xml,text/plain,text/css,text/javascript,application/javascript
+  .
   
 
 



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



svn commit: r1691135 - in /tomcat/tc8.0.x/trunk: ./ java/org/apache/coyote/http11/AbstractHttp11Protocol.java webapps/docs/changelog.xml webapps/docs/config/http.xml

2015-07-15 Thread violetagg
Author: violetagg
Date: Wed Jul 15 07:16:30 2015
New Revision: 1691135

URL: http://svn.apache.org/r1691135
Log:
Merged revision 1691134 from tomcat/trunk:
Add text/javascript and application/javascript to the default for 
compressableMimeType

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

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

Propchange: tomcat/tc8.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul 15 07:16:30 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,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,1685739,1685744,1685772,1685816,1685826,1685891,1687268,168734
 
0,1688563,1688841,1688878,165,1688896,1688901,1689345-1689346,1689357,1689656,1689675-1689677,1689679,1689687,1689825,1689856,1689918,1690011,1690021,1690054,1690080,1690209
+/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,164027

buildbot failure in ASF Buildbot on tomcat-trunk

2015-07-15 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/48

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] 1691134
Blamelist: violetagg

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: r1691136 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/coyote/http11/AbstractHttp11Protocol.java webapps/docs/changelog.xml webapps/docs/config/http.xml

2015-07-15 Thread violetagg
Author: violetagg
Date: Wed Jul 15 07:32:19 2015
New Revision: 1691136

URL: http://svn.apache.org/r1691136
Log:
Merged revision 1691134 from tomcat/trunk:
Add text/javascript and application/javascript to the default for 
compressableMimeType

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

tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
tomcat/tc7.0.x/trunk/webapps/docs/config/http.xml

Propchange: tomcat/tc7.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul 15 07:32:19 2015
@@ -1,2 +1,2 @@
 
/tomcat/tc8.0.x/trunk:1636525,1637336,1637685,1637709,1638726,1640089,1640276,1640349,1640363,1640366,1640642,1640672,1640674,1640689,1640884,1641001,1641065,1641067,1641375,1641638,1641723,1641726,1641729-1641730,1641736,1641988,1642669-1642670,1642698,1642701,1643205,1643215,1643217,1643230,1643232,1643273,1643285,1643329-1643330,1643511,1643513,1643521,1643539,1643571,1643581-1643582,1643635,1643655,1643738,1643964,1644018,1644333,1644954,1644992,1645014,1645360,1645456,1645627,1645642,1645686,1645903-1645904,1645908-1645909,1645913,1645920,1646458,1646460-1646462,1646735,1646738-1646741,1646744,1646746,1646748-1646755,1646757,1646759-1646760,1647043,1648816,1651420-1651422,1651844,1652926,1652939-1652940,1652973,1653798,1653817,1653841,1654042,1654161,1654736,1654767,1654787,1656592,1662986,1663265,1663278,1663325,1663535,1663567,1663679,1663997,1664175,1664321,1664872,1665061,1665086,1666027,1666395,1666503,1666506,1666560,1666570,1666581,1666759,1666967,1666988,1667553-1667555
 
,1667558,1667617,1667633,1667637,1667747,1667767,1667873,1668028,1668137,1668634,1669432,1669801,1669840,1669895-1669896,1670398,1670435,1670592,1670605-1670607,1670609,1670632,1670720,1670725,1670727,1670731,1671114,1672273,1672285,1673759,1674220,1674295,1675469,1675488,1675595,1675831,1676232,1676367-1676369,1676382,1676394,1676483,1676556,1676635,1678178,1679536,1679988,1680256,1681124,1681182,1681730,1681840,1681864,1681869,1682010,1682034,1682047,1682052-1682053,1682062,1682064,1682070,1682312,1682325,1682331,1682386,1684367,1684385,1685759,1685774,1685827,1685892,1687341,1688904,1689358,1689657
-/tomcat/trunk:1156115-1157160,1157162-1157859,1157862-1157942,1157945-1160347,1160349-1163716,1163718-1166689,1166691-1174340,1174342-1175596,1175598-1175611,1175613-1175932,1175934-1177783,1177785-1177980,1178006-1180720,1180722-1183094,1183096-1187753,1187755,1187775,1187801,1187806,1187809,1187826-1188312,1188314-1188401,1188646-1188840,1188842-1190176,1190178-1195223,1195225-1195953,1195955,1195957-1201238,1201240-1203345,1203347-1206623,1206625-1208046,1208073,1208096,1208114,1208145,1208772,1209194-1212125,1212127-1220291,1220293,1220295-1221321,1221323-1222329,1222332-1222401,1222405-1222795,1222850-1222950,1222969-1225326,1225328-1225463,1225465,1225627,1225629-1226534,1226536-1228908,1228911-1228923,1228927-1229532,1229534-1230766,1230768-1231625,1231627-1233414,1233419-1235207,1235209-1237425,1237427,1237429-1237977,1237981,1237985,1237995,1238070,1238073,1239024-1239048,1239050-1239062,1239135,1239256,1239258-1239485,1239785-1240046,1240101,1240106,1240109,1240112,1240114
 
,1240116,1240118,1240121,1240329,1240474-1240850,1240857,1241087,1241160,1241408-1241822,1241908-1241909,1241912-1242110,1242371-1292130,1292134-1292458,1292464-1292670,1292672-1292776,1292780-1293392,1293397-1297017,1297019-1297963,1297965-1299820,1300108,1300111-1300460,1300520-1300948,1300997,1301006,1301280,1302332,1302348,1302608-1302610,1302649,1302837,1303138,1303163,1303338,1303521,1303587,1303698,1303803,1303852,1304011,1304035,1304037,1304135,1304249,1304253,1304260,1304271,1304275,1304468,1304895,1304930-1304932,1305194,1305943,1305965,1306556,1306579-1306580,1307084,1307310,1307511-1307512,1307579,1307591,1307597,1310636,1310639-1310640,1310642,1310701,1311212,1311995,1327617,1327670,1331766,1333161,1333173,1333827,1334787,1335026,1335257,1335547,1335692,1335711,1335731,1336515,1336813,1336864,1336868,1336884,1337419,1337426,1337546,1337572,1337591-1337595,1337643,1337707,1337719,1337734,1337741,1337745,1338151-1338154,1338178,1342027,1342029,1342315,1342320,1342476,1342
 
498,1342503,1342717,1342795,1342805,1343044-1343046,1343335,1343394,1343400,1343629,1343708,1343718,1343895,1344063,1344068,1344250,1344266,1344515,1344528,1344612,1344629,1344725,1344868,1344890,1344893,1344896,1344901,1345020,1345029,1345039,1345287-1345290,1345294,1345309,1345325,1345357,1345367,1345579-1345580,1345582,1345688,1345699,1345704,1345731-1345732,1345737,1345744,1345752,1345754,1345779,1345781,1345846,1346107,1346365,1346376,1346404,1346510,1346514,1346519,1346581,1346635,1346644,1346683,1346794,1346885,1346932,1347034,1347047,1347087,1347108-1347109,1347583,1347737,1348105,1348357,1348398,1348425,1348461-1348495,1348498,1348752,1348762,1348772,1348776,1348859,1348968,1348

buildbot failure in ASF Buildbot on tomcat-7-trunk

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

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

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-7-commit' 
triggered this build
Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1691136
Blamelist: violetagg

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



buildbot success in ASF Buildbot on tomcat-8-trunk

2015-07-15 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/22

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] 1691135
Blamelist: violetagg

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: r1691150 - in /tomcat/trunk/java/org/apache/tomcat/util/net: AbstractJsseEndpoint.java SSLUtil.java jsse/JSSESocketFactory.java openssl/OpenSSLContext.java openssl/OpenSSLUtil.java

2015-07-15 Thread remm
Author: remm
Date: Wed Jul 15 09:33:16 2015
New Revision: 1691150

URL: http://svn.apache.org/r1691150
Log:
Add plumbing for ALPN with JSSE (trying to test with HTTP/2 and OpenSSL, but it 
crashes during handshake at the moment if protocols have been configured).
Todo: After handshake, the protocol will be read using a new interface that the 
SSLEngine will have.

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/AbstractJsseEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/SSLUtil.java
tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java
tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java
tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLUtil.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AbstractJsseEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AbstractJsseEndpoint.java?rev=1691150&r1=1691149&r2=1691150&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AbstractJsseEndpoint.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AbstractJsseEndpoint.java Wed 
Jul 15 09:33:16 2015
@@ -81,7 +81,7 @@ public abstract class AbstractJsseEndpoi
 for (SSLHostConfigCertificate certificate : 
sslHostConfig.getCertificates(true)) {
 SSLUtil sslUtil = 
sslImplementation.getSSLUtil(sslHostConfig, certificate);
 
-SSLContext sslContext = sslUtil.createSSLContext();
+SSLContext sslContext = 
sslUtil.createSSLContext(negotiableProtocols);
 sslContext.init(sslUtil.getKeyManagers(), 
sslUtil.getTrustManagers(), null);
 
 SSLSessionContext sessionContext = 
sslContext.getServerSessionContext();

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/SSLUtil.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/SSLUtil.java?rev=1691150&r1=1691149&r2=1691150&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/SSLUtil.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/SSLUtil.java Wed Jul 15 
09:33:16 2015
@@ -16,13 +16,15 @@
  */
 package org.apache.tomcat.util.net;
 
+import java.util.List;
+
 import javax.net.ssl.KeyManager;
 import javax.net.ssl.SSLSessionContext;
 import javax.net.ssl.TrustManager;
 
 public interface SSLUtil {
 
-public SSLContext createSSLContext() throws Exception;
+public SSLContext createSSLContext(List negotiableProtocols) 
throws Exception;
 
 public KeyManager[] getKeyManagers() throws Exception;
 

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java?rev=1691150&r1=1691149&r2=1691150&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java 
Wed Jul 15 09:33:16 2015
@@ -89,7 +89,7 @@ public class JSSESocketFactory implement
 
 SSLContext context;
 try {
-context = createSSLContext();
+context = createSSLContext(null);
 context.init(null,  null,  null);
 } catch (NoSuchAlgorithmException | KeyManagementException e) {
 // This is fatal for the connector so throw an exception to prevent
@@ -251,7 +251,7 @@ public class JSSESocketFactory implement
 
 
 @Override
-public SSLContext createSSLContext() throws NoSuchAlgorithmException {
+public SSLContext createSSLContext(List negotiableProtocols) 
throws NoSuchAlgorithmException {
 return new JSSESSLContext(sslHostConfig.getSslProtocol());
 }
 

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java?rev=1691150&r1=1691149&r2=1691150&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java 
Wed Jul 15 09:33:16 2015
@@ -17,6 +17,7 @@
 package org.apache.tomcat.util.net.openssl;
 
 import java.io.IOException;
+import java.nio.charset.StandardCharsets;
 import java.security.InvalidAlgorithmParameterException;
 import java.security.InvalidKeyException;
 import java.security.NoSuchAlgorithmException;
@@ -69,10 +70,16 @@ public class OpenSSLContext implements o
 
 private static final String defaultProtocol = "TLS";
 
+// http/1.1 with preceding length
+private static final byte[] ALPN_DEFAULT =
+ 

buildbot success in ASF Buildbot on tomcat-trunk

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

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] 1691150
Blamelist: remm

Build succeeded!

Sincerely,
 -The Buildbot




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



Re: [Bug 55317] Facilitate weaving by allowing ClassFileTransformer to be added to WebppClassLoader

2015-07-15 Thread Violeta Georgieva
Hi,

2013-09-27 2:16 GMT+03:00 :
>
> https://issues.apache.org/bugzilla/show_bug.cgi?id=55317
>
> --- Comment #25 from Nick Williams  ---
> *** At the very least, it should say "@since 8.0, 7.0.46."

While I was looking at this feature which was marked as available in
7.0.46, I did not find neither implementation nor changelog for it in
Tomcat 7 code base.

What am I missing?

Thanks a lot,
Violeta

> --
> 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: r1691237 - in /tomcat/trunk/java/org/apache/tomcat/util/net: AbstractEndpoint.java SSLUtil.java SecureNio2Channel.java openssl/OpenSSLContext.java openssl/OpenSSLEngine.java

2015-07-15 Thread remm
Author: remm
Date: Wed Jul 15 15:50:12 2015
New Revision: 1691237

URL: http://svn.apache.org/r1691237
Log:
Add ALPN to NIO2 with JSSE and OpenSSL. No NIO yet since it would need a 
refactoring to pass the socket wrapper to NioChannel to be able to set the 
negotiated protocol (?).

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/SSLUtil.java
tomcat/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java
tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java
tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.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=1691237&r1=1691236&r2=1691237&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java Wed Jul 
15 15:50:12 2015
@@ -575,6 +575,9 @@ public abstract class AbstractEndpoint 0);
+}
 
 /**
  * Attributes provide a way for configuration to be passed to 
sub-components

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/SSLUtil.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/SSLUtil.java?rev=1691237&r1=1691236&r2=1691237&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/SSLUtil.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/SSLUtil.java Wed Jul 15 
15:50:12 2015
@@ -60,4 +60,11 @@ public interface SSLUtil {
  */
 public String[] getEnableableProtocols(SSLContext context);
 
+public interface ProtocolInfo {
+/**
+ * ALPN information.
+ * @return the protocol selected using ALPN
+ */
+public String getNegotiatedProtocol();
+}
 }

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=1691237&r1=1691236&r2=1691237&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java Wed Jul 
15 15:50:12 2015
@@ -216,6 +216,9 @@ public class SecureNio2Channel extends N
 throw new 
IOException(sm.getString("channel.nio.ssl.notHandshaking"));
 }
 case FINISHED: {
+if (endpoint.hasNegotiableProtocols() && sslEngine 
instanceof SSLUtil.ProtocolInfo) {
+socket.setNegotiatedProtocol(((SSLUtil.ProtocolInfo) 
sslEngine).getNegotiatedProtocol());
+}
 //we are complete if we have delivered the last package
 handshakeComplete = !netOutBuffer.hasRemaining();
 //return 0 if we are complete, otherwise we still have 
data to write

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java?rev=1691237&r1=1691236&r2=1691237&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java 
Wed Jul 15 15:50:12 2015
@@ -449,7 +449,8 @@ public class OpenSSLContext implements o
 
 @Override
 public SSLEngine createSSLEngine() {
-return new OpenSSLEngine(ctx, defaultProtocol, false, sessionContext);
+return new OpenSSLEngine(ctx, defaultProtocol, false, sessionContext,
+(negotiableProtocols != null && negotiableProtocols.size() > 
0));
 }
 
 @Override

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java?rev=1691237&r1=1691236&r2=1691237&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java Wed 
Jul 15 15:50:12 2015
@@ -51,6 +51,7 @@ import org.apache.tomcat.jni.SSL;
 import org.apache.tomcat.jni.SSLContext;
 import org.apache.tomcat.util.buf.ByteBufferUtils;
 import org.apache.tomcat.util.net.Constants;
+import org.apache.tomcat.util.net.SSLUtil;
 import org.apache.tomcat.util.res.StringManager;
 
 /**
@@ -58,7 +59,7 @@ import org.apache.tomcat.util.res.Stri

svn commit: r1691244 - in /tomcat/trunk/java/org/apache/tomcat/util/net: NioChannel.java NioEndpoint.java SecureNioChannel.java

2015-07-15 Thread remm
Author: remm
Date: Wed Jul 15 16:20:38 2015
New Revision: 1691244

URL: http://svn.apache.org/r1691244
Log:
Add ALPN support to NIO by passing the socket wrapper to the channel.

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

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioChannel.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioChannel.java?rev=1691244&r1=1691243&r2=1691244&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioChannel.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioChannel.java Wed Jul 15 
16:20:38 2015
@@ -42,6 +42,7 @@ public class NioChannel implements ByteC
 protected static ByteBuffer emptyBuf = ByteBuffer.allocate(0);
 
 protected SocketChannel sc = null;
+protected SocketWrapperBase socket = null;
 
 protected final SocketBufferHandler bufHandler;
 
@@ -65,6 +66,10 @@ public class NioChannel implements ByteC
 }
 
 
+void setSocketWrapper(SocketWrapperBase socket) {
+this.socket = socket;
+}
+
 /**
  * Free the channel memory
  */

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=1691244&r1=1691243&r2=1691244&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Wed Jul 15 
16:20:38 2015
@@ -731,6 +731,7 @@ public class NioEndpoint extends Abstrac
 public void register(final NioChannel socket) {
 socket.setPoller(this);
 NioSocketWrapper ka = new NioSocketWrapper(socket, 
NioEndpoint.this);
+socket.setSocketWrapper(ka);
 ka.setPoller(this);
 ka.setReadTimeout(getSocketProperties().getSoTimeout());
 ka.setWriteTimeout(getSocketProperties().getSoTimeout());

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/SecureNioChannel.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/SecureNioChannel.java?rev=1691244&r1=1691243&r2=1691244&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/SecureNioChannel.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/SecureNioChannel.java Wed Jul 
15 16:20:38 2015
@@ -185,6 +185,9 @@ public class SecureNioChannel extends Ni
 throw new 
IOException(sm.getString("channel.nio.ssl.notHandshaking"));
 }
 case FINISHED: {
+if (endpoint.hasNegotiableProtocols() && sslEngine 
instanceof SSLUtil.ProtocolInfo) {
+socket.setNegotiatedProtocol(((SSLUtil.ProtocolInfo) 
sslEngine).getNegotiatedProtocol());
+}
 //we are complete if we have delivered the last package
 handshakeComplete = !netOutBuffer.hasRemaining();
 //return 0 if we are complete, otherwise we still have 
data to write



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



[Bug 58143] New: The WebppClassLoader doesn't call transformers on cached classes

2015-07-15 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58143

Bug ID: 58143
   Summary: The WebppClassLoader doesn't call transformers on
cached classes
   Product: Tomcat 8
   Version: 8.0.24
  Hardware: PC
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: andrei.iva...@gmail.com

The Spring Framework load time weaving mechanism registers class file
transformers when the web app is deployed:

WebappClassLoader(WebappClassLoaderBase).addTransformer(ClassFileTransformer)
line: 666
TomcatLoadTimeWeaver.addTransformer(ClassFileTransformer) line: 88
DefaultContextLoadTimeWeaver.addTransformer(ClassFileTransformer) line: 143 
AspectJWeavingEnabler.enableAspectJWeaving(LoadTimeWeaver, ClassLoader)
line: 83
   
AspectJWeavingEnabler.postProcessBeanFactory(ConfigurableListableBeanFactory)
line: 71
   
PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(Collection,
ConfigurableListableBeanFactory) line: 284
   
PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(ConfigurableListableBeanFactory,
List) line: 174
   
XmlWebApplicationContext(AbstractApplicationContext).invokeBeanFactoryPostProcessors(ConfigurableListableBeanFactory)
line: 658
XmlWebApplicationContext(AbstractApplicationContext).refresh() line: 504
   
ContextLoaderListener(ContextLoader).configureAndRefreshWebApplicationContext(ConfigurableWebApplicationContext,
ServletContext) line: 446
   
ContextLoaderListener(ContextLoader).initWebApplicationContext(ServletContext)
line: 328
ContextLoaderListener.contextInitialized(ServletContextEvent) line: 107
StandardContext.listenerStart() line: 4729
StandardContext.startInternal() line: 5167
StandardContext(LifecycleBase).start() line: 150
StandardHost(ContainerBase).addChildInternal(Container) line: 725
StandardHost(ContainerBase).addChild(Container) line: 701
StandardHost.addChild(Container) line: 717
HostConfig.deployWAR(ContextName, File) line: 945
HostConfig$DeployWar.run() line: 1768
Executors$RunnableAdapter.call() line: 511
FutureTask.run() line: 266
ThreadPoolExecutor.runWorker(ThreadPoolExecutor$Worker) line: 1142
ThreadPoolExecutor$Worker.run() line: 617
Thread.run() line: 745

After this moment, any classes loaded will be transformed, if necessary.

My problem is that Tomcat loads some classes before these transformers are
registered:
WebappClassLoader(WebappClassLoaderBase).findResourceInternal(String,
String, boolean) line: 2639
WebappClassLoader(WebappClassLoaderBase).findResource(String) line: 936
WebappClassLoader(WebappClassLoaderBase).getResourceAsStream(String) line:
1115
ContextConfig.populateJavaClassCache(String) line: 2165
ContextConfig.populateJavaClassCache(String, JavaClass) line: 2155
ContextConfig.checkHandlesTypes(JavaClass) line: 2060
ContextConfig.processAnnotationsStream(InputStream, WebXml, boolean) line:
2012
ContextConfig.processAnnotationsJar(URL, WebXml, boolean) line: 1961
ContextConfig.processAnnotationsUrl(URL, WebXml, boolean) line: 1936
ContextConfig.processAnnotations(Set, boolean) line: 1897
ContextConfig.webConfig() line: 1149
ContextConfig.configureStart() line: 771
ContextConfig.lifecycleEvent(LifecycleEvent) line: 305
LifecycleSupport.fireLifecycleEvent(String, Object) line: 117
StandardContext(LifecycleBase).fireLifecycleEvent(String, Object) line: 90  
StandardContext.startInternal() line: 5066
StandardContext(LifecycleBase).start() line: 150
StandardHost(ContainerBase).addChildInternal(Container) line: 725
StandardHost(ContainerBase).addChild(Container) line: 701
StandardHost.addChild(Container) line: 717
HostConfig.deployWAR(ContextName, File) line: 945
HostConfig$DeployWar.run() line: 1768
Executors$RunnableAdapter.call() line: 511
FutureTask.run() line: 266
ThreadPoolExecutor.runWorker(ThreadPoolExecutor$Worker) line: 1142
ThreadPoolExecutor$Worker.run() line: 617
Thread.run() line: 745

This makes subsequent calls to WebappClassLoaderBase.findResourceInternal to
return cached resources:
ResourceEntry entry = resourceEntries.get(path);
if (entry != null) {
return entry;
}

These cached resources will not go through the transformers, which are called
bellow.

Maybe the resourceEntries cache could be flushed somehow?

-- 
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 58143] The WebppClassLoader doesn't call transformers on cached classes

2015-07-15 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58143

Andrei Ivanov  changed:

   What|Removed |Added

 OS||All

--- Comment #1 from Andrei Ivanov  ---
This started from https://jira.spring.io/browse/SPR-13210

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



Re: [Bug 55317] Facilitate weaving by allowing ClassFileTransformer to be added to WebppClassLoader

2015-07-15 Thread Mark Thomas
On 15 July 2015 16:28:59 CEST, Violeta Georgieva  wrote:
>Hi,
>
>2013-09-27 2:16 GMT+03:00 :
>>
>> https://issues.apache.org/bugzilla/show_bug.cgi?id=55317
>>
>> --- Comment #25 from Nick Williams 
>---
>> *** At the very least, it should say "@since 8.0, 7.0.46."
>
>While I was looking at this feature which was marked as available in
>7.0.46, I did not find neither implementation nor changelog for it in
>Tomcat 7 code base.
>
>What am I missing?

The original patch assumed it would be applied to 7.0.x but it never was.

Mark


>
>Thanks a lot,
>Violeta
>
>> --
>> 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
>>

I

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



[Bug 58143] The WebppClassLoader doesn't call transformers on cached classes

2015-07-15 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58143

donnchadh  changed:

   What|Removed |Added

 CC||donnch...@gmail.com

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



Re: [Bug 55317] Facilitate weaving by allowing ClassFileTransformer to be added to WebppClassLoader

2015-07-15 Thread Violeta Georgieva
2015-07-15 20:06 GMT+03:00 Mark Thomas :
>
> On 15 July 2015 16:28:59 CEST, Violeta Georgieva 
wrote:
> >Hi,
> >
> >2013-09-27 2:16 GMT+03:00 :
> >>
> >> https://issues.apache.org/bugzilla/show_bug.cgi?id=55317
> >>
> >> --- Comment #25 from Nick Williams 
> >---
> >> *** At the very least, it should say "@since 8.0, 7.0.46."
> >
> >While I was looking at this feature which was marked as available in
> >7.0.46, I did not find neither implementation nor changelog for it in
> >Tomcat 7 code base.
> >
> >What am I missing?
>
> The original patch assumed it would be applied to 7.0.x but it never was.


Ah

OK. What do you think if I backport the feature?

Thanks,
Violeta

> Mark
>
>
> >
> >Thanks a lot,
> >Violeta
> >
> >> --
> >> 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
> >>
>
> I
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>


Re: [Bug 55317] Facilitate weaving by allowing ClassFileTransformer to be added to WebppClassLoader

2015-07-15 Thread Mark Thomas
On 15 July 2015 21:52:45 CEST, Violeta Georgieva  wrote:
>2015-07-15 20:06 GMT+03:00 Mark Thomas :
>>
>> On 15 July 2015 16:28:59 CEST, Violeta Georgieva 
>wrote:
>> >Hi,
>> >
>> >2013-09-27 2:16 GMT+03:00 :
>> >>
>> >> https://issues.apache.org/bugzilla/show_bug.cgi?id=55317
>> >>
>> >> --- Comment #25 from Nick Williams 
>> >---
>> >> *** At the very least, it should say "@since 8.0, 7.0.46."
>> >
>> >While I was looking at this feature which was marked as available in
>> >7.0.46, I did not find neither implementation nor changelog for it
>in
>> >Tomcat 7 code base.
>> >
>> >What am I missing?
>>
>> The original patch assumed it would be applied to 7.0.x but it never
>was.
>
>
>Ah
>
>OK. What do you think if I backport the feature?

No objections here.

Mark


>
>Thanks,
>Violeta
>
>> Mark
>>
>>
>> >
>> >Thanks a lot,
>> >Violeta
>> >
>> >> --
>> >> 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
>> >>
>>
>> I
>>
>> -
>> 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



Tomcat initialize SelectorContext twice when lookup for JNDI defined in web application (META-INF/context.xml)

2015-07-15 Thread Niranjan Karunanandham
Hi,

On debugging Tomcat (7.0.59), I noticed that the SelectorContext is
initialized twice when a lookup is performed for JNDI defined in web
application (META-INF/context.xml).
When the lookup is performed, the Servlet first calls the init method of
InitailContext and this "returns new SelectorContext(env, true)". Then it
calls the lookup method of InitialContext which again initializes the
SelectorContext but now it "returns new SelectorContext(env)" [where the
SelectorContextor.initialContext is set to *false*] and then the lookup is
performed.

Why is tomcat initializing the SelectorContext twice here?

My Java Webapp Code which does the lookup:
*initCtx = new InitialContext();*
*Context envContext = (Context) initCtx.lookup("java:comp/env");*
*DataSource dataSource = (DataSource) envContext.lookup("*jdbc/contextDB
*");*

Resource defined in META-INF/context.xml in webapp:




Regards,

*Niranjan Karunanandham*