[Bug 61489] Disable creation of command line parameters from GET parameters in the URL for CGIServlet

2017-09-15 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=61489

--- Comment #7 from jm009  ---
Thank you for the feedback and for applying the patch.

-- 
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 61489] Disable creation of command line parameters from GET parameters in the URL for CGIServlet

2017-09-15 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=61489

--- Comment #8 from Mark Thomas  ---
np and thanks for the patch - just realised I forgot to say that before.

-- 
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: r1808433 - /tomcat/trunk/test/org/apache/tomcat/util/net/openssl/TestOpenSSLConf.java

2017-09-15 Thread rjung
Author: rjung
Date: Fri Sep 15 08:30:49 2017
New Revision: 1808433

URL: http://svn.apache.org/viewvc?rev=1808433&view=rev
Log:
Add some more info when test is failing like
currently on gump.

Backport notice: String.join() is Java 8 only.

Modified:
tomcat/trunk/test/org/apache/tomcat/util/net/openssl/TestOpenSSLConf.java

Modified: 
tomcat/trunk/test/org/apache/tomcat/util/net/openssl/TestOpenSSLConf.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/net/openssl/TestOpenSSLConf.java?rev=1808433&r1=1808432&r2=1808433&view=diff
==
--- tomcat/trunk/test/org/apache/tomcat/util/net/openssl/TestOpenSSLConf.java 
(original)
+++ tomcat/trunk/test/org/apache/tomcat/util/net/openssl/TestOpenSSLConf.java 
Fri Sep 15 08:30:49 2017
@@ -67,10 +67,14 @@ public class TestOpenSSLConf extends Tom
 public void testOpenSSLConfCmdCipher() throws Exception {
 SSLHostConfig sslHostConfig = initOpenSSLConfCmdCipher("CipherString", 
CIPHER);
 String[] ciphers = sslHostConfig.getEnabledCiphers();
-assertEquals("Checking enabled cipher count", 1, ciphers.length);
+String cipherList = String.join(",", ciphers);
+assertEquals("Checking enabled cipher count (ciphers " +
+ cipherList + ")", 1, ciphers.length);
 assertEquals("Checking enabled cipher", CIPHER, ciphers[0]);
 ciphers = 
SSLContext.getCiphers(sslHostConfig.getOpenSslContext().longValue());
-assertEquals("Checking context cipher count", 1, ciphers.length);
+cipherList = String.join(",", ciphers);
+assertEquals("Checking context cipher count (ciphers " +
+ cipherList + ")", 1, ciphers.length);
 assertEquals("Checking context cipher", CIPHER, ciphers[0]);
 }
 
@@ -78,8 +82,10 @@ public class TestOpenSSLConf extends Tom
 public void testOpenSSLConfCmdProtocol() throws Exception {
 SSLHostConfig sslHostConfig = initOpenSSLConfCmdCipher("Protocol", 
PROTOCOL);
 String[] protocols = sslHostConfig.getEnabledProtocols();
-assertEquals("Checking enabled protocol count", 2, protocols.length);
-assertEquals("Checking enabled protocol", EXPECTED_PROTOCOLS,
- protocols[0] + "," + protocols[1]);
+String protocolList = String.join(",", protocols);
+assertEquals("Checking enabled protocol count (protocols "
+ + protocolList + ")", 2, protocols.length);
+assertEquals("Checking enabled protocols", EXPECTED_PROTOCOLS,
+ protocolList);
 }
 }



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



svn commit: r1808438 - /tomcat/trunk/test/org/apache/tomcat/util/net/openssl/TestOpenSSLConf.java

2017-09-15 Thread rjung
Author: rjung
Date: Fri Sep 15 09:07:57 2017
New Revision: 1808438

URL: http://svn.apache.org/viewvc?rev=1808438&view=rev
Log:
Modernice array checks in unit test.

Modified:
tomcat/trunk/test/org/apache/tomcat/util/net/openssl/TestOpenSSLConf.java

Modified: 
tomcat/trunk/test/org/apache/tomcat/util/net/openssl/TestOpenSSLConf.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/net/openssl/TestOpenSSLConf.java?rev=1808438&r1=1808437&r2=1808438&view=diff
==
--- tomcat/trunk/test/org/apache/tomcat/util/net/openssl/TestOpenSSLConf.java 
(original)
+++ tomcat/trunk/test/org/apache/tomcat/util/net/openssl/TestOpenSSLConf.java 
Fri Sep 15 09:07:57 2017
@@ -16,8 +16,11 @@
  */
 package org.apache.tomcat.util.net.openssl;
 
+import org.hamcrest.CoreMatchers;
+
 import static org.junit.Assert.assertEquals;
 
+import org.junit.Assert;
 import org.junit.Assume;
 import org.junit.Test;
 
@@ -30,8 +33,9 @@ import org.apache.tomcat.util.net.Tester
 public class TestOpenSSLConf extends TomcatBaseTest {
 
 private static final String CIPHER = "AES256-SHA256";
+private static final String[] EXPECTED_CIPHERS = {"AES256-SHA256"};
 private static final String PROTOCOL = "-SSLv3,-TLSv1,TLSv1.1,-TLSv1.2";
-private static final String EXPECTED_PROTOCOLS = "SSLv2Hello,TLSv1.1";
+private static final String[] EXPECTED_PROTOCOLS = {"SSLv2Hello", 
"TLSv1.1"};
 
 public SSLHostConfig initOpenSSLConfCmdCipher(String name, String value) 
throws Exception {
 Tomcat tomcat = getTomcatInstance();
@@ -67,25 +71,18 @@ public class TestOpenSSLConf extends Tom
 public void testOpenSSLConfCmdCipher() throws Exception {
 SSLHostConfig sslHostConfig = initOpenSSLConfCmdCipher("CipherString", 
CIPHER);
 String[] ciphers = sslHostConfig.getEnabledCiphers();
-String cipherList = String.join(",", ciphers);
-assertEquals("Checking enabled cipher count (ciphers " +
- cipherList + ")", 1, ciphers.length);
-assertEquals("Checking enabled cipher", CIPHER, ciphers[0]);
+Assert.assertThat("Checking HostConfig ciphers", ciphers,
+  CoreMatchers.is(EXPECTED_CIPHERS));
 ciphers = 
SSLContext.getCiphers(sslHostConfig.getOpenSslContext().longValue());
-cipherList = String.join(",", ciphers);
-assertEquals("Checking context cipher count (ciphers " +
- cipherList + ")", 1, ciphers.length);
-assertEquals("Checking context cipher", CIPHER, ciphers[0]);
+Assert.assertThat("Checking native SSL context ciphers", ciphers,
+  CoreMatchers.is(EXPECTED_CIPHERS));
 }
 
 @Test
 public void testOpenSSLConfCmdProtocol() throws Exception {
 SSLHostConfig sslHostConfig = initOpenSSLConfCmdCipher("Protocol", 
PROTOCOL);
 String[] protocols = sslHostConfig.getEnabledProtocols();
-String protocolList = String.join(",", protocols);
-assertEquals("Checking enabled protocol count (protocols "
- + protocolList + ")", 2, protocols.length);
-assertEquals("Checking enabled protocols", EXPECTED_PROTOCOLS,
- protocolList);
+Assert.assertThat("Checking enabled HostConfig protocols", protocols,
+  CoreMatchers.is(EXPECTED_PROTOCOLS));
 }
 }



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



svn commit: r1808439 - /tomcat/trunk/test/org/apache/tomcat/util/net/openssl/TestOpenSSLConf.java

2017-09-15 Thread rjung
Author: rjung
Date: Fri Sep 15 09:34:46 2017
New Revision: 1808439

URL: http://svn.apache.org/viewvc?rev=1808439&view=rev
Log:
Improve unit test: test for explicitly enabled
and disabled protocols, but allow additional
enabled protocols.

Probably needed when testing against OpenSSL
1.1.1 (master) which starts to include TLSv1.3
support. The change should make the test more
compatible with a range of OpenSSL versions.

Modified:
tomcat/trunk/test/org/apache/tomcat/util/net/openssl/TestOpenSSLConf.java

Modified: 
tomcat/trunk/test/org/apache/tomcat/util/net/openssl/TestOpenSSLConf.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/net/openssl/TestOpenSSLConf.java?rev=1808439&r1=1808438&r2=1808439&view=diff
==
--- tomcat/trunk/test/org/apache/tomcat/util/net/openssl/TestOpenSSLConf.java 
(original)
+++ tomcat/trunk/test/org/apache/tomcat/util/net/openssl/TestOpenSSLConf.java 
Fri Sep 15 09:34:46 2017
@@ -16,11 +16,17 @@
  */
 package org.apache.tomcat.util.net.openssl;
 
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
 import org.hamcrest.CoreMatchers;
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
 
-import org.junit.Assert;
 import org.junit.Assume;
 import org.junit.Test;
 
@@ -32,10 +38,10 @@ import org.apache.tomcat.util.net.Tester
 
 public class TestOpenSSLConf extends TomcatBaseTest {
 
-private static final String CIPHER = "AES256-SHA256";
+private static final String ENABLED_CIPHER = "AES256-SHA256";
 private static final String[] EXPECTED_CIPHERS = {"AES256-SHA256"};
-private static final String PROTOCOL = "-SSLv3,-TLSv1,TLSv1.1,-TLSv1.2";
-private static final String[] EXPECTED_PROTOCOLS = {"SSLv2Hello", 
"TLSv1.1"};
+private static final String[] ENABLED_PROTOCOLS = {"TLSv1.1"};
+private static final String[] DISABLED_PROTOCOLS = {"SSLv3", "TLSv1", 
"TLSv1.2"};
 
 public SSLHostConfig initOpenSSLConfCmdCipher(String name, String value) 
throws Exception {
 Tomcat tomcat = getTomcatInstance();
@@ -56,33 +62,51 @@ public class TestOpenSSLConf extends Tom
 cmd.setValue(value);
 OpenSSLConf conf = new OpenSSLConf();
 conf.addCmd(cmd);
-SSLHostConfig[] sslHostConfigs = 
tomcat.getConnector().getProtocolHandler().findSslHostConfigs();
-assertEquals("Checking SSLHostConfigCount", 1, sslHostConfigs.length);
+SSLHostConfig[] sslHostConfigs = tomcat.getConnector().
+ 
getProtocolHandler().findSslHostConfigs();
+assertEquals("Wrong SSLHostConfigCount", 1, sslHostConfigs.length);
 sslHostConfigs[0].setOpenSslConf(conf);
 
 tomcat.start();
 
 sslHostConfigs = 
tomcat.getConnector().getProtocolHandler().findSslHostConfigs();
-assertEquals("Checking SSLHostConfigCount", 1, sslHostConfigs.length);
+assertEquals("Wrong SSLHostConfigCount", 1, sslHostConfigs.length);
 return sslHostConfigs[0];
 }
 
 @Test
 public void testOpenSSLConfCmdCipher() throws Exception {
-SSLHostConfig sslHostConfig = initOpenSSLConfCmdCipher("CipherString", 
CIPHER);
+SSLHostConfig sslHostConfig = initOpenSSLConfCmdCipher("CipherString",
+   ENABLED_CIPHER);
 String[] ciphers = sslHostConfig.getEnabledCiphers();
-Assert.assertThat("Checking HostConfig ciphers", ciphers,
-  CoreMatchers.is(EXPECTED_CIPHERS));
+assertThat("Wrong HostConfig ciphers", ciphers,
+   CoreMatchers.is(EXPECTED_CIPHERS));
 ciphers = 
SSLContext.getCiphers(sslHostConfig.getOpenSslContext().longValue());
-Assert.assertThat("Checking native SSL context ciphers", ciphers,
-  CoreMatchers.is(EXPECTED_CIPHERS));
+assertThat("Wrong native SSL context ciphers", ciphers,
+   CoreMatchers.is(EXPECTED_CIPHERS));
 }
 
 @Test
 public void testOpenSSLConfCmdProtocol() throws Exception {
-SSLHostConfig sslHostConfig = initOpenSSLConfCmdCipher("Protocol", 
PROTOCOL);
+Set disabledProtocols = new 
HashSet(Arrays.asList(DISABLED_PROTOCOLS));
+StringBuilder sb = new StringBuilder();
+for (String protocol : DISABLED_PROTOCOLS) {
+sb.append(",").append("-").append(protocol);
+}
+for (String protocol : ENABLED_PROTOCOLS) {
+sb.append(",").append(protocol);
+}
+SSLHostConfig sslHostConfig = initOpenSSLConfCmdCipher("Protocol",
+   
sb.substring(1));
 String[] protocols = sslHostConfig.getEnabledProtocols();
-Assert.assertThat("Checking enabled HostCo

svn commit: r1808440 - in /tomcat/tc8.5.x/trunk: ./ test/org/apache/tomcat/util/net/openssl/TestOpenSSLConf.java

2017-09-15 Thread rjung
Author: rjung
Date: Fri Sep 15 09:41:31 2017
New Revision: 1808440

URL: http://svn.apache.org/viewvc?rev=1808440&view=rev
Log:
Modernize array checks in unit test.

Add some more info when test is failing like
currently on gump.

Improve unit test: test for explicitly enabled
and disabled protocols, but allow additional
enabled protocols.

Probably needed when testing against OpenSSL
1.1.1 (master) which starts to include TLSv1.3
support. The change should make the test more
compatible with a range of OpenSSL versions.

Backport of r1808433, r1808438 and r1808439
from trunk.

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

tomcat/tc8.5.x/trunk/test/org/apache/tomcat/util/net/openssl/TestOpenSSLConf.java

Propchange: tomcat/tc8.5.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Sep 15 09:41:31 2017
@@ -1 +1 @@
-/tomcat/trunk:1734785,1734799,1734845,1734928,1735041,1735044,1735480,1735577,1735597,1735599-1735600,1735615,1736145,1736162,1736209,1736280,1736297,1736299,1736489,1736646,1736703,1736836,1736849,1737104-1737105,1737112,1737117,1737119-1737120,1737155,1737157,1737192,1737280,1737339,1737632,1737664,1737715,1737748,1737785,1737834,1737860,1737903,1737959,1738005,1738007,1738014-1738015,1738018,1738022,1738039,1738043,1738059-1738060,1738147,1738149,1738174-1738175,1738261,1738589,1738623-1738625,1738643,1738816,1738850,1738855,1738946-1738948,1738953-1738954,1738979,1738982,1739079-1739081,1739087,1739113,1739153,1739172,1739176,1739191,1739474,1739726,1739762,1739775,1739814,1739817-1739818,1739975,1740131,1740324,1740465,1740495,1740508-1740509,1740520,1740535,1740707,1740803,1740810,1740969,1740980,1740991,1740997,1741015,1741033,1741036,1741058,1741060,1741080,1741147,1741159,1741164,1741173,1741181,1741190,1741197,1741202,1741208,1741213,1741221,1741225,1741232,1741409,1741501
 
,1741677,1741892,1741896,1741984,1742023,1742042,1742071,1742090,1742093,1742101,1742105,1742111,1742139,1742146,1742148,1742166,1742181,1742184,1742187,1742246,1742248-1742251,1742263-1742264,1742268,1742276,1742369,1742387,1742448,1742509-1742512,1742917,1742919,1742933,1742975-1742976,1742984,1742986,1743019,1743115,1743117,1743124-1743125,1743134,1743425,1743554,1743679,1743696-1743698,1743700-1743701,1744058,1744064-1744065,1744125,1744194,1744229,1744270,1744323,1744432,1744684,1744697,1744705,1744713,1744760,1744786,1745083,1745142-1745143,1745145,1745177,1745179-1745180,1745227,1745248,1745254,1745337,1745467,1745473,1745535,1745576,1745735,1745744,1746304,1746306-1746307,1746319,1746327,1746338,1746340-1746341,1746344,1746427,1746441,1746473,1746490,1746492,1746495-1746496,1746499-1746501,1746503-1746507,1746509,1746549,1746551,1746554,1746556,1746558,1746584,1746620,1746649,1746724,1746939,1746989,1747014,1747028,1747035,1747210,1747225,1747234,1747253,1747404,1747506,1747
 
536,1747924,1747980,1747993,1748001,1748253,1748452,1748547,1748629,1748676,1748715,1749287,1749296,1749328,1749373,1749465,1749506,1749508,1749665-1749666,1749763,1749865-1749866,1749898,1749978,1749980,1750011,1750015,1750056,1750480,1750617,1750634,1750692,1750697,1750700,1750703,1750707,1750714,1750718,1750723,1750774,1750899,1750975,1750995,1751061,1751097,1751173,1751438,1751447,1751463,1751702,1752212,1752737,1752745,1753078,1753080,1753358,1753363,1754111,1754140-1754141,1754281,1754310,1754445,1754467,1754494,1754496,1754528,1754532-1754533,1754613,1754714,1754874,1754941,1754944,1754950-1754951,1755005,1755007,1755009,1755132,1755180-1755181,1755185,1755190,1755204-1755206,1755208,1755214,1755224,1755227,1755230,1755629,1755646-1755647,1755650,1755653,1755675,1755680,1755683,1755693,1755717,1755731-1755737,1755812,1755828,1755884,1755890,1755918-1755919,1755942,1755958,1755960,1755970,1755993,1756013,1756019,1756039,1756056,1756083-1756114,1756175,1756288-1756289,1756408-1
 
756410,1756778,1756798,1756878,1756898,1756939,1757123-1757124,1757126,1757128,1757132-1757133,1757136,1757145,1757167-1757168,1757175,1757180,1757182,1757195,1757271,1757278,1757347,1757353-1757354,1757363,1757374,1757399,1757406,1757408,1757485,1757495,1757499,1757527,1757578,1757684,1757722,1757727,1757790,1757799,1757813,1757853,1757883,1757903,1757976,1757997,1758000,1758058,1758072-1758075,1758078-1758079,1758223,1758257,1758261,1758276,1758292,1758369,1758378-1758383,1758421,1758423,1758425-1758427,1758430,1758443,1758448,1758459,1758483,1758486-1758487,1758499,1758525,1758556,1758580,1758582,1758584,1758588,1758842,1759019,1759212,1759224,1759227,1759252,1759274,1759513-1759516,1759611,1759757,1759785-1759790,1760005,1760022,1760109-1760110,1760135,1760200-1760201,1760227,1760300,1760397,1760446,1760454,1760640,1760648,1761057,1761422,1761491,1761498,1761500-1761501,1761550,1761553,1761572,1761574,1761625-1761626,1761628,1761682,1761740,1761752,1762051-1762053,1762123,176216
 
8,1762172,1762182,1762201-1762202,1762204,1762208,1762288,1762296,1762324,1

svn commit: r1808442 - /tomcat/trunk/test/org/apache/tomcat/util/net/openssl/TestOpenSSLConf.java

2017-09-15 Thread markt
Author: markt
Date: Fri Sep 15 10:16:25 2017
New Revision: 1808442

URL: http://svn.apache.org/viewvc?rev=1808442&view=rev
Log:
Fix IDE nags

Modified:
tomcat/trunk/test/org/apache/tomcat/util/net/openssl/TestOpenSSLConf.java

Modified: 
tomcat/trunk/test/org/apache/tomcat/util/net/openssl/TestOpenSSLConf.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/net/openssl/TestOpenSSLConf.java?rev=1808442&r1=1808441&r2=1808442&view=diff
==
--- tomcat/trunk/test/org/apache/tomcat/util/net/openssl/TestOpenSSLConf.java 
(original)
+++ tomcat/trunk/test/org/apache/tomcat/util/net/openssl/TestOpenSSLConf.java 
Fri Sep 15 10:16:25 2017
@@ -88,7 +88,7 @@ public class TestOpenSSLConf extends Tom
 
 @Test
 public void testOpenSSLConfCmdProtocol() throws Exception {
-Set disabledProtocols = new 
HashSet(Arrays.asList(DISABLED_PROTOCOLS));
+Set disabledProtocols = new 
HashSet<>(Arrays.asList(DISABLED_PROTOCOLS));
 StringBuilder sb = new StringBuilder();
 for (String protocol : DISABLED_PROTOCOLS) {
 sb.append(",").append("-").append(protocol);
@@ -103,7 +103,7 @@ public class TestOpenSSLConf extends Tom
 assertFalse("Protocol " + protocol + " is not allowed",
 disabledProtocols.contains(protocol));
 }
-Set enabledProtocols = new 
HashSet(Arrays.asList(protocols));
+Set enabledProtocols = new HashSet<>(Arrays.asList(protocols));
 for (String protocol : ENABLED_PROTOCOLS) {
 assertTrue("Protocol " + protocol + " is not enabled",
enabledProtocols.contains(protocol));



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



[Bug 61524] New: NullPointerException in Http11OutputBuffer

2017-09-15 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=61524

Bug ID: 61524
   Summary: NullPointerException in Http11OutputBuffer
   Product: Tomcat 8
   Version: 8.5.20
  Hardware: PC
OS: Linux
Status: NEW
  Severity: major
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: boris_pet...@live.com
  Target Milestone: 

Hello, this has been happening on ALL 8.5.* versions (I've been upgrading to
the newest version for a while now) and possible for a long time before that.
Jersey's version is 2.25.1, Tomcat is 8.5.20. This is the stacktrace:

java.lang.NullPointerException: null
at
org.apache.coyote.http11.Http11OutputBuffer.commit(Http11OutputBuffer.java:368)
at
org.apache.coyote.http11.Http11Processor.prepareResponse(Http11Processor.java:1304)
at
org.apache.coyote.AbstractProcessor.action(AbstractProcessor.java:258)
at org.apache.coyote.Response.action(Response.java:175)
at org.apache.coyote.Response.sendHeaders(Response.java:357)
at
org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:303)
at
org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:284)
at
org.apache.catalina.connector.CoyoteOutputStream.flush(CoyoteOutputStream.java:118)
at
org.glassfish.jersey.servlet.internal.ResponseWriter$NonCloseableOutputStreamWrapper.flush(ResponseWriter.java:330)
at
org.glassfish.jersey.message.internal.CommittingOutputStream.flush(CommittingOutputStream.java:292)
at
org.glassfish.jersey.message.internal.OutboundMessageContext.close(OutboundMessageContext.java:876)
at
org.glassfish.jersey.server.ContainerResponse.close(ContainerResponse.java:412)
at
org.glassfish.jersey.server.ServerRuntime$Responder.writeResponse(ServerRuntime.java:784)
at
org.glassfish.jersey.server.ServerRuntime$Responder.processResponse(ServerRuntime.java:444)
at
org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:434)
at
org.glassfish.jersey.server.ServerRuntime$AsyncResponder$3.run(ServerRuntime.java:934)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
at
org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
at
org.glassfish.jersey.server.ServerRuntime$AsyncResponder.resume(ServerRuntime.java:966)
at
org.glassfish.jersey.server.ServerRuntime$AsyncResponder.resume(ServerRuntime.java:922)
at com.company.rest.Contents.lambda$getContent$3(Contents.java:146)
...

What we're doing in "Contents.java:146" is something like:

EntityTag entityTag = getEntityTag(content);
ResponseBuilder responseBuilder =
request.evaluatePreconditions(entityTag);
if (responseBuilder == null) {
// cached resource did change -> serve updated content
responseBuilder = createResponseBuilder(range,
content).tag(entityTag);
}
asyncResponse.resume(responseBuilder.build());

This "content" thing is practically an InputStream - i.e. with this request a
blob is returned. The funny thing is that this happens ALWAYS when returning
"tiff" images. Not sure if this matters of course or if the problem isn't
actually in something from our side. But anyways, this should not blow up with
a NPE. :)

Please tell me if you need any more information.

-- 
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: Code signing service restored

2017-09-15 Thread Christopher Schultz
Mark,

On 9/13/17 2:09 PM, Mark Thomas wrote:
> FYI but mainly for anyone doing a release, the code signing service is
> available again. The account has been renewed for another year and we
> (Tomcat) have enough credits to keep us going for a while. I'll keep an
> eye on our credit usage and get our allocation increased if we need more.

IIRC, Symantec was the vendor providing code-signing certificates.

Are those certificates impacted by the impending dis-trusting of
Symantec-issued TLS certificates?

DigiCert is purchasing (has purchased?) Symantec's various CAs, and that
also might have an effect on (a) the trust of our
certificates/signatures and (b) the future of the code-signing
arrangement with the new vendor.

I suspect DigiCert will be happy to continue to provide ASF with
low/no-cost code-signing credits, but it might be nice to have that
clarified sooner rather than later.

Thanks,
-chris



signature.asc
Description: OpenPGP digital signature


svn commit: r1808466 - in /tomcat/trunk: java/javax/el/ java/org/apache/catalina/realm/ java/org/apache/catalina/security/ java/org/apache/tomcat/util/descriptor/ java/org/apache/tomcat/util/net/ java

2017-09-15 Thread markt
Author: markt
Date: Fri Sep 15 16:44:20 2017
New Revision: 1808466

URL: http://svn.apache.org/viewvc?rev=1808466&view=rev
Log:
Fix some low hanging FindBugs fruit

Modified:
tomcat/trunk/java/javax/el/Util.java
tomcat/trunk/java/org/apache/catalina/realm/DigestCredentialHandlerBase.java
tomcat/trunk/java/org/apache/catalina/security/SecurityUtil.java
tomcat/trunk/java/org/apache/tomcat/util/descriptor/LocalResolver.java
tomcat/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java
tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSEUtil.java
tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java
tomcat/trunk/test/org/apache/tomcat/websocket/server/TestCloseBug58624.java
tomcat/trunk/webapps/examples/WEB-INF/jsp/applet/Clock2.java

Modified: tomcat/trunk/java/javax/el/Util.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/Util.java?rev=1808466&r1=1808465&r2=1808466&view=diff
==
--- tomcat/trunk/java/javax/el/Util.java (original)
+++ tomcat/trunk/java/javax/el/Util.java Fri Sep 15 16:44:20 2017
@@ -557,7 +557,7 @@ class Util {
 
 if (clazz == null) {
 throw new MethodNotFoundException(
-message(null, "util.method.notfound", clazz, methodName,
+message(null, "util.method.notfound", null, methodName,
 paramString(paramTypes)));
 }
 

Modified: 
tomcat/trunk/java/org/apache/catalina/realm/DigestCredentialHandlerBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/DigestCredentialHandlerBase.java?rev=1808466&r1=1808465&r2=1808466&view=diff
==
--- 
tomcat/trunk/java/org/apache/catalina/realm/DigestCredentialHandlerBase.java 
(original)
+++ 
tomcat/trunk/java/org/apache/catalina/realm/DigestCredentialHandlerBase.java 
Fri Sep 15 16:44:20 2017
@@ -165,7 +165,7 @@ public abstract class DigestCredentialHa
 if (storedCredentials == null) {
 // Stored credentials are invalid
 // This may be expected if nested credential handlers are being 
used
-logInvalidStoredCredentials(storedCredentials);
+logInvalidStoredCredentials(null);
 return false;
 }
 

Modified: tomcat/trunk/java/org/apache/catalina/security/SecurityUtil.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/security/SecurityUtil.java?rev=1808466&r1=1808465&r2=1808466&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/security/SecurityUtil.java (original)
+++ tomcat/trunk/java/org/apache/catalina/security/SecurityUtil.java Fri Sep 15 
16:44:20 2017
@@ -153,7 +153,7 @@ public final class SecurityUtil{
 Method method = null;
 Method[] methodsCache = classCache.get(Servlet.class);
 if(methodsCache == null) {
-method = createMethodAndCacheIt(methodsCache,
+method = createMethodAndCacheIt(null,
 Servlet.class,
 methodName,
 targetParameterTypes);
@@ -236,7 +236,7 @@ public final class SecurityUtil{
 Method method = null;
 Method[] methodsCache = classCache.get(Filter.class);
 if(methodsCache == null) {
-method = createMethodAndCacheIt(methodsCache,
+method = createMethodAndCacheIt(null,
 Filter.class,
 methodName,
 targetParameterTypes);

Modified: tomcat/trunk/java/org/apache/tomcat/util/descriptor/LocalResolver.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/descriptor/LocalResolver.java?rev=1808466&r1=1808465&r2=1808466&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/descriptor/LocalResolver.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/descriptor/LocalResolver.java Fri 
Sep 15 16:44:20 2017
@@ -89,7 +89,7 @@ public class LocalResolver implements En
 // If there is no systemId, can't try anything else
 if (systemId == null) {
 throw new 
FileNotFoundException(sm.getString("localResolver.unresolvedEntity",
-name, publicId, systemId, base));
+name, publicId, null, base));
 }
 
 // Try resolving with the supplied systemId

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java?rev=1808466&r1=1808465&r2=1808466&view=diff

svn commit: r1808468 - /tomcat/trunk/java/org/apache/catalina/authenticator/jaspic/PersistentProviderRegistrations.java

2017-09-15 Thread markt
Author: markt
Date: Fri Sep 15 16:58:02 2017
New Revision: 1808468

URL: http://svn.apache.org/viewvc?rev=1808468&view=rev
Log:
Fix another low-level FindBugs warning

Modified:

tomcat/trunk/java/org/apache/catalina/authenticator/jaspic/PersistentProviderRegistrations.java

Modified: 
tomcat/trunk/java/org/apache/catalina/authenticator/jaspic/PersistentProviderRegistrations.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/authenticator/jaspic/PersistentProviderRegistrations.java?rev=1808468&r1=1808467&r2=1808468&view=diff
==
--- 
tomcat/trunk/java/org/apache/catalina/authenticator/jaspic/PersistentProviderRegistrations.java
 (original)
+++ 
tomcat/trunk/java/org/apache/catalina/authenticator/jaspic/PersistentProviderRegistrations.java
 Fri Sep 15 16:58:02 2017
@@ -143,7 +143,10 @@ final class PersistentProviderRegistrati
 }
 writer.write("\n");
 } catch (IOException e) {
-configFileNew.delete();
+if (!configFileNew.delete()) {
+
log.warn(sm.getString("persistentProviderRegistrations.deleteFail",
+configFileNew.getAbsolutePath()));
+}
 throw new SecurityException(e);
 }
 



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



svn commit: r1808469 - /tomcat/trunk/test/org/apache/juli/TestFileHandler.java

2017-09-15 Thread markt
Author: markt
Date: Fri Sep 15 17:01:42 2017
New Revision: 1808469

URL: http://svn.apache.org/viewvc?rev=1808469&view=rev
Log:
More low-hanging fruit from FindBugs

Modified:
tomcat/trunk/test/org/apache/juli/TestFileHandler.java

Modified: tomcat/trunk/test/org/apache/juli/TestFileHandler.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/juli/TestFileHandler.java?rev=1808469&r1=1808468&r2=1808469&view=diff
==
--- tomcat/trunk/test/org/apache/juli/TestFileHandler.java (original)
+++ tomcat/trunk/test/org/apache/juli/TestFileHandler.java Fri Sep 15 17:01:42 
2017
@@ -29,6 +29,7 @@ import static org.junit.Assert.assertTru
 import static org.junit.Assert.fail;
 
 import org.junit.After;
+import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 
@@ -59,8 +60,9 @@ public class TestFileHandler {
 
 String date = 
LocalDateTime.now().minusDays(3).toString().replaceAll(":", "-");
 File file = new File(logsDir, PREFIX_1 + date + SUFIX_1);
-file.createNewFile();
-
+if (!file.createNewFile()) {
+Assert.fail("Unable to create " + file.getAbsolutePath());
+}
 }
 
 @After
@@ -118,7 +120,9 @@ public class TestFileHandler {
 for (int i = 0; i < amount; i++) {
 String date = LocalDate.now().minusDays(i + 
1).toString().substring(0, 10);
 File file = new File(dir, prefix + date + sufix);
-file.createNewFile();
+if (!file.createNewFile()) {
+Assert.fail("Unable to create " + file.getAbsolutePath());
+}
 }
 }
 }



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



Re: Code signing service restored

2017-09-15 Thread Mark Thomas
On 15/09/17 16:40, Christopher Schultz wrote:
> Mark,
> 
> On 9/13/17 2:09 PM, Mark Thomas wrote:
>> FYI but mainly for anyone doing a release, the code signing service is
>> available again. The account has been renewed for another year and we
>> (Tomcat) have enough credits to keep us going for a while. I'll keep an
>> eye on our credit usage and get our allocation increased if we need more.
> 
> IIRC, Symantec was the vendor providing code-signing certificates.

Correct.

> Are those certificates impacted by the impending dis-trusting of
> Symantec-issued TLS certificates?
>
> DigiCert is purchasing (has purchased?) Symantec's various CAs, and that
> also might have an effect on (a) the trust of our
> certificates/signatures and (b) the future of the code-signing
> arrangement with the new vendor.

I haven't dug into the detail but my understanding is that the code
signing service will transition to DigiCert.

I'm expecting minimal impact for us. Particularly since no-one has even
questioned the fact that the last handful of Windows Installer releases
have been unsigned.

> I suspect DigiCert will be happy to continue to provide ASF with
> low/no-cost code-signing credits, but it might be nice to have that
> clarified sooner rather than later.

As one of the ASF admins of the code signing service I've had a couple
of emails assuring of a smooth transition so I'm fairly confident.

Mark

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



[Bug 61524] NullPointerException in Http11OutputBuffer

2017-09-15 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=61524

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |NEEDINFO

--- Comment #1 from Mark Thomas  ---
We'll need a simple test case to reproduce the problem for this one.

>From the stack trace it looks like the async task is retaining a reference to
the OutputStream after the associated AsyncContext has completed. There could
be various root causes of that in both Tomcat and the app - hence the request
for a test case.

-- 
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: r1808481 - in /tomcat/trunk/java/org/apache/tomcat/util/net/openssl: OpenSSLContext.java OpenSSLSessionContext.java

2017-09-15 Thread markt
Author: markt
Date: Fri Sep 15 20:11:46 2017
New Revision: 1808481

URL: http://svn.apache.org/viewvc?rev=1808481&view=rev
Log:
Refactor the OpenSSLContext implementation so that a reference is
retained to the instance while a request that is using it is in
progress. This allows destruction to be safely triggered by finalize()

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java

tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLSessionContext.java

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=1808481&r1=1808480&r2=1808481&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 
Fri Sep 15 20:11:46 2017
@@ -414,7 +414,7 @@ public class OpenSSLContext implements o
 sslHostConfig.setEnabledCiphers(SSLContext.getCiphers(ctx));
 }
 
-sessionContext = new OpenSSLSessionContext(ctx);
+sessionContext = new OpenSSLSessionContext(this);
 // If client authentication is being used, OpenSSL requires that
 // this is set so always set it in case an app is configured to
 // require it
@@ -480,6 +480,12 @@ public class OpenSSLContext implements o
 return peerCerts;
 }
 
+
+long getSSLContextID() {
+return ctx;
+}
+
+
 @Override
 public SSLSessionContext getServerSessionContext() {
 return sessionContext;
@@ -501,4 +507,23 @@ public class OpenSSLContext implements o
 throw new UnsupportedOperationException();
 }
 
+@Override
+protected void finalize() throws Throwable {
+/*
+ * When an SSLHostConfig is replaced at runtime, it is not possible to
+ * call destroy() on the associated OpenSSLContext since it is likely
+ * that there will be in-progress connections using the OpenSSLContext.
+ * A reference chain has been deliberately established (see
+ * OpenSSLSessionContext) to ensure that the OpenSSLContext remains
+ * ineligible for GC while those connections are alive. Once those
+ * connections complete, the OpenSSLContext will become eligible for GC
+ * and this method will ensure that the associated native resources are
+ * cleaned up.
+ */
+try {
+destroy();
+} finally {
+super.finalize();
+}
+}
 }

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLSessionContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLSessionContext.java?rev=1808481&r1=1808480&r2=1808481&view=diff
==
--- 
tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLSessionContext.java 
(original)
+++ 
tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLSessionContext.java 
Fri Sep 15 20:11:46 2017
@@ -34,11 +34,18 @@ public class OpenSSLSessionContext imple
 private static final Enumeration EMPTY = new EmptyEnumeration();
 
 private final OpenSSLSessionStats stats;
-private final long context;
+// This is deliberately unused. The reference is retained so that a
+// reference chain is established and maintained to the OpenSSLContext 
while
+// there is a connection that is using the OpenSSLContext. Therefore, the
+// OpenSSLContext can not be eligible for GC while it is in use.
+@SuppressWarnings("unused")
+private final OpenSSLContext context;
+private final long contextID;
 
-OpenSSLSessionContext(long context) {
+OpenSSLSessionContext(OpenSSLContext context) {
 this.context = context;
-stats = new OpenSSLSessionStats(context);
+this.contextID = context.getSSLContextID();
+stats = new OpenSSLSessionStats(contextID);
 }
 
 @Override
@@ -60,7 +67,7 @@ public class OpenSSLSessionContext imple
 if (keys == null) {
 throw new 
IllegalArgumentException(sm.getString("sessionContext.nullTicketKeys"));
 }
-SSLContext.setSessionTicketKeys(context, keys);
+SSLContext.setSessionTicketKeys(contextID, keys);
 }
 
 /**
@@ -70,7 +77,7 @@ public class OpenSSLSessionContext imple
  */
 public void setSessionCacheEnabled(boolean enabled) {
 long mode = enabled ? SSL.SSL_SESS_CACHE_SERVER : 
SSL.SSL_SESS_CACHE_OFF;
-SSLContext.setSessionCacheMode(context, mode);
+SSLContext.setSessionCacheMode(contextID, mode);
 }
 
 /**
@@ -78,7 +85,7 @@ public class OpenSSLSessionContext imple
  * otherwise.
  */
 public boolean isSessionCacheEnable

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

2017-09-15 Thread markt
Author: markt
Date: Fri Sep 15 20:11:41 2017
New Revision: 1808480

URL: http://svn.apache.org/viewvc?rev=1808480&view=rev
Log:
Clear the sslSupport reference at the end of request processing so a
reference is not retained to the SSLContext once the request is
complete.

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=1808480&r1=1808479&r2=1808480&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java Fri Sep 15 
20:11:41 2017
@@ -1392,6 +1392,7 @@ public class Http11Processor extends Abs
 upgradeToken = null;
 socketWrapper = null;
 sendfileData = null;
+sslSupport = null;
 }
 
 



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



svn commit: r1808482 - in /tomcat/trunk: java/org/apache/coyote/ java/org/apache/tomcat/util/net/ webapps/docs/

2017-09-15 Thread markt
Author: markt
Date: Fri Sep 15 20:11:53 2017
New Revision: 1808482

URL: http://svn.apache.org/viewvc?rev=1808482&view=rev
Log:
Allow runtime updates to the current SSLHostConfigs.
Move JMX registration to the Endpoint to make it easirt to keep JMX 
registration in sync with runtime changes.
Protect against removing the default while running

Modified:
tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java
tomcat/trunk/java/org/apache/coyote/LocalStrings.properties
tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/LocalStrings.properties
tomcat/trunk/java/org/apache/tomcat/util/net/SSLHostConfig.java
tomcat/trunk/java/org/apache/tomcat/util/net/SSLHostConfigCertificate.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java?rev=1808482&r1=1808481&r2=1808482&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java Fri Sep 15 
20:11:53 2017
@@ -19,7 +19,6 @@ package org.apache.coyote;
 import java.net.InetAddress;
 import java.nio.ByteBuffer;
 import java.util.Collections;
-import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
@@ -43,8 +42,6 @@ import org.apache.tomcat.util.collection
 import org.apache.tomcat.util.modeler.Registry;
 import org.apache.tomcat.util.net.AbstractEndpoint;
 import org.apache.tomcat.util.net.AbstractEndpoint.Handler;
-import org.apache.tomcat.util.net.SSLHostConfig;
-import org.apache.tomcat.util.net.SSLHostConfigCertificate;
 import org.apache.tomcat.util.net.SocketEvent;
 import org.apache.tomcat.util.net.SocketWrapperBase;
 import org.apache.tomcat.util.res.StringManager;
@@ -72,16 +69,6 @@ public abstract class AbstractProtocol sslOnames = new HashSet<>();
-private Set sslCertOnames = new HashSet<>();
-
-
-/**
  * Unique ID for this connector. Only used if the connector is configured
  * to use a random port as the port will change if stop(), start() is
  * called.
@@ -541,36 +528,14 @@ public abstract class AbstractProtocolhttp://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/LocalStrings.properties?rev=1808482&r1=1808481&r2=1808482&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/LocalStrings.properties (original)
+++ tomcat/trunk/java/org/apache/coyote/LocalStrings.properties Fri Sep 15 
20:11:53 2017
@@ -34,7 +34,6 @@ abstractProtocol.mbeanDeregistrationFail
 abstractProtocolHandler.getAttribute=Get attribute [{0}] with value [{1}]
 abstractProtocolHandler.setAttribute=Set attribute [{0}] with value [{1}]
 abstractProtocolHandler.init=Initializing ProtocolHandler [{0}]
-abstractProtocolHandler.mbeanRegistrationFailed=Failed to register MBean [{0}] 
for ProtocolHandler [{1}]
 abstractProtocolHandler.start=Starting ProtocolHandler [{0}]
 abstractProtocolHandler.pause=Pausing ProtocolHandler [{0}]
 abstractProtocolHandler.resume=Resuming ProtocolHandler [{0}]

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=1808482&r1=1808481&r2=1808482&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java Fri Sep 
15 20:11:53 2017
@@ -33,10 +33,14 @@ import java.util.concurrent.Executor;
 import java.util.concurrent.RejectedExecutionException;
 import java.util.concurrent.TimeUnit;
 
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+
 import org.apache.juli.logging.Log;
 import org.apache.tomcat.util.ExceptionUtils;
 import org.apache.tomcat.util.IntrospectionUtils;
 import org.apache.tomcat.util.collections.SynchronizedStack;
+import org.apache.tomcat.util.modeler.Registry;
 import org.apache.tomcat.util.net.Acceptor.AcceptorState;
 import org.apache.tomcat.util.res.StringManager;
 import org.apache.tomcat.util.threads.LimitLatch;
@@ -170,6 +174,8 @@ public abstract class AbstractEndpoint> processorCache;
 
+private ObjectName oname = null;
+
 // - 
Properties
 
 private String defaultSSLHostConfigName = 
SSLHostConfig.DEFAULT_SSL_HOST_NAME;
@@ -182,7 +188,33 @@ public abstract class AbstractEndpoint sslHostConfigs = new 
ConcurrentHashMap<>();
+/**
+ * Add the given SSL Host configuration.
+ *
+ * @param sslHostConfig The configuration to add
+ *
+ * @thr

[Bug 60762] Enhancement: Add support for runtime SNI changes in tomcat-embed

2017-09-15 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60762

--- Comment #6 from Mark Thomas  ---
This has been implemented in 9.0.x for 9.0.0.M28 onwards.

I'll back-port it to 8.5.x once folks have had a chance to test it.

-- 
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 61526] New: '#' is not recognized as an internal or external command,operable program or batch file.

2017-09-15 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=61526

Bug ID: 61526
   Summary: '#' is not recognized as an internal or external
command,operable program or batch file.
   Product: Tomcat 9
   Version: 9.0.0.M26
  Hardware: PC
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: jambo.w...@qq.com
  Target Milestone: -

Startup.bat give an error message as below:
'#' is not recognized as an internal or external command,operable program or
batch file.

Read the codes and found the problem caused by line 218 in catalina.bat:
# Configure JAVA 9 specific start-up parameters

This line suppose to be a comment line, change the "#" to "rem" then the error
message disappear.

-- 
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 61526] '#' is not recognized as an internal or external command,operable program or batch file.

2017-09-15 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=61526

Igal Sapir  changed:

   What|Removed |Added

 OS||All

--- Comment #1 from Igal Sapir  ---
This has already been fixed at https://github.com/apache/tomcat/commit/3fed0a2

-- 
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 61526] '#' is not recognized as an internal or external command,operable program or batch file.

2017-09-15 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=61526

Chuck Caldarale  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #2 from Chuck Caldarale  ---


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

-- 
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 61419] Hashtag style comment used in catalina.bat

2017-09-15 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=61419

Chuck Caldarale  changed:

   What|Removed |Added

 CC||jambo.w...@qq.com

--- Comment #2 from Chuck Caldarale  ---
*** Bug 61526 has been marked as a duplicate of this 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