[GitHub] [tomcat] markt-asf commented on issue #157: https://bz.apache.org/bugzilla/show_bug.cgi?id=63333
markt-asf commented on issue #157: https://bz.apache.org/bugzilla/show_bug.cgi?id=6 URL: https://github.com/apache/tomcat/pull/157#issuecomment-487770720 Just a note to say this next on my list to look at - hopefully tomorrow. 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 With regards, Apache Git Services - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1858405 - in /tomcat/site/trunk: docs/.htaccess xdocs/.htaccess
Author: markt Date: Mon Apr 29 21:57:55 2019 New Revision: 1858405 URL: http://svn.apache.org/viewvc?rev=1858405=rev Log: Finally... Modified: tomcat/site/trunk/docs/.htaccess tomcat/site/trunk/xdocs/.htaccess Modified: tomcat/site/trunk/docs/.htaccess URL: http://svn.apache.org/viewvc/tomcat/site/trunk/docs/.htaccess?rev=1858405=1858404=1858405=diff == --- tomcat/site/trunk/docs/.htaccess (original) +++ tomcat/site/trunk/docs/.htaccess Mon Apr 29 21:57:55 2019 @@ -1,3 +1,3 @@ RewriteEngine On -RewriteRule "^/svn\.html$" %{REQUEST_SCHEME}://%{HTTP_HOST}/source.html [R=301] +RewriteRulesvn.html %{REQUEST_SCHEME}://%{HTTP_HOST}/source.html [R=301] Modified: tomcat/site/trunk/xdocs/.htaccess URL: http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/.htaccess?rev=1858405=1858404=1858405=diff == --- tomcat/site/trunk/xdocs/.htaccess (original) +++ tomcat/site/trunk/xdocs/.htaccess Mon Apr 29 21:57:55 2019 @@ -1,3 +1,3 @@ RewriteEngine On -RewriteRule "^/svn\.html$" %{REQUEST_SCHEME}://%{HTTP_HOST}/source.html [R=301] +RewriteRulesvn.html %{REQUEST_SCHEME}://%{HTTP_HOST}/source.html [R=301] - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1858404 - in /tomcat/site/trunk: docs/.htaccess xdocs/.htaccess
Author: markt Date: Mon Apr 29 21:50:14 2019 New Revision: 1858404 URL: http://svn.apache.org/viewvc?rev=1858404=rev Log: Whoops Modified: tomcat/site/trunk/docs/.htaccess tomcat/site/trunk/xdocs/.htaccess Modified: tomcat/site/trunk/docs/.htaccess URL: http://svn.apache.org/viewvc/tomcat/site/trunk/docs/.htaccess?rev=1858404=1858403=1858404=diff == --- tomcat/site/trunk/docs/.htaccess (original) +++ tomcat/site/trunk/docs/.htaccess Mon Apr 29 21:50:14 2019 @@ -1,3 +1,3 @@ -RewriteEngineOn +RewriteEngine On RewriteRule "^/svn\.html$" %{REQUEST_SCHEME}://%{HTTP_HOST}/source.html [R=301] Modified: tomcat/site/trunk/xdocs/.htaccess URL: http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/.htaccess?rev=1858404=1858403=1858404=diff == --- tomcat/site/trunk/xdocs/.htaccess (original) +++ tomcat/site/trunk/xdocs/.htaccess Mon Apr 29 21:50:14 2019 @@ -1,3 +1,3 @@ -RewriteEngineOn +RewriteEngine On RewriteRule "^/svn\.html$" %{REQUEST_SCHEME}://%{HTTP_HOST}/source.html [R=301] - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1858403 - /tomcat/site/trunk/docs/.htaccess
Author: markt Date: Mon Apr 29 21:48:53 2019 New Revision: 1858403 URL: http://svn.apache.org/viewvc?rev=1858403=rev Log: Rewrite still not right. Try again Modified: tomcat/site/trunk/docs/.htaccess Modified: tomcat/site/trunk/docs/.htaccess URL: http://svn.apache.org/viewvc/tomcat/site/trunk/docs/.htaccess?rev=1858403=1858402=1858403=diff == --- tomcat/site/trunk/docs/.htaccess (original) +++ tomcat/site/trunk/docs/.htaccess Mon Apr 29 21:48:53 2019 @@ -1,2 +1,3 @@ -Redirect "/svn.html" "/source.html" +RewriteEngineOn +RewriteRule "^/svn\.html$" %{REQUEST_SCHEME}://%{HTTP_HOST}/source.html [R=301] - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1858402 - /tomcat/site/trunk/xdocs/.htaccess
Author: markt Date: Mon Apr 29 21:48:32 2019 New Revision: 1858402 URL: http://svn.apache.org/viewvc?rev=1858402=rev Log: Rewrite still not right. Try again Modified: tomcat/site/trunk/xdocs/.htaccess Modified: tomcat/site/trunk/xdocs/.htaccess URL: http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/.htaccess?rev=1858402=1858401=1858402=diff == --- tomcat/site/trunk/xdocs/.htaccess (original) +++ tomcat/site/trunk/xdocs/.htaccess Mon Apr 29 21:48:32 2019 @@ -1,2 +1,3 @@ -Redirect "/svn.html" "/source.html" +RewriteEngineOn +RewriteRule "^/svn\.html$" %{REQUEST_SCHEME}://%{HTTP_HOST}/source.html [R=301] - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1858401 - in /tomcat/site/trunk: docs/index.html docs/oldnews-2015.html docs/oldnews-2018.html xdocs/index.xml xdocs/oldnews-2015.xml xdocs/oldnews-2018.xml
Author: markt Date: Mon Apr 29 21:33:02 2019 New Revision: 1858401 URL: http://svn.apache.org/viewvc?rev=1858401=rev Log: Remove announcements of deprecated releases from the home page Modified: tomcat/site/trunk/docs/index.html tomcat/site/trunk/docs/oldnews-2015.html tomcat/site/trunk/docs/oldnews-2018.html tomcat/site/trunk/xdocs/index.xml tomcat/site/trunk/xdocs/oldnews-2015.xml tomcat/site/trunk/xdocs/oldnews-2018.xml Modified: tomcat/site/trunk/docs/index.html URL: http://svn.apache.org/viewvc/tomcat/site/trunk/docs/index.html?rev=1858401=1858400=1858401=diff == --- tomcat/site/trunk/docs/index.html (original) +++ tomcat/site/trunk/docs/index.html Mon Apr 29 21:33:02 2019 @@ -439,75 +439,6 @@ This version fixes a number of bugs foun - -2018-07-05 Tomcat 8.0.53 Released - - - -The Apache Tomcat Project is proud to announce the release of version 8.0.53 -of Apache Tomcat. Apache Tomcat 8.0.53 includes fixes for issues identified in -8.0.52 as well as other enhancements and changes. The notable changes compared -to 8.0.52 include: - - - -Update the packaged version of the Tomcat Native Library to 1.2.17 to pick -up the latest Windows binaries built with APR 1.6.3 and OpenSSL 1.0.2o. - - - - - -Full details of these changes, and all the other changes, are available in the -Tomcat 8 -changelog. - - - - -Note: Apache Tomcat 8.0.x has reached end of life. -Read more... - - - - - - -https://tomcat.apache.org/download-80.cgi;>Download - - - - - -2015-12-15 Tomcat Native 1.1.34 Released - - - -The Apache Tomcat Project is proud to announce the release of version 1.1.34 of -Tomcat Native. The notable changes since 1.1.33 include: - - - - -Unconditionally disable export Ciphers - -Improve ephemeral key handling for DH and ECDH - -Various fixes to build with newer OpenSSL versions - - - -Note that, unless a regression is discovered in 1.2.x, users should now be -using 1.2.x in preference to 1.1.x. - - - -https://tomcat.apache.org/download-native.cgi;>Download | -ChangeLog for 1.1.34 - - - - 2015-03-17 Apache Standard Taglib 1.2.5 Released Modified: tomcat/site/trunk/docs/oldnews-2015.html URL: http://svn.apache.org/viewvc/tomcat/site/trunk/docs/oldnews-2015.html?rev=1858401=1858400=1858401=diff == --- tomcat/site/trunk/docs/oldnews-2015.html (original) +++ tomcat/site/trunk/docs/oldnews-2015.html Mon Apr 29 21:33:02 2019 @@ -286,6 +286,36 @@ using 1.2.x in preference to 1.1.x. + +2015-12-15 Tomcat Native 1.1.34 Released + + + +The Apache Tomcat Project is proud to announce the release of version 1.1.34 of +Tomcat Native. The notable changes since 1.1.33 include: + + + + +Unconditionally disable export Ciphers + +Improve ephemeral key handling for DH and ECDH + +Various fixes to build with newer OpenSSL versions + + + +Note that, unless a regression is discovered in 1.2.x, users should now be +using 1.2.x in preference to 1.1.x. + + + +https://tomcat.apache.org/download-native.cgi;>Download | +ChangeLog for 1.1.34 + + + + 2015-12-10 Tomcat 7.0.67 Released Modified: tomcat/site/trunk/docs/oldnews-2018.html URL: http://svn.apache.org/viewvc/tomcat/site/trunk/docs/oldnews-2018.html?rev=1858401=1858400=1858401=diff == --- tomcat/site/trunk/docs/oldnews-2018.html (original) +++ tomcat/site/trunk/docs/oldnews-2018.html Mon Apr 29 21:33:02 2019 @@ -734,6 +734,45 @@ Full details of these changes, and all t + +2018-07-05 Tomcat 8.0.53 Released + + + +The Apache Tomcat Project is proud to announce the release of version 8.0.53 +of Apache Tomcat. Apache Tomcat 8.0.53 includes fixes for issues identified in +8.0.52 as well as other enhancements and changes. The notable changes compared +to 8.0.52 include: + + + +Update the packaged version of the Tomcat Native Library to 1.2.17 to pick +up the latest Windows binaries built with APR 1.6.3 and OpenSSL 1.0.2o. + + + + + +Full details of these changes, and all the other changes, are available in the +Tomcat 8 +changelog. + + + + +Note: Apache Tomcat 8.0.x has reached end of life. +Read more... + + + + + + +https://tomcat.apache.org/download-80.cgi;>Download + + + + 2018-06-25 Tomcat 9.0.10 Released Modified: tomcat/site/trunk/xdocs/index.xml URL: http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/index.xml?rev=1858401=1858400=1858401=diff == --- tomcat/site/trunk/xdocs/index.xml (original) +++ tomcat/site/trunk/xdocs/index.xml Mon Apr 29 21:33:02 2019 @@ -175,50 +175,6 @@ This version fixes a number of bugs foun - - -The Apache Tomcat Project is proud to announce the release of version 8.0.53 -of Apache Tomcat. Apache Tomcat 8.0.53 includes fixes for issues identified in -8.0.52 as
[Bug 63335] OneLineFormatter will append new space so that the exception stacktrace is shifted but it will not do that for all lines
https://bz.apache.org/bugzilla/show_bug.cgi?id=63335 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED OS||All Resolution|--- |FIXED --- Comment #1 from Mark Thomas --- The OneLineFormatter has been fixed so it always indents all parts of a stacktrace. I have also removed the additional blank line added after a stack trace. Fixed in: - master for 9.0.20 onwards - 8.5.x for 8.5.41 onwards - 7.0.x for 7.0.95 onwards I haven't added the ExtendedSimpleFormatter as there does not appear to be sufficient demand for it at this time. -- 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
[tomcat] branch 7.0.x updated (9141493 -> 965f55c)
This is an automated email from the ASF dual-hosted git repository. markt pushed a change to branch 7.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git. from 9141493 Avoid NPE when minimal Context defined in server.xml new 45fd227 Improve the one line formatter so it outputs the correct thread ID even when using the async log writer. new 36f788e Fix NPE observed in testing logs new bca6c5c Restore line incorrectly removed in r1516416 Thanks due to rjung for spotting my error new f06ebb8 Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=59871 Make timestamp format of OneLineFormatter configurable new 17afdbe Fix typo. Patch provided by Josh Soref. new 646946f Back-port a SpotBugs fix to align the code new 88a2324 Partial fix for https://bz.apache.org/bugzilla/show_bug.cgi?id=63335 new 45e5714 Avoid unnecessary blank line after stack trace new 965f55c Move changelog entries to correct location The 11983 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/juli/DateFormatCache.java | 4 + java/org/apache/juli/OneLineFormatter.java | 173 + webapps/docs/changelog.xml | 18 +++ 3 files changed, 173 insertions(+), 22 deletions(-) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch master updated: Align with 8.5.x and 7.0.x
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 669d640 Align with 8.5.x and 7.0.x 669d640 is described below commit 669d640ef2fc5120c9283c23cdbca5b3f3823bf3 Author: Mark Thomas AuthorDate: Mon Apr 29 22:10:56 2019 +0100 Align with 8.5.x and 7.0.x --- java/org/apache/juli/OneLineFormatter.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/java/org/apache/juli/OneLineFormatter.java b/java/org/apache/juli/OneLineFormatter.java index f604242..75845cf 100644 --- a/java/org/apache/juli/OneLineFormatter.java +++ b/java/org/apache/juli/OneLineFormatter.java @@ -85,8 +85,9 @@ public class OneLineFormatter extends Formatter { * @param timeFormat The format to use using the * {@link java.text.SimpleDateFormat} syntax */ -public void setTimeFormat(String timeFormat) { -DateFormatCache globalDateCache = new DateFormatCache(globalCacheSize, timeFormat, null); +public void setTimeFormat(final String timeFormat) { +final DateFormatCache globalDateCache = +new DateFormatCache(globalCacheSize, timeFormat, null); localDateCache = new ThreadLocal() { @Override protected DateFormatCache initialValue() { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [OT] Finally getting around to switching to Git
Chris, On 4/29/2019 12:18 PM, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Igal, On 4/29/19 14:52, Igal Sapir wrote: Chris, On Thu, Apr 25, 2019 at 12:08 PM Christopher Schultz < ch...@christopherschultz.net> wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Igal, On 4/25/19 14:42, Igal Sapir wrote: On 4/25/2019 11:30 AM, Coty Sutherland wrote: If you clone a single branch with no references such as `git clone apache/tomcat -b master --single-branch` then you get just the references/history for the master branch which results in about a 70M .git directory. So one needs to consider whether that added layer of complexity is worth the savings of 30M disk space, even when multiplied over 3 branches. Imagine the reclaimed space after deleting the local SVN directories ;) For Tomcat 8.5.x @ r1852558: $ du -hs .svn/ 41M.svn/ Are you sure that you have the whole history there? I am working ATM on my Ubuntu workstation where I have a copy of the Tomcat 8.5 SVN. The disk usage is mostly in the tags directory and not in the .svn: ux@u18:/workspace/src/tc8.5.x$ du -sh tags 1.2Gtags ux@u18:/workspace/src/tc8.5.x$ du -sh .svn 231M.svn ux@u18:/workspace/src/tc8.5.x$ du -sh . 1.5G. Oh, heavens no. Checking-out the root of a project in svn is almost never a good idea. I've literally never checked-out /svn/[project]. I always check-out /svn/[project]/trunk or /svn/[project]/tags/[branch]. Never even in private repositories, for the same reason: there is no reason ever to grab every tag and branch ever onto your own disk. Subversion is efficient on the server-side, but the client is dumb and will happily duplicate everything. Each "tag" takes about 35MB: ux@u18:/workspace/src/tc8.5.x$ du -sh tags/TOMCAT_8_5_25 35M tags/TOMCAT_8_5_25 ux@u18:/workspace/src/tc8.5.x$ du -sh tags/TOMCAT_8_5_24 35Mtags/TOMCAT_8_5_24 ux@u18:/workspace/src/tc8.5.x$ du -sh tags/TOMCAT_8_5_23 34M tags/TOMCAT_8_5_23 Yeah, you should never have grabbed those. It was a waste of time and disk space (and back-up time and disk space). And now I know ;) I was actually banned from the apache.org network at some point because downloading the whole Tomcat SVN repo used too many requests per day. But this was exactly my point when comparing SVN to Git. Your Git repository of 80MB includes all of the history with all of the branches and tags, so it's tiny compared to the gigabytes that SVN uses (1.5GB for only tc8.5). We are using Lightweight Tags [1] in Git so they barely take any disk space. Igal [1] https://git-scm.com/book/en/v2/Git-Basics-Tagging#_lightweight_tags - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 63389] Enable Servlet Warmup for Containerization
https://bz.apache.org/bugzilla/show_bug.cgi?id=63389 --- Comment #6 from Igal Sapir --- (In reply to Christopher Schultz from comment #5) > (In reply to Igal Sapir from comment #4) > > (In reply to Christopher Schultz from comment #3) > > > I'm definitely missing something, here. Launching Tomcat and then shutting > > > it down saves zero time on the next launch except maybe to create a > > > directory or two and unpack any WAR archives being deployed. > > > > This is not for creating the Tomcat directory structure, but all of the > > initialization of the servlet itself. > > So if the servlet does something like downloading a bunch of files or > whatever? I mean, the JVM stops, so reading db info into a cache or > something doesn't help. Just making sure that this has nothing to do with > Tomcat itself, which won't benefit at all. Right. Not Tomcat itself. > > > > If you want to warm the application, you'll want to pre-compile all the > > > JSPs > > > either using jspc or by just spamming the application with web requests. > > > > > > So what exactly is the point, here? > > > > This is not a JSP per-se, even though it follows the JSP interface. In this > > case it is the Lucee Application Server that implements a CFML engine. > > Gotcha. I'm curious what the Lucee engine does on startup that happens ONE > TIME instead of each time the application is launched. In addition to Extensions (more below), some of the initial setup is to create directories and files for the application during initialization. That only happens once so the first time Lucee is launched takes much longer than subsequent launches. This is exactly the issue that this enhancement proposes to fix. Do the first launch during the `docker build` process so that `docker run` will start much faster. > > > > I can see use-cases for building something like this (some people want to > > > know when Tomcat is "really started"), but for triggering a shutdown to > > > "warm" an app server? I don't get it. > > > > The Application Server can take a while on first run because according to > > configuration settings it might download extensions and install them, etc. > > Without downloading extensions it takes about 3.5s to launch on my latptop. > > With extensions it can take up to 60s. > > So these are extensions for Lucee? Yes. Lucee has many different extensions, e.g. database drivers, cache providers, PDF generators, Chart generators, etc. Some extensions are provided by the Lucee project [1] while others provided by 3rd party vendors. Developers can configure which extensions their application requires to control the image size. > > > In monolith deployments that might have been acceptable, but in Docker or > > server-less deployments it is not. > > I have to admit that I find "serverless servlets" an amusing construct. ;-) [1] https://github.com/search?p=3=org%3Alucee+ext=Repositories -- 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: [OT] Finally getting around to switching to Git
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Igal, On 4/29/19 14:52, Igal Sapir wrote: > Chris, > > On Thu, Apr 25, 2019 at 12:08 PM Christopher Schultz < > ch...@christopherschultz.net> wrote: > >> -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 >> >> Igal, >> >> On 4/25/19 14:42, Igal Sapir wrote: >>> On 4/25/2019 11:30 AM, Coty Sutherland wrote: If you clone a single branch with no references such as `git clone apache/tomcat -b master --single-branch` then you get just the references/history for the master branch which results in about a 70M .git directory. >>> >>> So one needs to consider whether that added layer of complexity >>> is worth the savings of 30M disk space, even when multiplied >>> over 3 branches. Imagine the reclaimed space after deleting the >>> local SVN directories ;) >> >> For Tomcat 8.5.x @ r1852558: >> >> $ du -hs .svn/ 41M.svn/ >> >> > Are you sure that you have the whole history there? I am working > ATM on my Ubuntu workstation where I have a copy of the Tomcat 8.5 > SVN. The disk usage is mostly in the tags directory and not in the > .svn: > > ux@u18:/workspace/src/tc8.5.x$ du -sh tags 1.2Gtags > ux@u18:/workspace/src/tc8.5.x$ du -sh .svn 231M.svn > ux@u18:/workspace/src/tc8.5.x$ du -sh . 1.5G. Oh, heavens no. Checking-out the root of a project in svn is almost never a good idea. I've literally never checked-out /svn/[project]. I always check-out /svn/[project]/trunk or /svn/[project]/tags/[branch]. Never even in private repositories, for the same reason: there is no reason ever to grab every tag and branch ever onto your own disk. Subversion is efficient on the server-side, but the client is dumb and will happily duplicate everything. > Each "tag" takes about 35MB: > > ux@u18:/workspace/src/tc8.5.x$ du -sh tags/TOMCAT_8_5_25 35M > tags/TOMCAT_8_5_25 ux@u18:/workspace/src/tc8.5.x$ du -sh > tags/TOMCAT_8_5_24 35Mtags/TOMCAT_8_5_24 > ux@u18:/workspace/src/tc8.5.x$ du -sh tags/TOMCAT_8_5_23 34M > tags/TOMCAT_8_5_23 Yeah, you should never have grabbed those. It was a waste of time and disk space (and back-up time and disk space). - -chris -BEGIN PGP SIGNATURE- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlzHTgUACgkQHPApP6U8 pFgVBQ/9EyhUJFtunEWLsZLZvhmny0r4N0tnp961cQtsek3/uH3DBPakfVgW9JrA 8YcTuPVN0vpkjwFLukQ1xwDGhuUe02oQtcVbjrqQBCUsyLcOQbxXqisis28lMl+M upAX8MB1BJuZSF6CCoSKZWmazC5JcFBdeTHKAXt5JloovgUNUWHF3TrH9jc78MoG RCfIx+eZXwer+A6ERxofnVlorsZz7VQY6mMCPLGwMiS5X6u2/9MmkH84gYxwVbHu FjJfItc8ddcGrZ+KXmkARmWD3dXExl/hpWRNo/Y+LLoIfb2Dsf55vsnyAWgfMmPV mES7KqE8Y7W+tII19DoHJBi4zxXVwI4szk9MH0rdBcg22AuNPxDPG4kVefxbNtta kmjH6HbaNP+J23+0rRFj1RnS77xzR4iIy1HJu0r5OQFqkqmEKcViD6ObvYUb7lWZ WOkRLfLR7Sua1AQO1Y6muiw3EGvQ0Fr1gnGmyWwp8JzG8piHJnd3QZPU3BKmnNv3 raO1TUJ71knhD2mKS5C8yeMyDFDd0+dviUN0b75Nf+CUsc9sT4T9XTgejmCC13lJ qFTathGwlMqsVdnpuAgtaaEvLGxJYfYYnyXT4uByF36yMNAMJN2q7k4j6wSJUEkA YKc3Fg+I7DBeExqNYDbPHSwU2mD6NGScqvwmmfMXB+1qYHh7ZnU= =Mimb -END PGP SIGNATURE- - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [OT] Finally getting around to switching to Git
Chris, On Thu, Apr 25, 2019 at 12:08 PM Christopher Schultz < ch...@christopherschultz.net> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Igal, > > On 4/25/19 14:42, Igal Sapir wrote: > > On 4/25/2019 11:30 AM, Coty Sutherland wrote: > >> If you clone a single branch with no references such as `git > >> clone apache/tomcat -b master --single-branch` then you get just > >> the references/history for the master branch which results in > >> about a 70M .git directory. > > > > So one needs to consider whether that added layer of complexity is > > worth the savings of 30M disk space, even when multiplied over 3 > > branches. Imagine the reclaimed space after deleting the local SVN > > directories ;) > > For Tomcat 8.5.x @ r1852558: > > $ du -hs .svn/ > 41M.svn/ > > Are you sure that you have the whole history there? I am working ATM on my Ubuntu workstation where I have a copy of the Tomcat 8.5 SVN. The disk usage is mostly in the tags directory and not in the .svn: ux@u18:/workspace/src/tc8.5.x$ du -sh tags 1.2Gtags ux@u18:/workspace/src/tc8.5.x$ du -sh .svn 231M.svn ux@u18:/workspace/src/tc8.5.x$ du -sh . 1.5G. Each "tag" takes about 35MB: ux@u18:/workspace/src/tc8.5.x$ du -sh tags/TOMCAT_8_5_25 35Mtags/TOMCAT_8_5_25 ux@u18:/workspace/src/tc8.5.x$ du -sh tags/TOMCAT_8_5_24 35Mtags/TOMCAT_8_5_24 ux@u18:/workspace/src/tc8.5.x$ du -sh tags/TOMCAT_8_5_23 34Mtags/TOMCAT_8_5_23 Igal
[Bug 63389] Enable Servlet Warmup for Containerization
https://bz.apache.org/bugzilla/show_bug.cgi?id=63389 --- Comment #5 from Christopher Schultz --- (In reply to Igal Sapir from comment #4) > (In reply to Christopher Schultz from comment #3) > > I'm definitely missing something, here. Launching Tomcat and then shutting > > it down saves zero time on the next launch except maybe to create a > > directory or two and unpack any WAR archives being deployed. > > This is not for creating the Tomcat directory structure, but all of the > initialization of the servlet itself. So if the servlet does something like downloading a bunch of files or whatever? I mean, the JVM stops, so reading db info into a cache or something doesn't help. Just making sure that this has nothing to do with Tomcat itself, which won't benefit at all. > > If you want to warm the application, you'll want to pre-compile all the JSPs > > either using jspc or by just spamming the application with web requests. > > > > So what exactly is the point, here? > > This is not a JSP per-se, even though it follows the JSP interface. In this > case it is the Lucee Application Server that implements a CFML engine. Gotcha. I'm curious what the Lucee engine does on startup that happens ONE TIME instead of each time the application is launched. > > I can see use-cases for building something like this (some people want to > > know when Tomcat is "really started"), but for triggering a shutdown to > > "warm" an app server? I don't get it. > > The Application Server can take a while on first run because according to > configuration settings it might download extensions and install them, etc. > Without downloading extensions it takes about 3.5s to launch on my latptop. > With extensions it can take up to 60s. So these are extensions for Lucee? > In monolith deployments that might have been acceptable, but in Docker or > server-less deployments it is not. I have to admit that I find "serverless servlets" an amusing construct. -- 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 63389] Enable Servlet Warmup for Containerization
https://bz.apache.org/bugzilla/show_bug.cgi?id=63389 --- Comment #4 from Igal Sapir --- (In reply to Christopher Schultz from comment #3) > I'm definitely missing something, here. Launching Tomcat and then shutting > it down saves zero time on the next launch except maybe to create a > directory or two and unpack any WAR archives being deployed. This is not for creating the Tomcat directory structure, but all of the initialization of the servlet itself. > If you want to warm the application, you'll want to pre-compile all the JSPs > either using jspc or by just spamming the application with web requests. > > So what exactly is the point, here? This is not a JSP per-se, even though it follows the JSP interface. In this case it is the Lucee Application Server that implements a CFML engine. > I can see use-cases for building something like this (some people want to > know when Tomcat is "really started"), but for triggering a shutdown to > "warm" an app server? I don't get it. The Application Server can take a while on first run because according to configuration settings it might download extensions and install them, etc. Without downloading extensions it takes about 3.5s to launch on my latptop. With extensions it can take up to 60s. In monolith deployments that might have been acceptable, but in Docker or server-less deployments it is not. You can find more information in the Lucee ticket system [1], where I actually resolved the issue for Lucee but it feels like a hack and would be much better if resolved on the Tomcat level as 1) it will be cleaner, and 2) it will help other projects who might need this feature. [1] https://luceeserver.atlassian.net/browse/LDEV-1196 -- 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 63389] Enable Servlet Warmup for Containerization
https://bz.apache.org/bugzilla/show_bug.cgi?id=63389 --- Comment #3 from Christopher Schultz --- I'm definitely missing something, here. Launching Tomcat and then shutting it down saves zero time on the next launch except maybe to create a directory or two and unpack any WAR archives being deployed. If you want to warm the application, you'll want to pre-compile all the JSPs either using jspc or by just spamming the application with web requests. So what exactly is the point, here? I can see use-cases for building something like this (some people want to know when Tomcat is "really started"), but for triggering a shutdown to "warm" an app server? I don't get 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 63389] Enable Servlet Warmup for Containerization
https://bz.apache.org/bugzilla/show_bug.cgi?id=63389 --- Comment #2 from Igal Sapir --- (In reply to Mark Thomas from comment #1) > Start and stop are synchronous. Calling start() then stop() should be > sufficient. Doing that with the current startup scripts is a little trickier > because you need to wait for the shutdown port to open. > > Something like: > ./catalina.sh start && sleep 1 && ./catalina.sh stop > > should work however long the web application takes to start up. On my laptop the servlet takes about 3 seconds to initialize (though on some cloud deployments I have seen it take as much as 15s). >From testing the above compounded command it seems to me that the shutdown port only opens after the servlet initialization, so waiting 1 or 2s does not work [1]. If we could start listening the shutdown port at the beginning of the process, and then it can be a blocking operation until start completes, then that would be a great a solution. Thoughts? [1] /workspace/src/tomcat-master$ output/build/bin/catalina.sh start && sleep 2 && output/build/bin/catalina.sh stop Using CATALINA_BASE: /workspace/test/catalina-base Using CATALINA_HOME: /workspace/src/tomcat-master/output/build Using CATALINA_TMPDIR: /workspace/test/catalina-base/temp Using JRE_HOME:/opt/java/jdk1.8.0_202 Using CLASSPATH: /workspace/src/tomcat-master/output/build/bin/bootstrap.jar:/workspace/src/tomcat-master/output/build/bin/tomcat-juli.jar Tomcat started. Using CATALINA_BASE: /workspace/test/catalina-base Using CATALINA_HOME: /workspace/src/tomcat-master/output/build Using CATALINA_TMPDIR: /workspace/test/catalina-base/temp Using JRE_HOME:/opt/java/jdk1.8.0_202 Using CLASSPATH: /workspace/src/tomcat-master/output/build/bin/bootstrap.jar:/workspace/src/tomcat-master/output/build/bin/tomcat-juli.jar Apr 29, 2019 10:58:34 AM org.apache.catalina.startup.Catalina stopServer SEVERE: Could not contact [localhost:8005] (base port [8005] and offset [0]). Tomcat may not be running. Apr 29, 2019 10:58:34 AM org.apache.catalina.startup.Catalina stopServer SEVERE: Error stopping Catalina java.net.ConnectException: Connection refused (Connection refused) at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at java.net.Socket.connect(Socket.java:538) at java.net.Socket.(Socket.java:434) at java.net.Socket.(Socket.java:211) at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:513) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:390) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:480) -- 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
[tomcat] branch 8.5.x updated (ca24292 -> 8975dfb)
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 ca24292 Avoid NPE when minimal Context defined in server.xml new 50697c59 Back-port refactoring to keep code aligned new e2426a1 Partial fix for https://bz.apache.org/bugzilla/show_bug.cgi?id=63335 new a3921f3 Avoid unnecessary blank line after stack trace new 8975dfb Move changelog entries to correct location The 19165 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/juli/OneLineFormatter.java | 63 -- webapps/docs/changelog.xml | 13 ++ 2 files changed, 56 insertions(+), 20 deletions(-) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch master updated: Move changelog entries to correct location
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 d063e40 Move changelog entries to correct location d063e40 is described below commit d063e405950e62e0c36c2f94c4cfc890b960928a Author: Mark Thomas AuthorDate: Mon Apr 29 17:14:38 2019 +0100 Move changelog entries to correct location --- webapps/docs/changelog.xml | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index d943d38..b25cdf6 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -105,15 +105,6 @@ defined in server.xml with a docBase but not the optional path. (markt) - -63335: Ensure that stack traces written by the -OneLineFormatter are fully indented. The entire stack trace -is now indented by an additional TAB character. (markt) - - -When using the OneLineFormatter, don't print a blank line -in the log after printing a stack trace. (markt) - @@ -156,6 +147,11 @@ +63335: Ensure that stack traces written by the +OneLineFormatter are fully indented. The entire stack trace +is now indented by an additional TAB character. (markt) + + 63370: Message files (LocalStrings_*.properties) of the examples webapp not converted to ascii. (woonsan) @@ -171,6 +167,10 @@ Expand the coverage and quality of the Czech translations provided with Apache Tomcat. Includes contributions by Arnošt Havelka. (markt) + +When using the OneLineFormatter, don't print a blank line +in the log after printing a stack trace. (markt) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch master updated (cf0ffcf -> 4e683dc)
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 cf0ffcf Disable h2 logging again new e3e9d80 Partial fix for https://bz.apache.org/bugzilla/show_bug.cgi?id=63335 new 4e683dc Avoid unnecessary blank line after stack trace The 20800 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/juli/OneLineFormatter.java | 29 +++-- webapps/docs/changelog.xml | 9 + 2 files changed, 32 insertions(+), 6 deletions(-) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch master updated: Disable h2 logging again
This is an automated email from the ASF dual-hosted git repository. remm 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 cf0ffcf Disable h2 logging again cf0ffcf is described below commit cf0ffcf0a37cac231b0dbffb37736edb075e6ad9 Author: remm AuthorDate: Mon Apr 29 17:47:33 2019 +0200 Disable h2 logging again It doesn't seem to be very relevant to debug or notice the latest issue, as it is causing straight stack traces which would be logged anyway. --- conf/logging.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/logging.properties b/conf/logging.properties index fc52083..e8b7b16 100644 --- a/conf/logging.properties +++ b/conf/logging.properties @@ -73,7 +73,7 @@ org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].ha #org.apache.jasper.compiler.TldLocationsCache.level = FINE # To see debug messages for HTTP/2 handling, uncomment the following line: -org.apache.coyote.http2.level = FINE +#org.apache.coyote.http2.level = FINE # To see debug messages for WebSocket handling, uncomment the following line: #org.apache.tomcat.websocket.level = FINE - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot success in on tomcat-trunk
The Buildbot has detected a restored build on builder tomcat-trunk while building tomcat. Full details are available at: https://ci.apache.org/builders/tomcat-trunk/builds/4257 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: silvanus_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' triggered this build Build Source Stamp: [branch master] a19e8fed4ab2935a0b3d7c37cc9330da8f9fa759 Blamelist: remm Build succeeded! Sincerely, -The Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch master updated: Tolerate concurrency
This is an automated email from the ASF dual-hosted git repository. remm 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 a19e8fe Tolerate concurrency a19e8fe is described below commit a19e8fed4ab2935a0b3d7c37cc9330da8f9fa759 Author: remm AuthorDate: Mon Apr 29 17:14:54 2019 +0200 Tolerate concurrency The read call may return not_done by checking a semaphore, which allows safe concurrent use of the API. However, if the buffers of a pending read are concurrently cleared, then this may cause an underflow error and this is discarding one of the API benefits. This seems to be a very rare scenario. Adding some checks and sync would be expensive so this might not be a win. Will have to verify performance however ... --- java/org/apache/coyote/http2/Http2AsyncParser.java | 8 ++-- webapps/docs/changelog.xml | 4 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/java/org/apache/coyote/http2/Http2AsyncParser.java b/java/org/apache/coyote/http2/Http2AsyncParser.java index 2c764f8..5438b40 100644 --- a/java/org/apache/coyote/http2/Http2AsyncParser.java +++ b/java/org/apache/coyote/http2/Http2AsyncParser.java @@ -33,16 +33,12 @@ class Http2AsyncParser extends Http2Parser { private final SocketWrapperBase socketWrapper; private final Http2AsyncUpgradeHandler upgradeHandler; private Throwable error = null; -private final ByteBuffer header; -private final ByteBuffer framePaylod; Http2AsyncParser(String connectionId, Input input, Output output, SocketWrapperBase socketWrapper, Http2AsyncUpgradeHandler upgradeHandler) { super(connectionId, input, output); this.socketWrapper = socketWrapper; socketWrapper.getSocketBufferHandler().expand(input.getMaxFrameSize()); this.upgradeHandler = upgradeHandler; -header = ByteBuffer.allocate(9); -framePaylod = ByteBuffer.allocate(input.getMaxFrameSize()); } @@ -54,8 +50,8 @@ class Http2AsyncParser extends Http2Parser { return super.readFrame(block, expected); } handleAsyncException(); -header.clear(); -framePaylod.clear(); +ByteBuffer header = ByteBuffer.allocate(9); +ByteBuffer framePaylod = ByteBuffer.allocate(input.getMaxFrameSize()); FrameCompletionHandler handler = new FrameCompletionHandler(expected, header, framePaylod); CompletionState state = socketWrapper.read(BlockingMode.NON_BLOCK, socketWrapper.getReadTimeout(), TimeUnit.MILLISECONDS, null, handler, handler, header, framePaylod); diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 0ddcac8..9522873 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -138,6 +138,10 @@ Associate BlockPoller thread name with its NIO connector for better readability. (remm) + +The async HTTP/2 frame parser should tolerate concurrency so clearing +shared buffers before attempting a read is not possible. (remm) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot failure in on tomcat-trunk
The Buildbot has detected a new failure on builder tomcat-trunk while building tomcat. Full details are available at: https://ci.apache.org/builders/tomcat-trunk/builds/4256 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: silvanus_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' triggered this build Build Source Stamp: [branch master] 81efd6a21bb38b600e2124fa4d1a2fb2e84da12b Blamelist: remm BUILD FAILED: failed compile_1 Sincerely, -The Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 63354] forced compression in HTTP2 truncate files
https://bz.apache.org/bugzilla/show_bug.cgi?id=63354 Mark Thomas changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|--- |INVALID --- Comment #4 from Mark Thomas --- All the indications are that this is a browser bug. I was testing with Firefox. I have captured the network traffic via Wireshark (using SSLKEYLOGFILE) and confirmed that the response body sent to Firefox is correct. As are the HTTP/2 frames used to send the response. -- 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
[tomcat] branch master updated: Add i18n to two Hpack exceptions
This is an automated email from the ASF dual-hosted git repository. remm 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 81efd6a Add i18n to two Hpack exceptions 81efd6a is described below commit 81efd6a21bb38b600e2124fa4d1a2fb2e84da12b Author: remm AuthorDate: Mon Apr 29 15:26:04 2019 +0200 Add i18n to two Hpack exceptions --- java/org/apache/coyote/http2/HpackDecoder.java | 5 +++-- java/org/apache/coyote/http2/LocalStrings.properties | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/java/org/apache/coyote/http2/HpackDecoder.java b/java/org/apache/coyote/http2/HpackDecoder.java index ea55a08..551101b 100644 --- a/java/org/apache/coyote/http2/HpackDecoder.java +++ b/java/org/apache/coyote/http2/HpackDecoder.java @@ -171,7 +171,8 @@ public class HpackDecoder { return false; } if (size > maxMemorySizeHard) { -throw new HpackException(); +throw new HpackException(sm.getString("hpackdecoder.maxMemorySizeExceeded", +Integer.valueOf(size), Integer.valueOf(maxMemorySizeHard))); } maxMemorySizeSoft = size; if (currentMemorySize > maxMemorySizeSoft) { @@ -249,7 +250,7 @@ public class HpackDecoder { int adjustedIndex = getRealIndex(index - Hpack.STATIC_TABLE_LENGTH); Hpack.HeaderField res = headerTable[adjustedIndex]; if (res == null) { -throw new HpackException(); +throw new HpackException(sm.getString("hpackdecoder.nullHeader", Integer.valueOf(index))); } return res.name; } diff --git a/java/org/apache/coyote/http2/LocalStrings.properties b/java/org/apache/coyote/http2/LocalStrings.properties index b2ac336..2c3e5c0 100644 --- a/java/org/apache/coyote/http2/LocalStrings.properties +++ b/java/org/apache/coyote/http2/LocalStrings.properties @@ -37,7 +37,9 @@ hpack.invalidCharacter=The Unicode character [{0}] at code point [{1}] cannot be hpackEncoder.encodeHeader=Encoding header [{0}] with value [{1}] hpackdecoder.headerTableIndexInvalid=The header table index [{0}] is not valid as there are [{1}] static entries and [{2}] dynamic entries +hpackdecoder.maxMemorySizeExceeded=The header table size [{0}] exceeds the maximum size [{1}] hpackdecoder.notImplemented=Not yet implemented +hpackdecoder.nullHeader=Null header at index [{0}] hpackdecoder.tableSizeUpdateNotAtStart=Any table size update must be sent at the start of a header block hpackdecoder.zeroNotValidHeaderTableIndex=Zero is not a valid header table index - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 63358] Allow exceptions thrown by Connector.start() when adding a connector to be caught and handled in code that embeds Tomcat
https://bz.apache.org/bugzilla/show_bug.cgi?id=63358 Mark Thomas changed: What|Removed |Added Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #2 from Mark Thomas --- Fixed in: - master for 9.0.20 onwards -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch master updated (fa43440 -> 18c3c09)
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 fa43440 Better error for empty header name new 3dad84a Reduce the scope of the connectorsLock when adding a Connector new 18c3c09 Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63358 The 20795 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/catalina/core/StandardService.java | 19 - .../core/TestStandardService.java} | 45 +- webapps/docs/changelog.xml | 7 +++- 3 files changed, 41 insertions(+), 30 deletions(-) copy test/org/apache/{tomcat/util/descriptor/web/TestFilterDef.java => catalina/core/TestStandardService.java} (51%) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [tomcat] branch master updated: Better error for empty header name
On 29/04/2019 13:20, Rémy Maucherat wrote: > On Mon, Apr 29, 2019 at 1:53 PM Mark Thomas wrote: > >> On 29/04/2019 12:30, r...@apache.org wrote: >>> This is an automated email from the ASF dual-hosted git repository. >>> >>> remm 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 fa43440 Better error for empty header name >>> fa43440 is described below >>> >>> commit fa43440991fdb5d088a6417425cd18a80ba2cf71 >>> Author: remm >>> AuthorDate: Mon Apr 29 13:30:06 2019 +0200 >>> >>> Better error for empty header name >>> >>> Also add back logging for a while. >>> --- >>> conf/logging.properties | 2 +- >>> java/org/apache/coyote/http2/LocalStrings.properties | 1 + >>> java/org/apache/coyote/http2/Stream.java | 7 ++- >>> 3 files changed, 8 insertions(+), 2 deletions(-) >>> >>> diff --git a/conf/logging.properties b/conf/logging.properties >>> index e8b7b16..fc52083 100644 >>> --- a/conf/logging.properties >>> +++ b/conf/logging.properties >>> @@ -73,7 +73,7 @@ >> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].ha >>> #org.apache.jasper.compiler.TldLocationsCache.level = FINE >>> >>> # To see debug messages for HTTP/2 handling, uncomment the following >> line: >>> -#org.apache.coyote.http2.level = FINE >>> +org.apache.coyote.http2.level = FINE >> >> This looks like a accidental commit. >> > > "Also add back logging for a while." :) So it wasn't an accident. ACK. Still getting used to the new format commit messages. Sorry for the noise. Mark > After tens of builds which were fine, right after I wrote "The testing > looks fine so far so I don't plan to switch the default back at this > time.", #4253 produced a relevant anomaly > https://ci.apache.org/projects/tomcat/tomcat9/logs/4253/TEST-org.apache.coyote.http2.TestStreamQueryString.NIO.txt, > with this exception trace: > Exception in thread "http-nio-127.0.0.1-auto-38-exec-3" > java.lang.RuntimeException: java.lang.StringIndexOutOfBoundsException: > String index out of range: 0 > at > org.apache.coyote.http2.Http2AsyncParser.handleAsyncException(Http2AsyncParser.java:80) > at > org.apache.coyote.http2.Http2AsyncParser.readFrame(Http2AsyncParser.java:56) > at org.apache.coyote.http2.Http2Parser.readFrame(Http2Parser.java:69) > at > org.apache.coyote.http2.Http2UpgradeHandler.upgradeDispatch(Http2UpgradeHandler.java:322) > at > org.apache.coyote.http2.Http2AsyncUpgradeHandler.upgradeDispatch(Http2AsyncUpgradeHandler.java:37) > at > org.apache.coyote.http2.Http2AsyncParser$FrameCompletionHandler.completed(Http2AsyncParser.java:231) > at > org.apache.coyote.http2.Http2AsyncParser$FrameCompletionHandler.completed(Http2AsyncParser.java:85) > at > org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper$VectoredIOCompletionHandler.completed(NioEndpoint.java:1721) > at > org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper$OperationState.run(NioEndpoint.java:1537) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) > at > org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) > at java.lang.Thread.run(Thread.java:748) > Caused by: java.lang.StringIndexOutOfBoundsException: String index out of > range: 0 > at java.lang.String.charAt(String.java:658) > at org.apache.coyote.http2.Stream.emitHeader(Stream.java:350) > at > org.apache.coyote.http2.HpackDecoder.emitHeader(HpackDecoder.java:430) > at org.apache.coyote.http2.HpackDecoder.decode(HpackDecoder.java:138) > at > org.apache.coyote.http2.Http2Parser.readHeaderPayload(Http2Parser.java:474) > at > org.apache.coyote.http2.Http2Parser.readHeadersFrame(Http2Parser.java:267) > at > org.apache.coyote.http2.Http2AsyncParser$FrameCompletionHandler.completed(Http2AsyncParser.java:167) > ... 7 more > > Rémy > >> >> Mark >> >> >> - >> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: dev-h...@tomcat.apache.org >> >> > - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 63379] Tomcat socket listening timeouts
https://bz.apache.org/bugzilla/show_bug.cgi?id=63379 Mark Thomas changed: What|Removed |Added Status|NEEDINFO|RESOLVED Resolution|--- |WORKSFORME --- Comment #4 from Mark Thomas --- I've tested that docker image and I don't see that issue with the latest version. I've also reviewed the Tomcat code and I don't see any way for a timeout to be set on the shutdown socket. -- 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: [tomcat] branch master updated: Better error for empty header name
On Mon, Apr 29, 2019 at 1:53 PM Mark Thomas wrote: > On 29/04/2019 12:30, r...@apache.org wrote: > > This is an automated email from the ASF dual-hosted git repository. > > > > remm 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 fa43440 Better error for empty header name > > fa43440 is described below > > > > commit fa43440991fdb5d088a6417425cd18a80ba2cf71 > > Author: remm > > AuthorDate: Mon Apr 29 13:30:06 2019 +0200 > > > > Better error for empty header name > > > > Also add back logging for a while. > > --- > > conf/logging.properties | 2 +- > > java/org/apache/coyote/http2/LocalStrings.properties | 1 + > > java/org/apache/coyote/http2/Stream.java | 7 ++- > > 3 files changed, 8 insertions(+), 2 deletions(-) > > > > diff --git a/conf/logging.properties b/conf/logging.properties > > index e8b7b16..fc52083 100644 > > --- a/conf/logging.properties > > +++ b/conf/logging.properties > > @@ -73,7 +73,7 @@ > org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].ha > > #org.apache.jasper.compiler.TldLocationsCache.level = FINE > > > > # To see debug messages for HTTP/2 handling, uncomment the following > line: > > -#org.apache.coyote.http2.level = FINE > > +org.apache.coyote.http2.level = FINE > > This looks like a accidental commit. > "Also add back logging for a while." :) So it wasn't an accident. After tens of builds which were fine, right after I wrote "The testing looks fine so far so I don't plan to switch the default back at this time.", #4253 produced a relevant anomaly https://ci.apache.org/projects/tomcat/tomcat9/logs/4253/TEST-org.apache.coyote.http2.TestStreamQueryString.NIO.txt, with this exception trace: Exception in thread "http-nio-127.0.0.1-auto-38-exec-3" java.lang.RuntimeException: java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at org.apache.coyote.http2.Http2AsyncParser.handleAsyncException(Http2AsyncParser.java:80) at org.apache.coyote.http2.Http2AsyncParser.readFrame(Http2AsyncParser.java:56) at org.apache.coyote.http2.Http2Parser.readFrame(Http2Parser.java:69) at org.apache.coyote.http2.Http2UpgradeHandler.upgradeDispatch(Http2UpgradeHandler.java:322) at org.apache.coyote.http2.Http2AsyncUpgradeHandler.upgradeDispatch(Http2AsyncUpgradeHandler.java:37) at org.apache.coyote.http2.Http2AsyncParser$FrameCompletionHandler.completed(Http2AsyncParser.java:231) at org.apache.coyote.http2.Http2AsyncParser$FrameCompletionHandler.completed(Http2AsyncParser.java:85) at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper$VectoredIOCompletionHandler.completed(NioEndpoint.java:1721) at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper$OperationState.run(NioEndpoint.java:1537) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at java.lang.String.charAt(String.java:658) at org.apache.coyote.http2.Stream.emitHeader(Stream.java:350) at org.apache.coyote.http2.HpackDecoder.emitHeader(HpackDecoder.java:430) at org.apache.coyote.http2.HpackDecoder.decode(HpackDecoder.java:138) at org.apache.coyote.http2.Http2Parser.readHeaderPayload(Http2Parser.java:474) at org.apache.coyote.http2.Http2Parser.readHeadersFrame(Http2Parser.java:267) at org.apache.coyote.http2.Http2AsyncParser$FrameCompletionHandler.completed(Http2AsyncParser.java:167) ... 7 more Rémy > > Mark > > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > >
buildbot success in on tomcat-trunk
The Buildbot has detected a restored build on builder tomcat-trunk while building tomcat. Full details are available at: https://ci.apache.org/builders/tomcat-trunk/builds/4254 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: silvanus_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' triggered this build Build Source Stamp: [branch master] fa43440991fdb5d088a6417425cd18a80ba2cf71 Blamelist: remm Build succeeded! Sincerely, -The Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [tomcat] branch master updated: Better error for empty header name
On 29/04/2019 12:30, r...@apache.org wrote: > This is an automated email from the ASF dual-hosted git repository. > > remm 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 fa43440 Better error for empty header name > fa43440 is described below > > commit fa43440991fdb5d088a6417425cd18a80ba2cf71 > Author: remm > AuthorDate: Mon Apr 29 13:30:06 2019 +0200 > > Better error for empty header name > > Also add back logging for a while. > --- > conf/logging.properties | 2 +- > java/org/apache/coyote/http2/LocalStrings.properties | 1 + > java/org/apache/coyote/http2/Stream.java | 7 ++- > 3 files changed, 8 insertions(+), 2 deletions(-) > > diff --git a/conf/logging.properties b/conf/logging.properties > index e8b7b16..fc52083 100644 > --- a/conf/logging.properties > +++ b/conf/logging.properties > @@ -73,7 +73,7 @@ > org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].ha > #org.apache.jasper.compiler.TldLocationsCache.level = FINE > > # To see debug messages for HTTP/2 handling, uncomment the following line: > -#org.apache.coyote.http2.level = FINE > +org.apache.coyote.http2.level = FINE This looks like a accidental commit. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 63389] Enable Servlet Warmup for Containerization
https://bz.apache.org/bugzilla/show_bug.cgi?id=63389 --- Comment #1 from Mark Thomas --- Start and stop are synchronous. Calling start() then stop() should be sufficient. Doing that with the current startup scripts is a little trickier because you need to wait for the shutdown port to open. Something like: ./catalina.sh start && sleep 1 && ./catalina.sh stop should work however long the web application takes to start up. -- 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
[tomcat] branch master updated: Better error for empty header name
This is an automated email from the ASF dual-hosted git repository. remm 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 fa43440 Better error for empty header name fa43440 is described below commit fa43440991fdb5d088a6417425cd18a80ba2cf71 Author: remm AuthorDate: Mon Apr 29 13:30:06 2019 +0200 Better error for empty header name Also add back logging for a while. --- conf/logging.properties | 2 +- java/org/apache/coyote/http2/LocalStrings.properties | 1 + java/org/apache/coyote/http2/Stream.java | 7 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/conf/logging.properties b/conf/logging.properties index e8b7b16..fc52083 100644 --- a/conf/logging.properties +++ b/conf/logging.properties @@ -73,7 +73,7 @@ org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].ha #org.apache.jasper.compiler.TldLocationsCache.level = FINE # To see debug messages for HTTP/2 handling, uncomment the following line: -#org.apache.coyote.http2.level = FINE +org.apache.coyote.http2.level = FINE # To see debug messages for WebSocket handling, uncomment the following line: #org.apache.tomcat.websocket.level = FINE diff --git a/java/org/apache/coyote/http2/LocalStrings.properties b/java/org/apache/coyote/http2/LocalStrings.properties index 17dbf88..b2ac336 100644 --- a/java/org/apache/coyote/http2/LocalStrings.properties +++ b/java/org/apache/coyote/http2/LocalStrings.properties @@ -83,6 +83,7 @@ stream.header.connection=Connection [{0}], Stream [{1}], HTTP header [connection stream.header.contentLength=Connection [{0}], Stream [{1}], The content length header value [{2}] does not agree with the size of the data received [{3}] stream.header.debug=Connection [{0}], Stream [{1}], HTTP header [{2}], Value [{3}] stream.header.duplicate=Connection [{0}], Stream [{1}], received multiple [{3}] headers +stream.header.empty=Connection [{0}], Stream [{1}], Invalid empty header name stream.header.invalid=Connection [{0}], Stream [{1}], The header [{2}] contained invalid value [{3}] stream.header.noPath=Connection [{0}], Stream [{1}], The [:path] pseudo header was empty stream.header.required=Connection [{0}], Stream [{1}], One or more required headers was missing diff --git a/java/org/apache/coyote/http2/Stream.java b/java/org/apache/coyote/http2/Stream.java index 0bb12a0..21304d9 100644 --- a/java/org/apache/coyote/http2/Stream.java +++ b/java/org/apache/coyote/http2/Stream.java @@ -347,6 +347,11 @@ class Stream extends AbstractStream implements HeaderEmitter { return; } +if (name.length() == 0) { +throw new HpackException(sm.getString("stream.header.empty", +getConnectionId(), getIdentifier())); +} + boolean pseudoHeader = name.charAt(0) == ':'; if (pseudoHeader && headerState != HEADER_STATE_PSEUDO) { @@ -361,7 +366,7 @@ class Stream extends AbstractStream implements HeaderEmitter { headerState = HEADER_STATE_REGULAR; } -switch(name) { +switch (name) { case ":method": { if (coyoteRequest.method().isNull()) { coyoteRequest.method().setString(value); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot failure in on tomcat-trunk
The Buildbot has detected a new failure on builder tomcat-trunk while building tomcat. Full details are available at: https://ci.apache.org/builders/tomcat-trunk/builds/4253 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: silvanus_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' triggered this build Build Source Stamp: [branch master] 9480788ead029add98c146b44cb7484da619ee9d Blamelist: Mark Thomas BUILD FAILED: failed compile_1 Sincerely, -The Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 7.0.x updated: Avoid NPE when minimal Context defined in server.xml
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 7.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/7.0.x by this push: new 9141493 Avoid NPE when minimal Context defined in server.xml 9141493 is described below commit 9141493d9132646c1ade50eb28431b83d1e859cd Author: Mark Thomas AuthorDate: Mon Apr 29 10:13:17 2019 +0100 Avoid NPE when minimal Context defined in server.xml --- java/org/apache/catalina/core/StandardHost.java | 14 -- webapps/docs/changelog.xml | 5 + 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/java/org/apache/catalina/core/StandardHost.java b/java/org/apache/catalina/core/StandardHost.java index 3fd3be7..ae45585 100644 --- a/java/org/apache/catalina/core/StandardHost.java +++ b/java/org/apache/catalina/core/StandardHost.java @@ -36,6 +36,7 @@ import org.apache.catalina.LifecycleListener; import org.apache.catalina.Valve; import org.apache.catalina.loader.WebappClassLoaderBase; import org.apache.catalina.mbeans.MBeanUtils; +import org.apache.catalina.util.ContextName; import org.apache.catalina.valves.ValveBase; import org.apache.tomcat.util.ExceptionUtils; @@ -644,11 +645,20 @@ public class StandardHost extends ContainerBase implements Host { @Override public void addChild(Container child) { -child.addLifecycleListener(new MemoryLeakTrackingListener()); - if (!(child instanceof Context)) throw new IllegalArgumentException (sm.getString("standardHost.notContext")); + +child.addLifecycleListener(new MemoryLeakTrackingListener()); + +// Avoid NPE for case where Context is defined in server.xml with only a +// docBase +Context context = (Context) child; +if (context.getPath() == null) { +ContextName cn = new ContextName(context.getDocBase(), true); +context.setPath(cn.getPath()); +} + super.addChild(child); } diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index ae21089..e390c3a 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -89,6 +89,11 @@ Refactor ManagerServlet to avoid loading classes when filtering JNDI resources for resources of a specified type. (markt) + +Avoid a NullPointerException when a Context is +defined in server.xml with a docBase but not +the optional path. (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: Avoid NPE when minimal Context defined in server.xml
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 ca24292 Avoid NPE when minimal Context defined in server.xml ca24292 is described below commit ca24292e2549826761a2a9d90cf78321569928e9 Author: Mark Thomas AuthorDate: Mon Apr 29 10:13:17 2019 +0100 Avoid NPE when minimal Context defined in server.xml --- java/org/apache/catalina/core/StandardHost.java | 14 -- webapps/docs/changelog.xml | 5 + 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/java/org/apache/catalina/core/StandardHost.java b/java/org/apache/catalina/core/StandardHost.java index 89ceb97..b0b328e 100644 --- a/java/org/apache/catalina/core/StandardHost.java +++ b/java/org/apache/catalina/core/StandardHost.java @@ -40,6 +40,7 @@ import org.apache.catalina.LifecycleException; import org.apache.catalina.LifecycleListener; import org.apache.catalina.Valve; import org.apache.catalina.loader.WebappClassLoaderBase; +import org.apache.catalina.util.ContextName; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; import org.apache.tomcat.util.ExceptionUtils; @@ -726,11 +727,20 @@ public class StandardHost extends ContainerBase implements Host { @Override public void addChild(Container child) { -child.addLifecycleListener(new MemoryLeakTrackingListener()); - if (!(child instanceof Context)) throw new IllegalArgumentException (sm.getString("standardHost.notContext")); + +child.addLifecycleListener(new MemoryLeakTrackingListener()); + +// Avoid NPE for case where Context is defined in server.xml with only a +// docBase +Context context = (Context) child; +if (context.getPath() == null) { +ContextName cn = new ContextName(context.getDocBase(), true); +context.setPath(cn.getPath()); +} + super.addChild(child); } diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index ebd266e..ba4b05f 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -84,6 +84,11 @@ ArrayIndexOutOfBoundsExceptions when accessing large files via the default servlet when resource caching has been disabled. (markt) + +Avoid a NullPointerException when a Context is +defined in server.xml with a docBase but not +the optional path. (markt) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch master updated: Avoid NPE when minimal Context defined in server.xml
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 9480788 Avoid NPE when minimal Context defined in server.xml 9480788 is described below commit 9480788ead029add98c146b44cb7484da619ee9d Author: Mark Thomas AuthorDate: Mon Apr 29 10:13:17 2019 +0100 Avoid NPE when minimal Context defined in server.xml --- java/org/apache/catalina/core/StandardHost.java | 14 -- webapps/docs/changelog.xml | 5 + 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/java/org/apache/catalina/core/StandardHost.java b/java/org/apache/catalina/core/StandardHost.java index 6f51b01..2f561d5 100644 --- a/java/org/apache/catalina/core/StandardHost.java +++ b/java/org/apache/catalina/core/StandardHost.java @@ -41,6 +41,7 @@ import org.apache.catalina.LifecycleException; import org.apache.catalina.LifecycleListener; import org.apache.catalina.Valve; import org.apache.catalina.loader.WebappClassLoaderBase; +import org.apache.catalina.util.ContextName; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; import org.apache.tomcat.util.ExceptionUtils; @@ -687,11 +688,20 @@ public class StandardHost extends ContainerBase implements Host { @Override public void addChild(Container child) { -child.addLifecycleListener(new MemoryLeakTrackingListener()); - if (!(child instanceof Context)) throw new IllegalArgumentException (sm.getString("standardHost.notContext")); + +child.addLifecycleListener(new MemoryLeakTrackingListener()); + +// Avoid NPE for case where Context is defined in server.xml with only a +// docBase +Context context = (Context) child; +if (context.getPath() == null) { +ContextName cn = new ContextName(context.getDocBase(), true); +context.setPath(cn.getPath()); +} + super.addChild(child); } diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 7f99c9b..1636b0a 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -95,6 +95,11 @@ ArrayIndexOutOfBoundsExceptions when accessing large files via the default servlet when resource caching has been disabled. (markt) + +Avoid a NullPointerException when a Context is +defined in server.xml with a docBase but not +the optional path. (markt) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [tomcat] branch master updated: Use async by default for now
On Fri, Apr 12, 2019 at 6:15 PM wrote: > This is an automated email from the ASF dual-hosted git repository. > > remm 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 39673ee Use async by default for now > 39673ee is described below > > commit 39673eeddcfe6930ccca7ada4601720eb74157b2 > Author: remm > AuthorDate: Fri Apr 12 18:15:00 2019 +0200 > > Use async by default for now > > Goal: more testing with NIO > The testing looks fine so far so I don't plan to switch the default back at this time. The new code brings a simplified way to do non blocking frame reads, it's clearly a good capability to have. Rémy > --- > java/org/apache/tomcat/util/net/AbstractEndpoint.java | 4 ++-- > webapps/docs/changelog.xml| 8 > webapps/docs/config/http.xml | 4 ++-- > 3 files changed, 12 insertions(+), 4 deletions(-) > > diff --git a/java/org/apache/tomcat/util/net/AbstractEndpoint.java > b/java/org/apache/tomcat/util/net/AbstractEndpoint.java > index 155cabe..64be45b 100644 > --- a/java/org/apache/tomcat/util/net/AbstractEndpoint.java > +++ b/java/org/apache/tomcat/util/net/AbstractEndpoint.java > @@ -742,9 +742,9 @@ public abstract class AbstractEndpoint { > > > /** > - * Expose async IO capability. > + * Expose asynchronous IO capability. > */ > -private boolean useAsyncIO = false; > +private boolean useAsyncIO = true; > public void setUseAsyncIO(boolean useAsyncIO) { this.useAsyncIO = > useAsyncIO; } > public boolean getUseAsyncIO() { return useAsyncIO; } > > diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml > index 335568d..2542985 100644 > --- a/webapps/docs/changelog.xml > +++ b/webapps/docs/changelog.xml > @@ -45,6 +45,14 @@ >issues do not "pop up" wrt. others). > --> > > + > + > + > +The useAsyncIO boolean attribute on the Connector > element > +value now defaults to true. (remm) > + > + > + > > > > diff --git a/webapps/docs/config/http.xml b/webapps/docs/config/http.xml > index fe8ba89..9e68e39 100644 > --- a/webapps/docs/config/http.xml > +++ b/webapps/docs/config/http.xml > @@ -762,7 +762,7 @@ > > > (bool)Use this attribute to enable or disable usage of the > -asynchronous IO API. The default value is false. > +asynchronous IO API. The default value is true. > > > > @@ -906,7 +906,7 @@ > > > (bool)Use this attribute to enable or disable usage of the > -asynchronous IO API. The default value is false. > +asynchronous IO API. The default value is true. > > > > > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > >