[GitHub] [tomcat] jfclere opened a new pull request #309: Allow recursive substitution of properties.
jfclere opened a new pull request #309: URL: https://github.com/apache/tomcat/pull/309 Related to https://issues.redhat.com/browse/JWS-973 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GitHub] [tomcat] michael-o commented on pull request #309: Allow recursive substitution of properties.
michael-o commented on pull request #309: URL: https://github.com/apache/tomcat/pull/309#issuecomment-650097670 I don't have access to the ticket even with my Red Hat Enterprise Account. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GitHub] [tomcat] FSchumacher commented on pull request #309: Allow recursive substitution of properties.
FSchumacher commented on pull request #309: URL: https://github.com/apache/tomcat/pull/309#issuecomment-650099473 That could lead to a StackOverflowError. ``` @Test public void testReplacePropertiesRecursively() { Properties properties = new Properties(); properties.setProperty("replaceMe", "something ${replaceMe}"); IntrospectionUtils.replaceProperties("${replaceMe}", properties, null, null); } ``` Perhaps we should add a max depth parameter here? This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GitHub] [tomcat] jfclere commented on pull request #309: Allow recursive substitution of properties.
jfclere commented on pull request #309: URL: https://github.com/apache/tomcat/pull/309#issuecomment-650128576 I have opened the JIRA and yes the recursion needs to be controlled. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch master updated: Ensure HTTP/1.1 processor is recycled after a direct h2c connection
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/master by this push: new c9167ae Ensure HTTP/1.1 processor is recycled after a direct h2c connection c9167ae is described below commit c9167ae30f3b03b112f3d81772e3450b7d0e6a25 Author: Mark Thomas AuthorDate: Fri Jun 26 12:49:50 2020 +0100 Ensure HTTP/1.1 processor is recycled after a direct h2c connection --- java/org/apache/coyote/AbstractProtocol.java | 9 ++--- webapps/docs/changelog.xml | 4 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/java/org/apache/coyote/AbstractProtocol.java b/java/org/apache/coyote/AbstractProtocol.java index 1190c99..abea68e 100644 --- a/java/org/apache/coyote/AbstractProtocol.java +++ b/java/org/apache/coyote/AbstractProtocol.java @@ -853,8 +853,10 @@ public abstract class AbstractProtocol implements ProtocolHandler, // Assume direct HTTP/2 connection UpgradeProtocol upgradeProtocol = getProtocol().getUpgradeProtocol("h2c"); if (upgradeProtocol != null) { -processor = upgradeProtocol.getProcessor( -wrapper, getProtocol().getAdapter()); +// Release the Http11 processor to be re-used +release(processor); +// Create the upgrade processor +processor = upgradeProtocol.getProcessor(wrapper, getProtocol().getAdapter()); wrapper.unRead(leftOverInput); // Associate with the processor with the connection wrapper.setCurrentProcessor(processor); @@ -864,7 +866,8 @@ public abstract class AbstractProtocol implements ProtocolHandler, "abstractConnectionHandler.negotiatedProcessor.fail", "h2c")); } -return SocketState.CLOSED; +// Exit loop and trigger appropriate clean-up +state = SocketState.CLOSED; } } else { HttpUpgradeHandler httpUpgradeHandler = upgradeToken.getHttpUpgradeHandler(); diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 69f9bee..46f9def 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -110,6 +110,10 @@ Reduce the memory footprint of closed HTTP/2 streams. (markt) + +Ensure that the HTTP/1.1 processor is correctly recycled when a direct +connection to h2c is made. (markt) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 8.5.x updated: Ensure HTTP/1.1 processor is recycled after a direct h2c connection
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/8.5.x by this push: new 923d834 Ensure HTTP/1.1 processor is recycled after a direct h2c connection 923d834 is described below commit 923d834500802a61779318911d7898bd85fc950e Author: Mark Thomas AuthorDate: Fri Jun 26 12:49:50 2020 +0100 Ensure HTTP/1.1 processor is recycled after a direct h2c connection --- java/org/apache/coyote/AbstractProtocol.java | 9 ++--- webapps/docs/changelog.xml | 4 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/java/org/apache/coyote/AbstractProtocol.java b/java/org/apache/coyote/AbstractProtocol.java index 39153f1..577ebbf 100644 --- a/java/org/apache/coyote/AbstractProtocol.java +++ b/java/org/apache/coyote/AbstractProtocol.java @@ -826,8 +826,10 @@ public abstract class AbstractProtocol implements ProtocolHandler, // Assume direct HTTP/2 connection UpgradeProtocol upgradeProtocol = getProtocol().getUpgradeProtocol("h2c"); if (upgradeProtocol != null) { -processor = upgradeProtocol.getProcessor( -wrapper, getProtocol().getAdapter()); +// Release the Http11 processor to be re-used +release(processor); +// Create the upgrade processor +processor = upgradeProtocol.getProcessor(wrapper, getProtocol().getAdapter()); wrapper.unRead(leftOverInput); // Associate with the processor with the connection connections.put(socket, processor); @@ -837,7 +839,8 @@ public abstract class AbstractProtocol implements ProtocolHandler, "abstractConnectionHandler.negotiatedProcessor.fail", "h2c")); } -return SocketState.CLOSED; +// Exit loop and trigger appropriate clean-up +state = SocketState.CLOSED; } } else { HttpUpgradeHandler httpUpgradeHandler = upgradeToken.getHttpUpgradeHandler(); diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 15f36ae..a46bbca 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -103,6 +103,10 @@ Reduce the memory footprint of closed HTTP/2 streams. (markt) + +Ensure that the HTTP/1.1 processor is correctly recycled when a direct +connection to h2c is made. (markt) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 9.0.x updated: Ensure HTTP/1.1 processor is recycled after a direct h2c connection
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/9.0.x by this push: new 172977f Ensure HTTP/1.1 processor is recycled after a direct h2c connection 172977f is described below commit 172977f04a5215128f1e278a688983dcd230f399 Author: Mark Thomas AuthorDate: Fri Jun 26 12:49:50 2020 +0100 Ensure HTTP/1.1 processor is recycled after a direct h2c connection --- java/org/apache/coyote/AbstractProtocol.java | 9 ++--- webapps/docs/changelog.xml | 4 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/java/org/apache/coyote/AbstractProtocol.java b/java/org/apache/coyote/AbstractProtocol.java index cb326dc..5bc2212 100644 --- a/java/org/apache/coyote/AbstractProtocol.java +++ b/java/org/apache/coyote/AbstractProtocol.java @@ -876,8 +876,10 @@ public abstract class AbstractProtocol implements ProtocolHandler, // Assume direct HTTP/2 connection UpgradeProtocol upgradeProtocol = getProtocol().getUpgradeProtocol("h2c"); if (upgradeProtocol != null) { -processor = upgradeProtocol.getProcessor( -wrapper, getProtocol().getAdapter()); +// Release the Http11 processor to be re-used +release(processor); +// Create the upgrade processor +processor = upgradeProtocol.getProcessor(wrapper, getProtocol().getAdapter()); wrapper.unRead(leftOverInput); // Associate with the processor with the connection wrapper.setCurrentProcessor(processor); @@ -887,7 +889,8 @@ public abstract class AbstractProtocol implements ProtocolHandler, "abstractConnectionHandler.negotiatedProcessor.fail", "h2c")); } -return SocketState.CLOSED; +// Exit loop and trigger appropriate clean-up +state = SocketState.CLOSED; } } else { HttpUpgradeHandler httpUpgradeHandler = upgradeToken.getHttpUpgradeHandler(); diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index dca98a2..086e79f 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -107,6 +107,10 @@ Reduce the memory footprint of closed HTTP/2 streams. (markt) + +Ensure that the HTTP/1.1 processor is correctly recycled when a direct +connection to h2c is made. (markt) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Changing the name of the default branch in our git repos
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Mark, On 6/26/20 10:48, Mark Thomas wrote: > Picking up this thread again I see a range of views. "main" seems > to be the most popular although several folks suggested "10.0.x" > and "use whatever GitHub use". There was also interest in "trunk". > Particularly with the additional suggestion of "10.0.x" appearing > in the middle of the discussion, I'm not sure where consensus lies > at the moment. > > One suggestion I particularly liked was to do the rename at the > point we branch 10.0.x and start on 10.1.x since we will need to be > updating CI and various things anyway. That is currently looking > like September as that is the target date for the Jakarta EE 9 > release. > > I suspect that this could get tricky as I'd prefer "main" or > "10.0.x", could work with "trunk" but really don't want to continue > with "master". I imagine others have similar views in different > combinations. Maybe if others express their views in a similar way > to the above we'll end up with a natural consensus. If not, we'll > have to figure something out. I understand the motivation to use more inclusive language, but IMO in the absence of the word "slave", this "master" branch is more analogous to a "master copy" of an artifact (usually recording) and reflects the true etymology of the term, here. If it's more convenient to make this change in September, then let's wait until then. Changing twice doesn't really help anybody and causes a certain amount of chaos. - -chris > On 19/06/2020 16:32, Emmanuel Bourg wrote: >> Le 16/06/2020 à 10:02, Mark Thomas a écrit : >> >>> Thoughts? >> >> I'd prefer the status-quo and keep "master", I've always >> understood this as the 'master record' (I know it might be >> historically wrong) and I haven't seen evidences it has ever >> offended or deterred anyone from contributing. >> >> If there is a consensus to change I suggest waiting to see what >> GitHub plans to do. The "master" name is a de-facto standard for >> Git repositories, and I think we should remain consistent with >> the new name that will be popularized by GitHub. >> >> That said, I have a preference for "main". >> >> Emmanuel Bourg >> >> - >> >> 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 > -BEGIN PGP SIGNATURE- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl72WbcACgkQHPApP6U8 pFgzxQ//ZyTsETf5CjZ9S2CQ65GbSVY+FdhWB1Tuy6qrdmZgkII48PQWsu7SeFJL yCH0LM9DdMEmjBx9uoHWmFtOSxgPgAPGzqQYRsDcB2zwGpkyN/kHwFDVxRyBSy7Q NmRbE6K0orMalD86XjvFQlv/ClyOe4rNSbqywT8nw0zJFwiM2HVLJXV1CgvEor1k Z7uVd6f10mm/F4jxQxW2nQ0rvyiMaEEOKtnZG/nGL9kb5iLz/10LlFot1Wzg49Hf tbAbnH6k34u0OXkteYhbVNklhlGGMDKmbYCPUV+LJGZLl+pRb+Y6U1UDM22W+GCZ HnFYMPExDPj9QSd4C3sBWx8X7oT9fyf56puK0BqP3SQhAbKUp752f7y7bdLxoQq7 aQgZm3kvNH3Vk7tkSLtnroLGuZ7yelbZXtMqvLCgoX98JaoxqejUuSB7uL9zFZ/n Cu19NPxgRMSIyvrwredHhm2lDl0IBDeac/MeMwVplwb1VqLEZvrTdqwhg+Xe7NXo 2TilY/pLZhwnA/clyxwOo1wT+w/11s1tCMzZObSU5bVH1vbJH8Y6qVxot644Z303 QE5lPJprS6t/zIN3WVi6oSTcAo64fTdjIvlIUZ5oKakmclRvF0I2sWDt7d5m5CEI sdt7HBbH/gAZ1h96096Qp5PmyABFnaF1OmAkorKG94mAkQvQSO4= =l8h0 -END PGP SIGNATURE- - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 63493] enhancement - add JMX counters to monitor authentication and authorization
https://bz.apache.org/bugzilla/show_bug.cgi?id=63493 Eugène Adell changed: What|Removed |Added Attachment #36619|0 |1 is obsolete|| --- Comment #4 from Eugène Adell --- Created attachment 37334 --> https://bz.apache.org/bugzilla/attachment.cgi?id=37334=edit adds authentications counters at the Realm level, version 2 Convert int to AtomicInteger for my 2 counters, update descriptors to use 9.0.36 instead of 9.0.20 which was different -- 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 63493] enhancement - add JMX counters to monitor authentication and authorization
https://bz.apache.org/bugzilla/show_bug.cgi?id=63493 --- Comment #5 from Eugène Adell --- Thanks for looking Chris, GlobalRequestProcessor : The counters are no different from those already existing, and authentication denials could not logically go higher than errorCount which is an int (on version 9.0 at least) I can change this, but this would not be consistent. Realm : The counters are of the same magnitude than requestCount which is also a vanilla int. As requested, I am switching to the Atomic version as I see in the LockOutRealm some use of Atomics, this makes more sense here. I'm posting a new patch for it, for version 9.0.36 as the descriptors file is a bit different than 1 year ago. -- 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: Changing the name of the default branch in our git repos
On Fri, Jun 26, 2020 at 4:48 PM Mark Thomas wrote: > Hi, > > Picking up this thread again I see a range of views. "main" seems to be > the most popular although several folks suggested "10.0.x" and "use > whatever GitHub use". There was also interest in "trunk". Particularly > with the additional suggestion of "10.0.x" appearing in the middle of > the discussion, I'm not sure where consensus lies at the moment. > I was used to trunk :) Rémy > > One suggestion I particularly liked was to do the rename at the point we > branch 10.0.x and start on 10.1.x since we will need to be updating CI > and various things anyway. That is currently looking like September as > that is the target date for the Jakarta EE 9 release. > > I suspect that this could get tricky as I'd prefer "main" or "10.0.x", > could work with "trunk" but really don't want to continue with "master". > I imagine others have similar views in different combinations. Maybe if > others express their views in a similar way to the above we'll end up > with a natural consensus. If not, we'll have to figure something out. > > Mark > > > > On 19/06/2020 16:32, Emmanuel Bourg wrote: > > Le 16/06/2020 à 10:02, Mark Thomas a écrit : > > > >> Thoughts? > > > > I'd prefer the status-quo and keep "master", I've always understood this > > as the 'master record' (I know it might be historically wrong) and I > > haven't seen evidences it has ever offended or deterred anyone from > > contributing. > > > > If there is a consensus to change I suggest waiting to see what GitHub > > plans to do. The "master" name is a de-facto standard for Git > > repositories, and I think we should remain consistent with the new name > > that will be popularized by GitHub. > > > > That said, I have a preference for "main". > > > > Emmanuel Bourg > > > > - > > 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 > >
[GitHub] [tomcat] ChristopherSchultz commented on a change in pull request #309: Allow recursive substitution of properties.
ChristopherSchultz commented on a change in pull request #309: URL: https://github.com/apache/tomcat/pull/309#discussion_r446392364 ## File path: java/org/apache/tomcat/util/IntrospectionUtils.java ## @@ -332,7 +341,15 @@ public static String replaceProperties(String value, } if (prev < value.length()) sb.append(value.substring(prev)); -return sb.toString(); +String newval = sb.toString(); +if (newval.indexOf('$') < 0) { +return newval; +} +if (newval.equals(value)) +return value; +if (log.isDebugEnabled()) +log.debug("IntrospectionUtils.replaceProperties iter on: " + newval); +return replaceProperties(newval, staticProp, dynamicProp, classLoader, iterationCount+1); Review comment: Does this need to be recursive? Can we not simply have a loop of replacements? ## File path: java/org/apache/tomcat/util/IntrospectionUtils.java ## @@ -285,10 +285,19 @@ public static Object getProperty(Object o, String name) { public static String replaceProperties(String value, Hashtable staticProp, PropertySource dynamicProp[], ClassLoader classLoader) { +return replaceProperties(value, staticProp, dynamicProp, classLoader, 0); +} +private static String replaceProperties(String value, +Hashtable staticProp, PropertySource dynamicProp[], +ClassLoader classLoader, int iterationCount) { if (value.indexOf('$') < 0) { Review comment: We should be looking for `${` and not `$`. Class names often contain `$` because of nested classes, and class names are often used in system properties. Plus, if we are looking for `${` we should look for `${`. I realize that this is existing code, but we may as well improve it while we're in here. ## File path: java/org/apache/tomcat/util/IntrospectionUtils.java ## @@ -332,7 +341,15 @@ public static String replaceProperties(String value, } if (prev < value.length()) sb.append(value.substring(prev)); -return sb.toString(); +String newval = sb.toString(); +if (newval.indexOf('$') < 0) { Review comment: Same, here: look for `${`, not `$`. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GitHub] [tomcat] jfclere commented on pull request #309: Allow recursive substitution of properties.
jfclere commented on pull request #309: URL: https://github.com/apache/tomcat/pull/309#issuecomment-650262993 @FSchumacher something like that? This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GitHub] [tomcat] rotty3000 commented on pull request #307: github actions
rotty3000 commented on pull request #307: URL: https://github.com/apache/tomcat/pull/307#issuecomment-650271782 Is anyone up for merging this? If something is missing please let me know :) I wasn't sure if this warranted a changelog. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GitHub] [tomcat] rotty3000 commented on pull request #307: github actions
rotty3000 commented on pull request #307: URL: https://github.com/apache/tomcat/pull/307#issuecomment-650272578 Also note that since this is handling push/pr on _master_ (to be renamed branch) there is no point applying this to other branches. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] 03/03: Use method local counter for recurstion
This is an automated email from the ASF dual-hosted git repository. fschumacher pushed a commit to branch pr309-recursion in repository https://gitbox.apache.org/repos/asf/tomcat.git commit 7f1b56e587693bb8f7755c972fbac493101c53c8 Author: Felix Schumacher AuthorDate: Fri Jun 26 16:58:25 2020 +0200 Use method local counter for recurstion --- java/org/apache/tomcat/util/IntrospectionUtils.java | 19 +++ .../apache/tomcat/util/TestIntrospectionUtils.java| 7 +++ 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/java/org/apache/tomcat/util/IntrospectionUtils.java b/java/org/apache/tomcat/util/IntrospectionUtils.java index 17fd47e..08e0cbd 100644 --- a/java/org/apache/tomcat/util/IntrospectionUtils.java +++ b/java/org/apache/tomcat/util/IntrospectionUtils.java @@ -34,7 +34,7 @@ public final class IntrospectionUtils { private static final Log log = LogFactory.getLog(IntrospectionUtils.class); private static final StringManager sm = StringManager.getManager(IntrospectionUtils.class); -private static int iterationCount = 0; +private static final int MAX_RECURSION = 20; /** * Find a method with the right name If found, call the method ( if param is @@ -286,7 +286,16 @@ public final class IntrospectionUtils { public static String replaceProperties(String value, Hashtable staticProp, PropertySource dynamicProp[], ClassLoader classLoader) { +return replaceProperties(value, staticProp, dynamicProp, classLoader, 0); +} +private static String replaceProperties(String value, +Hashtable staticProp, PropertySource dynamicProp[], +ClassLoader classLoader, int iterationCount) { +if (iterationCount >= MAX_RECURSION) { +log.warn("System property failed to update and remains [" + value + "]"); +return value; +} if (value.indexOf('$') < 0) { return value; } @@ -341,13 +350,7 @@ public final class IntrospectionUtils { return value; if (log.isDebugEnabled()) log.debug("IntrospectionUtils.replaceProperties iter on: " + newval); -iterationCount++; -if (iterationCount <20) -newval = replaceProperties(newval, staticProp, dynamicProp, classLoader); -else -log.warn("System property failed to update and remains [" + newval + "]"); -iterationCount--; -return newval; +return replaceProperties(newval, staticProp, dynamicProp, classLoader, iterationCount + 1); } private static String getProperty(String name, Hashtable staticProp, diff --git a/test/org/apache/tomcat/util/TestIntrospectionUtils.java b/test/org/apache/tomcat/util/TestIntrospectionUtils.java index ed9fe39..981db4b 100644 --- a/test/org/apache/tomcat/util/TestIntrospectionUtils.java +++ b/test/org/apache/tomcat/util/TestIntrospectionUtils.java @@ -112,6 +112,13 @@ public class TestIntrospectionUtils { StandardContext.class, "com.example.Other")); } +@Test +public void testReplacePropertiesRecursive() { +Properties properties = new Properties(); +properties.put("replaceMe", "x${replaceMe}"); +Assert.assertEquals("${replaceMe}", +IntrospectionUtils.replaceProperties("${replaceMe}", properties, null, null)); +} @Test public void testReplaceProperties() { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] 01/03: Allow recursive substitution of properties.
This is an automated email from the ASF dual-hosted git repository. fschumacher pushed a commit to branch pr309-recursion in repository https://gitbox.apache.org/repos/asf/tomcat.git commit 4f1ae64882486eeb0b60f9daf13daeca5df6b7c9 Author: Jean-Frederic Clere AuthorDate: Fri Jun 26 09:50:09 2020 +0200 Allow recursive substitution of properties. --- java/org/apache/tomcat/util/IntrospectionUtils.java | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/java/org/apache/tomcat/util/IntrospectionUtils.java b/java/org/apache/tomcat/util/IntrospectionUtils.java index 78ab66f..977d33a 100644 --- a/java/org/apache/tomcat/util/IntrospectionUtils.java +++ b/java/org/apache/tomcat/util/IntrospectionUtils.java @@ -332,7 +332,15 @@ public final class IntrospectionUtils { } if (prev < value.length()) sb.append(value.substring(prev)); -return sb.toString(); +String newval = sb.toString(); +if (newval.indexOf('$') < 0) { +return newval; +} +if (newval.equals(value)) +return value; +if (log.isDebugEnabled()) +log.debug("IntrospectionUtils.replaceProperties iter on: " + newval); +return replaceProperties(newval, staticProp, dynamicProp, classLoader); } private static String getProperty(String name, Hashtable staticProp, - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch pr309-recursion created (now 7f1b56e)
This is an automated email from the ASF dual-hosted git repository. fschumacher pushed a change to branch pr309-recursion in repository https://gitbox.apache.org/repos/asf/tomcat.git. at 7f1b56e Use method local counter for recurstion This branch includes the following new commits: new 4f1ae64 Allow recursive substitution of properties. new 57e83d7 Add a iterationCount limited to 20 to prevent StackOverflowError. new 7f1b56e Use method local counter for recurstion The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] 02/03: Add a iterationCount limited to 20 to prevent StackOverflowError.
This is an automated email from the ASF dual-hosted git repository. fschumacher pushed a commit to branch pr309-recursion in repository https://gitbox.apache.org/repos/asf/tomcat.git commit 57e83d7c9eaa784d3af54fa57de100c99515f1bc Author: Jean-Frederic Clere AuthorDate: Fri Jun 26 15:18:30 2020 +0200 Add a iterationCount limited to 20 to prevent StackOverflowError. --- java/org/apache/tomcat/util/IntrospectionUtils.java | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/java/org/apache/tomcat/util/IntrospectionUtils.java b/java/org/apache/tomcat/util/IntrospectionUtils.java index 977d33a..17fd47e 100644 --- a/java/org/apache/tomcat/util/IntrospectionUtils.java +++ b/java/org/apache/tomcat/util/IntrospectionUtils.java @@ -34,6 +34,7 @@ public final class IntrospectionUtils { private static final Log log = LogFactory.getLog(IntrospectionUtils.class); private static final StringManager sm = StringManager.getManager(IntrospectionUtils.class); +private static int iterationCount = 0; /** * Find a method with the right name If found, call the method ( if param is @@ -340,7 +341,13 @@ public final class IntrospectionUtils { return value; if (log.isDebugEnabled()) log.debug("IntrospectionUtils.replaceProperties iter on: " + newval); -return replaceProperties(newval, staticProp, dynamicProp, classLoader); +iterationCount++; +if (iterationCount <20) +newval = replaceProperties(newval, staticProp, dynamicProp, classLoader); +else +log.warn("System property failed to update and remains [" + newval + "]"); +iterationCount--; +return newval; } private static String getProperty(String name, Hashtable staticProp, - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [tomcat] branch pr309-recursion deleted (was 7f1b56e)
Sorry for the noise. I wanted to work on the github branch pr/309 and accidently added a new branch. Felix Am 26.06.20 um 17:02 schrieb fschumac...@apache.org: > This is an automated email from the ASF dual-hosted git repository. > > fschumacher pushed a change to branch pr309-recursion > in repository https://gitbox.apache.org/repos/asf/tomcat.git. > > > was 7f1b56e Use method local counter for recurstion > > This change permanently discards the following revisions: > > discard 7f1b56e Use method local counter for recurstion > discard 57e83d7 Add a iterationCount limited to 20 to prevent > StackOverflowError. > discard 4f1ae64 Allow recursive substitution of properties. > > > - > 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] 01/02: SocketWrapper.upgraded is no longer used
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git commit 354d6342603358076d0a256c67de98d9bc2dd475 Author: Mark Thomas AuthorDate: Fri Jun 26 15:31:00 2020 +0100 SocketWrapper.upgraded is no longer used It used to be used to determine if the processor should be recycled. It has been replaced by a flag on the processor. --- java/org/apache/coyote/AbstractProtocol.java | 2 -- java/org/apache/tomcat/util/net/SocketWrapperBase.java | 12 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/java/org/apache/coyote/AbstractProtocol.java b/java/org/apache/coyote/AbstractProtocol.java index 577ebbf..bbb897a 100644 --- a/java/org/apache/coyote/AbstractProtocol.java +++ b/java/org/apache/coyote/AbstractProtocol.java @@ -853,8 +853,6 @@ public abstract class AbstractProtocol implements ProtocolHandler, processor, wrapper)); } wrapper.unRead(leftOverInput); -// Mark the connection as upgraded -wrapper.setUpgraded(true); // Associate with the processor with the connection connections.put(socket, processor); // Initialise the upgrade handler (which may trigger diff --git a/java/org/apache/tomcat/util/net/SocketWrapperBase.java b/java/org/apache/tomcat/util/net/SocketWrapperBase.java index c14471b..121293e 100644 --- a/java/org/apache/tomcat/util/net/SocketWrapperBase.java +++ b/java/org/apache/tomcat/util/net/SocketWrapperBase.java @@ -151,7 +151,19 @@ public abstract class SocketWrapperBase { } } +/** + * @return {@code true} if the connection has been upgraded. + * + * @deprecated Unused. Will be removed in Tomcat 10. + */ +@Deprecated public boolean isUpgraded() { return upgraded; } +/** + * @param upgraded {@code true} if the connection has been upgraded. + * + * @deprecated Unused. Will be removed in Tomcat 10. + */ +@Deprecated public void setUpgraded(boolean upgraded) { this.upgraded = upgraded; } public boolean isSecure() { return secure; } public void setSecure(boolean secure) { this.secure = secure; } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] 02/02: socketWrapper.secure is no longer used
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git commit 4e63245d64e2bbe976c026115b49923b972831b1 Author: Mark Thomas AuthorDate: Fri Jun 26 16:12:34 2020 +0100 socketWrapper.secure is no longer used It is used in 7.0.x to trigger additional debug logging. --- java/org/apache/tomcat/util/net/AprEndpoint.java | 1 - java/org/apache/tomcat/util/net/Nio2Endpoint.java | 1 - java/org/apache/tomcat/util/net/NioEndpoint.java | 1 - java/org/apache/tomcat/util/net/SocketWrapperBase.java | 12 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/java/org/apache/tomcat/util/net/AprEndpoint.java b/java/org/apache/tomcat/util/net/AprEndpoint.java index 9849417..8717d30 100644 --- a/java/org/apache/tomcat/util/net/AprEndpoint.java +++ b/java/org/apache/tomcat/util/net/AprEndpoint.java @@ -709,7 +709,6 @@ public class AprEndpoint extends AbstractEndpoint implements SNICallBack { } AprSocketWrapper wrapper = new AprSocketWrapper(Long.valueOf(socket), this); wrapper.setKeepAliveLeft(getMaxKeepAliveRequests()); -wrapper.setSecure(isSSLEnabled()); wrapper.setReadTimeout(getConnectionTimeout()); wrapper.setWriteTimeout(getConnectionTimeout()); connections.put(Long.valueOf(socket), wrapper); diff --git a/java/org/apache/tomcat/util/net/Nio2Endpoint.java b/java/org/apache/tomcat/util/net/Nio2Endpoint.java index 9719b1d..b28941c 100644 --- a/java/org/apache/tomcat/util/net/Nio2Endpoint.java +++ b/java/org/apache/tomcat/util/net/Nio2Endpoint.java @@ -321,7 +321,6 @@ public class Nio2Endpoint extends AbstractJsseEndpoint { socketWrapper.setReadTimeout(getSocketProperties().getSoTimeout()); socketWrapper.setWriteTimeout(getSocketProperties().getSoTimeout()); socketWrapper.setKeepAliveLeft(Nio2Endpoint.this.getMaxKeepAliveRequests()); -socketWrapper.setSecure(isSSLEnabled()); socketWrapper.setReadTimeout(getConnectionTimeout()); socketWrapper.setWriteTimeout(getConnectionTimeout()); // Continue processing on another thread diff --git a/java/org/apache/tomcat/util/net/NioEndpoint.java b/java/org/apache/tomcat/util/net/NioEndpoint.java index a50b721..a70faef 100644 --- a/java/org/apache/tomcat/util/net/NioEndpoint.java +++ b/java/org/apache/tomcat/util/net/NioEndpoint.java @@ -742,7 +742,6 @@ public class NioEndpoint extends AbstractJsseEndpoint { ka.setReadTimeout(getSocketProperties().getSoTimeout()); ka.setWriteTimeout(getSocketProperties().getSoTimeout()); ka.setKeepAliveLeft(NioEndpoint.this.getMaxKeepAliveRequests()); -ka.setSecure(isSSLEnabled()); ka.setReadTimeout(getConnectionTimeout()); ka.setWriteTimeout(getConnectionTimeout()); PollerEvent r = eventCache.pop(); diff --git a/java/org/apache/tomcat/util/net/SocketWrapperBase.java b/java/org/apache/tomcat/util/net/SocketWrapperBase.java index 121293e..d044a47 100644 --- a/java/org/apache/tomcat/util/net/SocketWrapperBase.java +++ b/java/org/apache/tomcat/util/net/SocketWrapperBase.java @@ -165,7 +165,19 @@ public abstract class SocketWrapperBase { */ @Deprecated public void setUpgraded(boolean upgraded) { this.upgraded = upgraded; } +/** + * @return {@code true} if the connection uses TLS + * + * @deprecated Unused. Will be removed in Tomcat 10. + */ +@Deprecated public boolean isSecure() { return secure; } +/** + * @param secure {@code true} if the connection uses TLS + * + * @deprecated Unused. Will be removed in Tomcat 10. + */ +@Deprecated public void setSecure(boolean secure) { this.secure = secure; } public String getNegotiatedProtocol() { return negotiatedProtocol; } public void setNegotiatedProtocol(String negotiatedProtocol) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 8.5.x updated (923d834 -> 4e63245)
This is an automated email from the ASF dual-hosted git repository. markt pushed a change to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git. from 923d834 Ensure HTTP/1.1 processor is recycled after a direct h2c connection new 354d634 SocketWrapper.upgraded is no longer used new 4e63245 socketWrapper.secure is no longer used The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: java/org/apache/coyote/AbstractProtocol.java | 2 -- java/org/apache/tomcat/util/net/AprEndpoint.java | 1 - java/org/apache/tomcat/util/net/Nio2Endpoint.java | 1 - java/org/apache/tomcat/util/net/NioEndpoint.java | 1 - .../apache/tomcat/util/net/SocketWrapperBase.java | 24 ++ 5 files changed, 24 insertions(+), 5 deletions(-) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Changing the name of the default branch in our git repos
Hi, Picking up this thread again I see a range of views. "main" seems to be the most popular although several folks suggested "10.0.x" and "use whatever GitHub use". There was also interest in "trunk". Particularly with the additional suggestion of "10.0.x" appearing in the middle of the discussion, I'm not sure where consensus lies at the moment. One suggestion I particularly liked was to do the rename at the point we branch 10.0.x and start on 10.1.x since we will need to be updating CI and various things anyway. That is currently looking like September as that is the target date for the Jakarta EE 9 release. I suspect that this could get tricky as I'd prefer "main" or "10.0.x", could work with "trunk" but really don't want to continue with "master". I imagine others have similar views in different combinations. Maybe if others express their views in a similar way to the above we'll end up with a natural consensus. If not, we'll have to figure something out. Mark On 19/06/2020 16:32, Emmanuel Bourg wrote: > Le 16/06/2020 à 10:02, Mark Thomas a écrit : > >> Thoughts? > > I'd prefer the status-quo and keep "master", I've always understood this > as the 'master record' (I know it might be historically wrong) and I > haven't seen evidences it has ever offended or deterred anyone from > contributing. > > If there is a consensus to change I suggest waiting to see what GitHub > plans to do. The "master" name is a de-facto standard for Git > repositories, and I think we should remain consistent with the new name > that will be popularized by GitHub. > > That said, I have a preference for "main". > > Emmanuel Bourg > > - > 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] reference refs/remotes/origin/pr/309 created (now 4fc54d5)
This is an automated email from the ASF dual-hosted git repository. fschumacher pushed a change to reference refs/remotes/origin/pr/309 in repository https://gitbox.apache.org/repos/asf/tomcat.git. at 4fc54d5 Add a iterationCount limited to 20 to prevent StackOverflowError. No new revisions were added by this update. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch pr309-recursion deleted (was 7f1b56e)
This is an automated email from the ASF dual-hosted git repository. fschumacher pushed a change to branch pr309-recursion in repository https://gitbox.apache.org/repos/asf/tomcat.git. was 7f1b56e Use method local counter for recurstion This change permanently discards the following revisions: discard 7f1b56e Use method local counter for recurstion discard 57e83d7 Add a iterationCount limited to 20 to prevent StackOverflowError. discard 4f1ae64 Allow recursive substitution of properties. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch master updated: SocketWrapper.upgraded is no longer used
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/master by this push: new 9eb4c28 SocketWrapper.upgraded is no longer used 9eb4c28 is described below commit 9eb4c2873f0ef458ffe4d4002048fc902f558e8c Author: Mark Thomas AuthorDate: Fri Jun 26 15:31:00 2020 +0100 SocketWrapper.upgraded is no longer used It used to be used to determine if the processor should be recycled. It has been replaced by a flag on the processor. --- java/org/apache/coyote/AbstractProtocol.java | 2 -- java/org/apache/tomcat/util/net/SocketWrapperBase.java | 12 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/java/org/apache/coyote/AbstractProtocol.java b/java/org/apache/coyote/AbstractProtocol.java index abea68e..248a26b 100644 --- a/java/org/apache/coyote/AbstractProtocol.java +++ b/java/org/apache/coyote/AbstractProtocol.java @@ -880,8 +880,6 @@ public abstract class AbstractProtocol implements ProtocolHandler, processor, wrapper)); } wrapper.unRead(leftOverInput); -// Mark the connection as upgraded -wrapper.setUpgraded(true); // Associate with the processor with the connection wrapper.setCurrentProcessor(processor); // Initialise the upgrade handler (which may trigger diff --git a/java/org/apache/tomcat/util/net/SocketWrapperBase.java b/java/org/apache/tomcat/util/net/SocketWrapperBase.java index a5c69c2..df61d53 100644 --- a/java/org/apache/tomcat/util/net/SocketWrapperBase.java +++ b/java/org/apache/tomcat/util/net/SocketWrapperBase.java @@ -171,7 +171,19 @@ public abstract class SocketWrapperBase { } } +/** + * @return {@code true} if the connection has been upgraded. + * + * @deprecated Unused. Will be removed in Tomcat 10. + */ +@Deprecated public boolean isUpgraded() { return upgraded; } +/** + * @param upgraded {@code true} if the connection has been upgraded. + * + * @deprecated Unused. Will be removed in Tomcat 10. + */ +@Deprecated public void setUpgraded(boolean upgraded) { this.upgraded = upgraded; } public boolean isSecure() { return secure; } public void setSecure(boolean secure) { this.secure = secure; } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GitHub] [tomcat] FSchumacher commented on pull request #309: Allow recursive substitution of properties.
FSchumacher commented on pull request #309: URL: https://github.com/apache/tomcat/pull/309#issuecomment-650230095 I tried to push to this PR branch directly, but I think I messed it up :( The current change is not thread safe. I would go with a method parameter and a wrapper to count the iterations. ``` public String method(String param) { return "something"; } ``` to ``` public String method(String param) { return method(param, 0); } private String method(String param, int depth) { if (depth > 5) { return param; } return method(param, depth+1); } ``` This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] 01/02: SocketWrapper.upgraded is no longer used
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git commit 59a037152a3e41a81ddcb89e9e51e3624aeb9b66 Author: Mark Thomas AuthorDate: Fri Jun 26 15:31:00 2020 +0100 SocketWrapper.upgraded is no longer used It used to be used to determine if the processor should be recycled. It has been replaced by a flag on the processor. --- java/org/apache/coyote/AbstractProtocol.java | 2 -- java/org/apache/tomcat/util/net/SocketWrapperBase.java | 12 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/java/org/apache/coyote/AbstractProtocol.java b/java/org/apache/coyote/AbstractProtocol.java index 5bc2212..a47c732 100644 --- a/java/org/apache/coyote/AbstractProtocol.java +++ b/java/org/apache/coyote/AbstractProtocol.java @@ -903,8 +903,6 @@ public abstract class AbstractProtocol implements ProtocolHandler, processor, wrapper)); } wrapper.unRead(leftOverInput); -// Mark the connection as upgraded -wrapper.setUpgraded(true); // Associate with the processor with the connection wrapper.setCurrentProcessor(processor); // Initialise the upgrade handler (which may trigger diff --git a/java/org/apache/tomcat/util/net/SocketWrapperBase.java b/java/org/apache/tomcat/util/net/SocketWrapperBase.java index 1e3ffb1..88bb7ba 100644 --- a/java/org/apache/tomcat/util/net/SocketWrapperBase.java +++ b/java/org/apache/tomcat/util/net/SocketWrapperBase.java @@ -171,7 +171,19 @@ public abstract class SocketWrapperBase { } } +/** + * @return {@code true} if the connection has been upgraded. + * + * @deprecated Unused. Will be removed in Tomcat 10. + */ +@Deprecated public boolean isUpgraded() { return upgraded; } +/** + * @param upgraded {@code true} if the connection has been upgraded. + * + * @deprecated Unused. Will be removed in Tomcat 10. + */ +@Deprecated public void setUpgraded(boolean upgraded) { this.upgraded = upgraded; } public boolean isSecure() { return secure; } public void setSecure(boolean secure) { this.secure = secure; } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch master updated (9eb4c28 -> 7977440)
This is an automated email from the ASF dual-hosted git repository. markt pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/tomcat.git. from 9eb4c28 SocketWrapper.upgraded is no longer used new 977d440 socketWrapper.secure is no longer used new 7977440 Remove unused code The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: java/org/apache/tomcat/util/net/AprEndpoint.java | 1 - java/org/apache/tomcat/util/net/Nio2Endpoint.java | 1 - java/org/apache/tomcat/util/net/NioEndpoint.java | 1 - java/org/apache/tomcat/util/net/SocketWrapperBase.java | 18 -- 4 files changed, 21 deletions(-) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] 01/02: socketWrapper.secure is no longer used
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomcat.git commit 977d440678168f15388f4ae510d997267e98eb4c Author: Mark Thomas AuthorDate: Fri Jun 26 16:12:34 2020 +0100 socketWrapper.secure is no longer used It is used in 7.0.x to trigger additional debug logging. --- java/org/apache/tomcat/util/net/AprEndpoint.java | 1 - java/org/apache/tomcat/util/net/Nio2Endpoint.java | 1 - java/org/apache/tomcat/util/net/NioEndpoint.java | 1 - java/org/apache/tomcat/util/net/SocketWrapperBase.java | 12 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/java/org/apache/tomcat/util/net/AprEndpoint.java b/java/org/apache/tomcat/util/net/AprEndpoint.java index ec9deee..3996087 100644 --- a/java/org/apache/tomcat/util/net/AprEndpoint.java +++ b/java/org/apache/tomcat/util/net/AprEndpoint.java @@ -680,7 +680,6 @@ public class AprEndpoint extends AbstractEndpoint implements SNICallB AprSocketWrapper wrapper = new AprSocketWrapper(socket, this); connections.put(socket, wrapper); wrapper.setKeepAliveLeft(getMaxKeepAliveRequests()); -wrapper.setSecure(isSSLEnabled()); wrapper.setReadTimeout(getConnectionTimeout()); wrapper.setWriteTimeout(getConnectionTimeout()); getExecutor().execute(new SocketWithOptionsProcessor(wrapper)); diff --git a/java/org/apache/tomcat/util/net/Nio2Endpoint.java b/java/org/apache/tomcat/util/net/Nio2Endpoint.java index e54a90e..2e3a5af 100644 --- a/java/org/apache/tomcat/util/net/Nio2Endpoint.java +++ b/java/org/apache/tomcat/util/net/Nio2Endpoint.java @@ -319,7 +319,6 @@ public class Nio2Endpoint extends AbstractJsseEndpoint socketWrapper.setReadTimeout(getConnectionTimeout()); socketWrapper.setWriteTimeout(getConnectionTimeout()); socketWrapper.setKeepAliveLeft(NioEndpoint.this.getMaxKeepAliveRequests()); -socketWrapper.setSecure(isSSLEnabled()); poller.register(channel, socketWrapper); return true; } catch (Throwable t) { diff --git a/java/org/apache/tomcat/util/net/SocketWrapperBase.java b/java/org/apache/tomcat/util/net/SocketWrapperBase.java index df61d53..0e5fb85 100644 --- a/java/org/apache/tomcat/util/net/SocketWrapperBase.java +++ b/java/org/apache/tomcat/util/net/SocketWrapperBase.java @@ -185,7 +185,19 @@ public abstract class SocketWrapperBase { */ @Deprecated public void setUpgraded(boolean upgraded) { this.upgraded = upgraded; } +/** + * @return {@code true} if the connection uses TLS + * + * @deprecated Unused. Will be removed in Tomcat 10. + */ +@Deprecated public boolean isSecure() { return secure; } +/** + * @param secure {@code true} if the connection uses TLS + * + * @deprecated Unused. Will be removed in Tomcat 10. + */ +@Deprecated public void setSecure(boolean secure) { this.secure = secure; } public String getNegotiatedProtocol() { return negotiatedProtocol; } public void setNegotiatedProtocol(String negotiatedProtocol) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] 02/02: socketWrapper.secure is no longer used
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git commit b1ef294ccb62b8fd108ed117b654bf2f6c51f9a1 Author: Mark Thomas AuthorDate: Fri Jun 26 16:12:34 2020 +0100 socketWrapper.secure is no longer used It is used in 7.0.x to trigger additional debug logging. --- java/org/apache/tomcat/util/net/AprEndpoint.java | 1 - java/org/apache/tomcat/util/net/Nio2Endpoint.java | 1 - java/org/apache/tomcat/util/net/NioEndpoint.java | 1 - java/org/apache/tomcat/util/net/SocketWrapperBase.java | 12 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/java/org/apache/tomcat/util/net/AprEndpoint.java b/java/org/apache/tomcat/util/net/AprEndpoint.java index ec9deee..3996087 100644 --- a/java/org/apache/tomcat/util/net/AprEndpoint.java +++ b/java/org/apache/tomcat/util/net/AprEndpoint.java @@ -680,7 +680,6 @@ public class AprEndpoint extends AbstractEndpoint implements SNICallB AprSocketWrapper wrapper = new AprSocketWrapper(socket, this); connections.put(socket, wrapper); wrapper.setKeepAliveLeft(getMaxKeepAliveRequests()); -wrapper.setSecure(isSSLEnabled()); wrapper.setReadTimeout(getConnectionTimeout()); wrapper.setWriteTimeout(getConnectionTimeout()); getExecutor().execute(new SocketWithOptionsProcessor(wrapper)); diff --git a/java/org/apache/tomcat/util/net/Nio2Endpoint.java b/java/org/apache/tomcat/util/net/Nio2Endpoint.java index e22d52e..76e6b5c 100644 --- a/java/org/apache/tomcat/util/net/Nio2Endpoint.java +++ b/java/org/apache/tomcat/util/net/Nio2Endpoint.java @@ -331,7 +331,6 @@ public class Nio2Endpoint extends AbstractJsseEndpoint socketWrapper.setReadTimeout(getConnectionTimeout()); socketWrapper.setWriteTimeout(getConnectionTimeout()); socketWrapper.setKeepAliveLeft(NioEndpoint.this.getMaxKeepAliveRequests()); -socketWrapper.setSecure(isSSLEnabled()); poller.register(channel, socketWrapper); return true; } catch (Throwable t) { diff --git a/java/org/apache/tomcat/util/net/SocketWrapperBase.java b/java/org/apache/tomcat/util/net/SocketWrapperBase.java index 88bb7ba..6490521 100644 --- a/java/org/apache/tomcat/util/net/SocketWrapperBase.java +++ b/java/org/apache/tomcat/util/net/SocketWrapperBase.java @@ -185,7 +185,19 @@ public abstract class SocketWrapperBase { */ @Deprecated public void setUpgraded(boolean upgraded) { this.upgraded = upgraded; } +/** + * @return {@code true} if the connection uses TLS + * + * @deprecated Unused. Will be removed in Tomcat 10. + */ +@Deprecated public boolean isSecure() { return secure; } +/** + * @param secure {@code true} if the connection uses TLS + * + * @deprecated Unused. Will be removed in Tomcat 10. + */ +@Deprecated public void setSecure(boolean secure) { this.secure = secure; } public String getNegotiatedProtocol() { return negotiatedProtocol; } public void setNegotiatedProtocol(String negotiatedProtocol) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] 02/02: Remove unused code
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomcat.git commit 7977440111f96ccbfea039b913fd1744ea5867cb Author: Mark Thomas AuthorDate: Fri Jun 26 16:16:26 2020 +0100 Remove unused code --- .../apache/tomcat/util/net/SocketWrapperBase.java | 30 -- 1 file changed, 30 deletions(-) diff --git a/java/org/apache/tomcat/util/net/SocketWrapperBase.java b/java/org/apache/tomcat/util/net/SocketWrapperBase.java index 0e5fb85..ad7d1e3 100644 --- a/java/org/apache/tomcat/util/net/SocketWrapperBase.java +++ b/java/org/apache/tomcat/util/net/SocketWrapperBase.java @@ -52,8 +52,6 @@ public abstract class SocketWrapperBase { private volatile long writeTimeout = -1; private volatile int keepAliveLeft = 100; -private volatile boolean upgraded = false; -private boolean secure = false; private String negotiatedProtocol = null; /* @@ -171,34 +169,6 @@ public abstract class SocketWrapperBase { } } -/** - * @return {@code true} if the connection has been upgraded. - * - * @deprecated Unused. Will be removed in Tomcat 10. - */ -@Deprecated -public boolean isUpgraded() { return upgraded; } -/** - * @param upgraded {@code true} if the connection has been upgraded. - * - * @deprecated Unused. Will be removed in Tomcat 10. - */ -@Deprecated -public void setUpgraded(boolean upgraded) { this.upgraded = upgraded; } -/** - * @return {@code true} if the connection uses TLS - * - * @deprecated Unused. Will be removed in Tomcat 10. - */ -@Deprecated -public boolean isSecure() { return secure; } -/** - * @param secure {@code true} if the connection uses TLS - * - * @deprecated Unused. Will be removed in Tomcat 10. - */ -@Deprecated -public void setSecure(boolean secure) { this.secure = secure; } public String getNegotiatedProtocol() { return negotiatedProtocol; } public void setNegotiatedProtocol(String negotiatedProtocol) { this.negotiatedProtocol = negotiatedProtocol; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 9.0.x updated (172977f -> b1ef294)
This is an automated email from the ASF dual-hosted git repository. markt pushed a change to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git. from 172977f Ensure HTTP/1.1 processor is recycled after a direct h2c connection new 59a0371 SocketWrapper.upgraded is no longer used new b1ef294 socketWrapper.secure is no longer used The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: java/org/apache/coyote/AbstractProtocol.java | 2 -- java/org/apache/tomcat/util/net/AprEndpoint.java | 1 - java/org/apache/tomcat/util/net/Nio2Endpoint.java | 1 - java/org/apache/tomcat/util/net/NioEndpoint.java | 1 - .../apache/tomcat/util/net/SocketWrapperBase.java | 24 ++ 5 files changed, 24 insertions(+), 5 deletions(-) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org