Re: [GUMP@vmgump-vm3]: Project tomcat-trunk (in module tomcat-trunk) failed
On March 21, 2019 2:42:44 AM UTC, Bill Barker wrote: >To whom it may engage... > >This is an automated request, but not an unsolicited one. For >more information please visit http://gump.apache.org/nagged.html, >and/or contact the folk at gene...@gump.apache.org. > >Project tomcat-trunk has an issue affecting its community integration. >This issue affects 4 projects. >The current state of this project is 'Failed', with reason 'Build >Failed'. >For reference only, the following projects are affected by this: >- tomcat-trunk : Tomcat 9.x, a web server implementing the Java >Servlet 4.0, >... >- tomcat-trunk-test-apr : Tomcat 9.x, a web server implementing the >Java Servlet 4.0, >... >- tomcat-trunk-test-nio : Tomcat 9.x, a web server implementing the >Java Servlet 4.0, >... >- tomcat-trunk-test-nio2 : Tomcat 9.x, a web server implementing the >Java Servlet 4.0, >... > > >Full details are available at: >http://vmgump-vm3.apache.org/tomcat-trunk/tomcat-trunk/index.html > >That said, some information snippets are provided here. > >The following annotations (debug/informational/warning/error messages) >were provided: >-DEBUG- Dependency on bnd exists, no need to add for property >bndlib.jar. >-DEBUG- Dependency on junit exists, no need to add for property >junit.jar. >-INFO- Made directory >[/srv/gump/public/workspace/tomcat-trunk/tomcat-deps] > -INFO- Failed with reason build failed > -DEBUG- Extracted fallback artifacts from Gump Repository > > > >The following work was performed: >http://vmgump-vm3.apache.org/tomcat-trunk/tomcat-trunk/gump_work/build_tomcat-trunk_tomcat-trunk.html >Work Name: build_tomcat-trunk_tomcat-trunk (Type: Build) >Work ended in a state of : Failed >Elapsed: 21 secs >Command Line: /usr/lib/jvm/java-8-oracle/bin/java >-Djava.awt.headless=true -Dbuild.sysclasspath=only >-Dsun.zip.disableMemoryMapping=true org.apache.tools.ant.Main >-Dgump.merge=/srv/gump/public/gump/work/merge.xml >-Djunit.jar=/srv/gump/public/workspace/junit/target/junit-4.13-SNAPSHOT.jar >-Dwsdl4j-lib.jar=/srv/gump/packages/wsdl4j/wsdl4j-1.6.3.jar >-Dbase.path=/srv/gump/public/workspace/tomcat-trunk/tomcat-build-libs >-Djdt.jar=/srv/gump/packages/eclipse/plugins/R-4.7.3a-201803300640/ecj-4.7.3a.jar >-Dbndlib.jar=/srv/gump/packages/bnd/bndlib-4.0.0/biz.aQute.bndlib-4.0.0.jar >-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/target/commons-daemon-1.1.1-SNAPSHOT.jar >-Dbnd.jar=/srv/gump/packages/bnd/bnd-4.0.0/biz.aQute.bnd-4.0.0.jar >-Dsaaj-api.jar=/srv/gump/packages/saaj-api/saaj-api-1.3.5.jar >-Djaxrpc-lib.jar=/srv/gump/packages/jaxrpc/geronimo-spec-jaxrpc-1.1-rc4.jar > >[Working Directory: /srv/gump/public/workspace/tomcat-trunk] >CLASSPATH: >/usr/lib/jvm/java-8-oracle/lib/tools.jar:/srv/gump/public/workspace/tomcat-trunk/output/classes:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit4.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/junit/target/junit-4.13-SNAPSHOT.jar:/srv/gump/packages/eclipse/plugins/R-4.7.3a-201803300640/ecj-4.7.3a.jar:/srv/gump/packages/saaj-api/saaj-api-1.3.5.jar:/srv/gump/packages/jaxrpc/geronimo-spec-jaxrpc-1.1-rc4.jar:/srv/gump/packages/wsdl4j/wsdl4j-1.6.3.jar:/srv/gump/public/workspace/apache-commons/daemon/target/commons-daemon-1.1.1-SNAPSHOT.jar:/srv/gu > mp/packages/bnd/bnd-4.0.0/biz.aQute.bnd-4.0.0.jar >- >testexist: >[echo] Testing for >/srv/gump/packages/jaxrpc/geronimo-spec-jaxrpc-1.1-rc4.jar > >setproxy: > >downloadfile: > >testexist: > [echo] Testing for /srv/gump/packages/wsdl4j/wsdl4j-1.6.3.jar > >setproxy: > >downloadfile: > >build-prepare: >[delete] Deleting directory >/srv/gump/public/workspace/tomcat-trunk/output/build/temp >[mkdir] Created dir: >/srv/gump/public/workspace/tomcat-trunk/output/build/temp > >compile-prepare: > >download-validate: > >validate: > >compile: >[javac] Compiling 1706 source files to >/srv/gump/public/workspace/tomcat-trunk/output/classes >[javac] Support for javac --release has been added in Java9 ignoring it >[javac] >/srv/gump/public/workspace/tomcat-trunk/java/org/apache/jasper/compiler/JDTCompiler.java:326: >error: cannot find symbol >[javac] CompilerOptions.VERSION_11); >[javac] ^ >[javac] symbol: variable VERSION_11 >[javac] location: class CompilerOptions >[javac] >/srv/gump/public/workspace/tomcat-trunk/java/org/apache/jasper/compiler/JDTCompiler.java:387: >error: cannot find symbol >[javac] CompilerOption
[Bug 63275] New: HttpServletRequest.getContextPath does not return an URL encoded value when forwarding a request to a multibyte context
https://bz.apache.org/bugzilla/show_bug.cgi?id=63275 Bug ID: 63275 Summary: HttpServletRequest.getContextPath does not return an URL encoded value when forwarding a request to a multibyte context Product: Tomcat 9 Version: 9.0.x Hardware: PC Status: NEW Severity: major Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: cees...@solcon.nl Target Milestone: - I have prepared a setup which can be used to reproduce the scenario: https://github.com/cbos/TomcatApplicationDispatcherBug If you visit /tomcat-diagnostics東京/diagnostics it returns: requestURI=/tomcat-diagnostics%E6%9D%B1%E4%BA%AC/diagnostics requestURL=http://localhost:8080/tomcat-diagnostics%E6%9D%B1%E4%BA%AC/diagnostics contextpath=/tomcat-diagnostics%E6%9D%B1%E4%BA%AC servletpath=/diagnostics When you visit /tomcat-diagnostics東京/crosscontext/diagnostics it returns: requestURI=/tomcat-diagnostics%E6%9D%B1%E4%BA%AC/diagnostics requestURL=http://localhost:8080/tomcat-diagnostics%E6%9D%B1%E4%BA%AC/diagnostics contextpath=/tomcat-diagnostics?? servletpath=/diagnostics Contextpath is decoded, instead of encoded. According to the servletapi, getContextPath details: https://tomcat.apache.org/tomcat-9.0-doc/servletapi/javax/servlet/http/HttpServletRequest.html#getContextPath-- "The container does not decode this string." The bug for this is org.apache.catalina.core.ApplicationDispatcher#doForward Line 374: wrequest.setContextPath(context.getPath()); Should be: wrequest.setContextPath(context.getEncodedPath()); -- 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 63275] HttpServletRequest.getContextPath does not return an URL encoded value when forwarding a request to a multibyte context
https://bz.apache.org/bugzilla/show_bug.cgi?id=63275 Cees Bos changed: What|Removed |Added CC||cees...@solcon.nl OS||All -- 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
[GitHub] [tomcat] markt-asf commented on issue #149: Adding ReDoS warning/documentation to RewriteValve
markt-asf commented on issue #149: Adding ReDoS warning/documentation to RewriteValve URL: https://github.com/apache/tomcat/pull/149#issuecomment-475172395 That page is generated from this file: https://github.com/apache/tomcat/blob/master/webapps/docs/rewrite.xml 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
[GitHub] [tomcat] tcollignon commented on issue #150: Add compiler source and target support for all Java versions over 10
tcollignon commented on issue #150: Add compiler source and target support for all Java versions over 10 URL: https://github.com/apache/tomcat/pull/150#issuecomment-475179366 Hi I have update the code, and squash commit Tell me if it's ok for you thx 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
[Bug 63275] HttpServletRequest.getContextPath does not return an URL encoded value when forwarding a request to a multibyte context
https://bz.apache.org/bugzilla/show_bug.cgi?id=63275 Donald changed: What|Removed |Added CC||dkwak...@gmail.com -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GitHub] [tomcat] markt-asf commented on issue #150: Add compiler source and target support for all Java versions over 10
markt-asf commented on issue #150: Add compiler source and target support for all Java versions over 10 URL: https://github.com/apache/tomcat/pull/150#issuecomment-475197867 Hmm. If you pass "12" or "13" directly to ECJ it silently switches to the latest version it knows - currently 11. Whereas Tomcat would log a warning and switch to the minimum Java version required by the spec (Java 8 for Tomcat 9). Applying this patch would mean "12" was equivalent to "11" until ECJ supports Java 12. The silent switching makes me uneasy. I'm going to see if there is a way to get at the version actually being used. From that we could generate a suitable warning. 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
[tomcat] branch master updated: Add Java 12 and Java 13 support
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 4ee1a36 Add Java 12 and Java 13 support 4ee1a36 is described below commit 4ee1a36a221fe31cbffb70c6ebb0c94319a76350 Author: Mark Thomas AuthorDate: Thu Mar 21 12:29:43 2019 + Add Java 12 and Java 13 support If used with an ECJ version that does not support these values, a warning will be logged and the latest supported version will used. Based on a patch by Thomas Collignon. --- java/org/apache/jasper/compiler/JDTCompiler.java | 41 ++ .../jasper/resources/LocalStrings.properties | 2 ++ webapps/docs/changelog.xml | 8 + 3 files changed, 51 insertions(+) diff --git a/java/org/apache/jasper/compiler/JDTCompiler.java b/java/org/apache/jasper/compiler/JDTCompiler.java index ac97604..33955d4 100644 --- a/java/org/apache/jasper/compiler/JDTCompiler.java +++ b/java/org/apache/jasper/compiler/JDTCompiler.java @@ -324,6 +324,16 @@ public class JDTCompiler extends org.apache.jasper.compiler.Compiler { } else if(opt.equals("11")) { settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_11); +} else if(opt.equals("12")) { +// Constant not available in latest ECJ version shipped with +// Tomcat. May be supported in a snapshot build. +// This is checked against the actual version below. +settings.put(CompilerOptions.OPTION_Source, "12"); +} else if(opt.equals("13")) { +// Constant not available in latest ECJ version shipped with +// Tomcat. May be supported in a snapshot build. +// This is checked against the actual version below. +settings.put(CompilerOptions.OPTION_Source, "13"); } else { log.warn(Localizer.getMessage("jsp.warning.unknown.sourceVM", opt)); settings.put(CompilerOptions.OPTION_Source, @@ -387,6 +397,18 @@ public class JDTCompiler extends org.apache.jasper.compiler.Compiler { CompilerOptions.VERSION_11); settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_11); +} else if(opt.equals("12")) { +// Constant not available in latest ECJ version shipped with +// Tomcat. May be supported in a snapshot build. +// This is checked against the actual version below. +settings.put(CompilerOptions.OPTION_TargetPlatform, "12"); +settings.put(CompilerOptions.OPTION_Compliance, "12"); +} else if(opt.equals("13")) { +// Constant not available in latest ECJ version shipped with +// Tomcat. May be supported in a snapshot build. +// This is checked against the actual version below. +settings.put(CompilerOptions.OPTION_TargetPlatform, "13"); +settings.put(CompilerOptions.OPTION_Compliance, "13"); } else { log.warn(Localizer.getMessage("jsp.warning.unknown.targetVM", opt)); settings.put(CompilerOptions.OPTION_TargetPlatform, @@ -459,6 +481,25 @@ public class JDTCompiler extends org.apache.jasper.compiler.Compiler { compilationUnits[i] = new CompilationUnit(fileNames[i], className); } CompilerOptions cOptions = new CompilerOptions(settings); + +// Check source/target JDK versions as the newest versions are allowed +// in Tomcat configuration but may not be supported by the ECJ version +// being used. +String requestedSource = ctxt.getOptions().getCompilerSourceVM(); +if (requestedSource != null) { +String actualSource = CompilerOptions.versionFromJdkLevel(cOptions.sourceLevel); +if (!requestedSource.equals(actualSource)) { + log.warn(Localizer.getMessage("jsp.warning.unsupported.sourceVM", requestedSource, actualSource)); +} +} +String requestedTarget = ctxt.getOptions().getCompilerTargetVM(); +if (requestedTarget != null) { +String actualTarget = CompilerOptions.versionFromJdkLevel(cOptions.targetJDK); +if (!requestedTarget.equals(actualTarget)) { + log.warn(Localizer.getMessage("jsp.warning.unsupported.targetVM", requestedTarget, actualTarget)); +} +} + cOptions.parseLiteralExpressionsAsConstants = true; Compiler compiler = new Compiler(env, policy, diff --git a/java/org/apache/jasper/resources/LocalStrings.properties b/java/org/apache/jasper/
[tomcat] branch 8.5.x updated: Add Java 12 and Java 13 support
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 e6ddec2 Add Java 12 and Java 13 support e6ddec2 is described below commit e6ddec25eaaf24d87e40cb59eb01f26388ccaf5c Author: Mark Thomas AuthorDate: Thu Mar 21 12:29:43 2019 + Add Java 12 and Java 13 support If used with an ECJ version that does not support these values, a warning will be logged and the latest supported version will used. Based on a patch by Thomas Collignon. --- java/org/apache/jasper/compiler/JDTCompiler.java | 57 +++--- .../jasper/resources/LocalStrings.properties | 4 ++ webapps/docs/changelog.xml | 8 +++ 3 files changed, 63 insertions(+), 6 deletions(-) diff --git a/java/org/apache/jasper/compiler/JDTCompiler.java b/java/org/apache/jasper/compiler/JDTCompiler.java index 6e20eed..4950f3f 100644 --- a/java/org/apache/jasper/compiler/JDTCompiler.java +++ b/java/org/apache/jasper/compiler/JDTCompiler.java @@ -346,14 +346,26 @@ public class JDTCompiler extends org.apache.jasper.compiler.Compiler { JDT_JAVA_9_VERSION); } else if(opt.equals("10")) { // Constant not available in latest ECJ version that runs on -// Java 7 +// Java 7. +// This is checked against the actual version below. settings.put(CompilerOptions.OPTION_Source, "10"); } else if(opt.equals("11")) { // Constant not available in latest ECJ version that runs on -// Java 7 +// Java 7. +// This is checked against the actual version below. settings.put(CompilerOptions.OPTION_Source, "11"); +} else if(opt.equals("12")) { +// Constant not available in latest available ECJ version. +// May be supported in a snapshot build. +// This is checked against the actual version below. +settings.put(CompilerOptions.OPTION_Source, "12"); +} else if(opt.equals("13")) { +// Constant not available in latest available ECJ version. +// May be supported in a snapshot build. +// This is checked against the actual version below. +settings.put(CompilerOptions.OPTION_Source, "13"); } else { -log.warn("Unknown source VM " + opt + " ignored."); +log.warn(Localizer.getMessage("jsp.warning.unknown.sourceVM", opt)); settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_7); } @@ -405,16 +417,30 @@ public class JDTCompiler extends org.apache.jasper.compiler.Compiler { JDT_JAVA_9_VERSION); } else if(opt.equals("10")) { // Constant not available in latest ECJ version that runs on -// Java 7 +// Java 7. +// This is checked against the actual version below. settings.put(CompilerOptions.OPTION_TargetPlatform, "10"); settings.put(CompilerOptions.OPTION_Compliance, "10"); } else if(opt.equals("11")) { // Constant not available in latest ECJ version that runs on -// Java 7 +// Java 7. +// This is checked against the actual version below. settings.put(CompilerOptions.OPTION_TargetPlatform, "11"); settings.put(CompilerOptions.OPTION_Compliance, "11"); +} else if(opt.equals("12")) { +// Constant not available in latest available ECJ version. +// May be supported in a snapshot build. +// This is checked against the actual version below. +settings.put(CompilerOptions.OPTION_TargetPlatform, "12"); +settings.put(CompilerOptions.OPTION_Compliance, "12"); +} else if(opt.equals("13")) { +// Constant not available in latest available ECJ version. +// May be supported in a snapshot build. +// This is checked against the actual version below. +settings.put(CompilerOptions.OPTION_TargetPlatform, "13"); +settings.put(CompilerOptions.OPTION_Compliance, "13"); } else { -log.warn("Unknown target VM " + opt + " ignored."); +log.warn(Localizer.getMessage("jsp.warning.unknown.targetVM", opt)); settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_7); } @@ -485,6 +511,25 @@ public class JDTCompiler extends org.apache.jasper.compiler.
[tomcat] branch 7.0.x updated: Add Java 12 and Java 13 support
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 d3a79b7 Add Java 12 and Java 13 support d3a79b7 is described below commit d3a79b7c5f041efa71c6c3b35ab9ecf7a70b4e99 Author: Mark Thomas AuthorDate: Thu Mar 21 12:29:43 2019 + Add Java 12 and Java 13 support If used with an ECJ version that does not support these values, a warning will be logged and the latest supported version will used. Based on a patch by Thomas Collignon. --- java/org/apache/jasper/compiler/JDTCompiler.java | 57 +++--- .../jasper/resources/LocalStrings.properties | 4 ++ webapps/docs/changelog.xml | 8 +++ 3 files changed, 63 insertions(+), 6 deletions(-) diff --git a/java/org/apache/jasper/compiler/JDTCompiler.java b/java/org/apache/jasper/compiler/JDTCompiler.java index 5f1d07a..8124bd0 100644 --- a/java/org/apache/jasper/compiler/JDTCompiler.java +++ b/java/org/apache/jasper/compiler/JDTCompiler.java @@ -377,14 +377,26 @@ public class JDTCompiler extends org.apache.jasper.compiler.Compiler { JDT_JAVA_9_VERSION); } else if(opt.equals("10")) { // Constant not available in latest ECJ version that runs on -// Java 7 +// Java 6. +// This is checked against the actual version below. settings.put(CompilerOptions.OPTION_Source, "10"); } else if(opt.equals("11")) { // Constant not available in latest ECJ version that runs on -// Java 7 +// Java 6. +// This is checked against the actual version below. settings.put(CompilerOptions.OPTION_Source, "11"); +} else if(opt.equals("12")) { +// Constant not available in latest available ECJ version. +// May be supported in a snapshot build. +// This is checked against the actual version below. +settings.put(CompilerOptions.OPTION_Source, "12"); +} else if(opt.equals("13")) { +// Constant not available in latest available ECJ version. +// May be supported in a snapshot build. +// This is checked against the actual version below. +settings.put(CompilerOptions.OPTION_Source, "13"); } else { -log.warn("Unknown source VM " + opt + " ignored."); +log.warn(Localizer.getMessage("jsp.warning.unknown.sourceVM", opt)); settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_6); } @@ -436,16 +448,30 @@ public class JDTCompiler extends org.apache.jasper.compiler.Compiler { JDT_JAVA_9_VERSION); } else if(opt.equals("10")) { // Constant not available in latest ECJ version that runs on -// Java 7 +// Java 6. +// This is checked against the actual version below. settings.put(CompilerOptions.OPTION_TargetPlatform, "10"); settings.put(CompilerOptions.OPTION_Compliance, "10"); } else if(opt.equals("11")) { // Constant not available in latest ECJ version that runs on -// Java 7 +// Java 6. +// This is checked against the actual version below. settings.put(CompilerOptions.OPTION_TargetPlatform, "11"); settings.put(CompilerOptions.OPTION_Compliance, "11"); +} else if(opt.equals("12")) { +// Constant not available in latest available ECJ version. +// May be supported in a snapshot build. +// This is checked against the actual version below. +settings.put(CompilerOptions.OPTION_TargetPlatform, "12"); +settings.put(CompilerOptions.OPTION_Compliance, "12"); +} else if(opt.equals("13")) { +// Constant not available in latest available ECJ version. +// May be supported in a snapshot build. +// This is checked against the actual version below. +settings.put(CompilerOptions.OPTION_TargetPlatform, "13"); +settings.put(CompilerOptions.OPTION_Compliance, "13"); } else { -log.warn("Unknown target VM " + opt + " ignored."); +log.warn(Localizer.getMessage("jsp.warning.unknown.targetVM", opt)); settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_6); } @@ -526,6 +552,25 @@ public class JDTCompiler extends org.apache.jasper.compiler.
[GitHub] [tomcat] markt-asf commented on issue #150: Add compiler source and target support for all Java versions over 10
markt-asf commented on issue #150: Add compiler source and target support for all Java versions over 10 URL: https://github.com/apache/tomcat/pull/150#issuecomment-475214511 Thanks. I took your patch and extended to cover Java 13 as well and added a check to log a warning if an unsupported version was used and ECJ fell back to the latest. 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
[GitHub] [tomcat] markt-asf closed pull request #150: Add compiler source and target support for all Java versions over 10
markt-asf closed pull request #150: Add compiler source and target support for all Java versions over 10 URL: https://github.com/apache/tomcat/pull/150 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
[GitHub] [tomcat] tcollignon commented on issue #150: Add compiler source and target support for all Java versions over 10
tcollignon commented on issue #150: Add compiler source and target support for all Java versions over 10 URL: https://github.com/apache/tomcat/pull/150#issuecomment-475233025 Nice, thx you a lot @markt-asf 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
[tomcat] branch master updated: https://bz.apache.org/bugzilla/show_bug.cgi?id=63275 enc getContextPath
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 4f1b667 https://bz.apache.org/bugzilla/show_bug.cgi?id=63275 enc getContextPath 4f1b667 is described below commit 4f1b667f15e6ed46d8704687dab5da73e7404552 Author: Mark Thomas AuthorDate: Thu Mar 21 14:46:14 2019 + https://bz.apache.org/bugzilla/show_bug.cgi?id=63275 enc getContextPath When using a RequestDispatcher ensure that HttpServletRequest.getContextPath() returns an encoded path in the dispatched request. --- java/org/apache/catalina/core/ApplicationDispatcher.java | 4 ++-- .../core/TestApplicationContextGetRequestDispatcher.java | 11 --- webapps/docs/changelog.xml| 5 + 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/java/org/apache/catalina/core/ApplicationDispatcher.java b/java/org/apache/catalina/core/ApplicationDispatcher.java index cbaa808..522e4a7 100644 --- a/java/org/apache/catalina/core/ApplicationDispatcher.java +++ b/java/org/apache/catalina/core/ApplicationDispatcher.java @@ -371,7 +371,7 @@ final class ApplicationDispatcher implements AsyncDispatcher, RequestDispatcher wrequest.setAttribute(RequestDispatcher.FORWARD_MAPPING, hrequest.getHttpServletMapping()); } -wrequest.setContextPath(context.getPath()); +wrequest.setContextPath(context.getEncodedPath()); wrequest.setRequestURI(requestURI); wrequest.setServletPath(servletPath); wrequest.setPathInfo(pathInfo); @@ -618,7 +618,7 @@ final class ApplicationDispatcher implements AsyncDispatcher, RequestDispatcher wrequest.setAttribute(Globals.DISPATCHER_REQUEST_PATH_ATTR, getCombinedPath()); wrequest.setAttribute(AsyncContext.ASYNC_MAPPING, hrequest.getHttpServletMapping()); -wrequest.setContextPath(context.getPath()); +wrequest.setContextPath(context.getEncodedPath()); wrequest.setRequestURI(requestURI); wrequest.setServletPath(servletPath); wrequest.setPathInfo(pathInfo); diff --git a/test/org/apache/catalina/core/TestApplicationContextGetRequestDispatcher.java b/test/org/apache/catalina/core/TestApplicationContextGetRequestDispatcher.java index e75e87c..c83f95f 100644 --- a/test/org/apache/catalina/core/TestApplicationContextGetRequestDispatcher.java +++ b/test/org/apache/catalina/core/TestApplicationContextGetRequestDispatcher.java @@ -375,7 +375,7 @@ public class TestApplicationContextGetRequestDispatcher extends TomcatBaseTest { Tomcat tomcat = getTomcatInstance(); // No file system docBase required -Context ctx = tomcat.addContext("/test", null); +Context ctx = tomcat.addContext("/test\u6771\u4eac", null); ctx.setDispatchersUseEncodedPaths(useEncodedDispatchPaths); // Add a default servlet to return 404 for not found resources @@ -400,7 +400,7 @@ public class TestApplicationContextGetRequestDispatcher extends TomcatBaseTest { StringBuilder url = new StringBuilder("http://localhost:";); url.append(getPort()); -url.append("/test"); +url.append("/test%E6%9D%B1%E4%BA%AC"); url.append(startPath); if (startQueryString != null) { url.append('?'); @@ -467,7 +467,12 @@ public class TestApplicationContextGetRequestDispatcher extends TomcatBaseTest { throws ServletException, IOException { resp.setContentType("text/plain"); resp.setCharacterEncoding("UTF-8"); -resp.getWriter().print(OK); +String contextPath = req.getContextPath(); +if ("/test%E6%9D%B1%E4%BA%AC".equals(contextPath)) { +resp.getWriter().print(OK); +} else { +resp.getWriter().print("FAIL - ContextPath"); +} String qs = req.getQueryString(); if (qs != null) { resp.getWriter().print(qs); diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 6507864..b49a62c 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -74,6 +74,11 @@ href="https://bugs.openjdk.java.net/browse/JDK-8194653";>JDK-8194653) that may cause a dead-lock when Tomcat starts. (markt) + +63275: When using a RequestDispatcher ensure +that HttpServletRequest.getContextPath() returns an encoded +path in the dispatched request. (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: https://bz.apache.org/bugzilla/show_bug.cgi?id=63275 enc getContextPath
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 28d7d14 https://bz.apache.org/bugzilla/show_bug.cgi?id=63275 enc getContextPath 28d7d14 is described below commit 28d7d143cb9f69982db72b5a648f007b1fa138cb Author: Mark Thomas AuthorDate: Thu Mar 21 14:46:14 2019 + https://bz.apache.org/bugzilla/show_bug.cgi?id=63275 enc getContextPath When using a RequestDispatcher ensure that HttpServletRequest.getContextPath() returns an encoded path in the dispatched request. --- java/org/apache/catalina/core/ApplicationDispatcher.java | 4 ++-- .../core/TestApplicationContextGetRequestDispatcher.java | 11 --- webapps/docs/changelog.xml| 5 + 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/java/org/apache/catalina/core/ApplicationDispatcher.java b/java/org/apache/catalina/core/ApplicationDispatcher.java index fd91356..9bafe6f 100644 --- a/java/org/apache/catalina/core/ApplicationDispatcher.java +++ b/java/org/apache/catalina/core/ApplicationDispatcher.java @@ -382,7 +382,7 @@ final class ApplicationDispatcher implements AsyncDispatcher, RequestDispatcher wrequest.setAttribute(FORWARD_MAPPING, mapping); } -wrequest.setContextPath(context.getPath()); +wrequest.setContextPath(context.getEncodedPath()); wrequest.setRequestURI(requestURI); wrequest.setServletPath(servletPath); wrequest.setPathInfo(pathInfo); @@ -636,7 +636,7 @@ final class ApplicationDispatcher implements AsyncDispatcher, RequestDispatcher } wrequest.setAttribute(ASYNC_MAPPING, mapping); -wrequest.setContextPath(context.getPath()); +wrequest.setContextPath(context.getEncodedPath()); wrequest.setRequestURI(requestURI); wrequest.setServletPath(servletPath); wrequest.setPathInfo(pathInfo); diff --git a/test/org/apache/catalina/core/TestApplicationContextGetRequestDispatcher.java b/test/org/apache/catalina/core/TestApplicationContextGetRequestDispatcher.java index db627fb..b5c6e0c 100644 --- a/test/org/apache/catalina/core/TestApplicationContextGetRequestDispatcher.java +++ b/test/org/apache/catalina/core/TestApplicationContextGetRequestDispatcher.java @@ -375,7 +375,7 @@ public class TestApplicationContextGetRequestDispatcher extends TomcatBaseTest { Tomcat tomcat = getTomcatInstance(); // No file system docBase required -Context ctx = tomcat.addContext("/test", null); +Context ctx = tomcat.addContext("/test\u6771\u4eac", null); ctx.setDispatchersUseEncodedPaths(useEncodedDispatchPaths); // Add a default servlet to return 404 for not found resources @@ -400,7 +400,7 @@ public class TestApplicationContextGetRequestDispatcher extends TomcatBaseTest { StringBuilder url = new StringBuilder("http://localhost:";); url.append(getPort()); -url.append("/test"); +url.append("/test%E6%9D%B1%E4%BA%AC"); url.append(startPath); if (startQueryString != null) { url.append('?'); @@ -467,7 +467,12 @@ public class TestApplicationContextGetRequestDispatcher extends TomcatBaseTest { throws ServletException, IOException { resp.setContentType("text/plain"); resp.setCharacterEncoding("UTF-8"); -resp.getWriter().print(OK); +String contextPath = req.getContextPath(); +if ("/test%E6%9D%B1%E4%BA%AC".equals(contextPath)) { +resp.getWriter().print(OK); +} else { +resp.getWriter().print("FAIL - ContextPath"); +} String qs = req.getQueryString(); if (qs != null) { resp.getWriter().print(qs); diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index c7b8cdd..0fce5c0 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -74,6 +74,11 @@ href="https://bugs.openjdk.java.net/browse/JDK-8194653";>JDK-8194653) that may cause a dead-lock when Tomcat starts. (markt) + +63275: When using a RequestDispatcher ensure +that HttpServletRequest.getContextPath() returns an encoded +path in the dispatched request. (markt) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GitHub] [tomcat] salgattas commented on issue #149: Adding ReDoS warning/documentation to RewriteValve
salgattas commented on issue #149: Adding ReDoS warning/documentation to RewriteValve URL: https://github.com/apache/tomcat/pull/149#issuecomment-475322775 Great, thanks. I just included a statement for the documentation in there as well. 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
[tomcat] branch 7.0.x updated: https://bz.apache.org/bugzilla/show_bug.cgi?id=63275 enc getContextPath
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 4d571d6 https://bz.apache.org/bugzilla/show_bug.cgi?id=63275 enc getContextPath 4d571d6 is described below commit 4d571d6897131f533a3e3ac41ccaebcde3768720 Author: Mark Thomas AuthorDate: Thu Mar 21 14:46:14 2019 + https://bz.apache.org/bugzilla/show_bug.cgi?id=63275 enc getContextPath When using a RequestDispatcher ensure that HttpServletRequest.getContextPath() returns an encoded path in the dispatched request. --- .../catalina/core/ApplicationDispatcher.java | 71 +++--- ...TestApplicationContextGetRequestDispatcher.java | 14 - webapps/docs/changelog.xml | 5 ++ 3 files changed, 51 insertions(+), 39 deletions(-) diff --git a/java/org/apache/catalina/core/ApplicationDispatcher.java b/java/org/apache/catalina/core/ApplicationDispatcher.java index 49acfd6..8e2bfac 100644 --- a/java/org/apache/catalina/core/ApplicationDispatcher.java +++ b/java/org/apache/catalina/core/ApplicationDispatcher.java @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -70,7 +70,7 @@ final class ApplicationDispatcher implements AsyncDispatcher, RequestDispatcher static { STRICT_SERVLET_COMPLIANCE = Globals.STRICT_SERVLET_COMPLIANCE; - + String wrapSameObject = System.getProperty( "org.apache.catalina.core.ApplicationDispatcher.WRAP_SAME_OBJECT"); if (wrapSameObject == null) { @@ -156,7 +156,7 @@ final class ApplicationDispatcher implements AsyncDispatcher, RequestDispatcher * The outermost response that will be passed on to the invoked servlet. */ ServletResponse outerResponse = null; - + /** * The request wrapper we have created and installed (if any). */ @@ -167,7 +167,7 @@ final class ApplicationDispatcher implements AsyncDispatcher, RequestDispatcher * The response wrapper we have created and installed (if any). */ ServletResponse wrapResponse = null; - + /** * Are we performing an include() instead of a forward()? */ @@ -341,7 +341,7 @@ final class ApplicationDispatcher implements AsyncDispatcher, RequestDispatcher private void doForward(ServletRequest request, ServletResponse response) throws ServletException, IOException { - + // Reset any output that has been buffered, but keep headers/cookies if (response.isCommitted()) { throw new IllegalStateException @@ -382,7 +382,6 @@ final class ApplicationDispatcher implements AsyncDispatcher, RequestDispatcher ApplicationHttpRequest wrequest = (ApplicationHttpRequest) wrapRequest(state); -String contextPath = context.getPath(); HttpServletRequest hrequest = state.hrequest; if (hrequest.getAttribute( RequestDispatcher.FORWARD_REQUEST_URI) == null) { @@ -397,8 +396,8 @@ final class ApplicationDispatcher implements AsyncDispatcher, RequestDispatcher wrequest.setAttribute(RequestDispatcher.FORWARD_QUERY_STRING, hrequest.getQueryString()); } - -wrequest.setContextPath(contextPath); + +wrequest.setContextPath(context.getEncodedPath()); wrequest.setRequestURI(requestURI); wrequest.setServletPath(servletPath); wrequest.setPathInfo(pathInfo); @@ -424,9 +423,9 @@ final class ApplicationDispatcher implements AsyncDispatcher, RequestDispatcher ((ResponseFacade) response).finish(); } else { // Servlet SRV.6.2.2. The Request/Response may have been wrapped -// and may no longer be instance of RequestFacade +// and may no longer be instance of RequestFacade if (wrapper.getLogger().isDebugEnabled()){ -wrapper.getLogger().debug( " The Response is vehiculed using a wrapper: " +wrapper.getLogger().debug( " The Response is vehiculed using a wrapper: " + response.getClass().getName() ); } @@ -450,7 +449,7 @@ final class ApplicationDispatcher implements AsyncDispatcher, RequestDispatcher } -
[Bug 63275] HttpServletRequest.getContextPath does not return an URL encoded value when forwarding a request to a multibyte context
https://bz.apache.org/bugzilla/show_bug.cgi?id=63275 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #1 from Mark Thomas --- Thanks for the report. I was able to reproduce this by modifying one of our existing test cases. Fixed in: - master for 9.0.18 onwards - 8.5.x for 8.5.40 onwards - 7.0.x for 7.0.94 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
Re: Tomcat 7, Checkstyle and Gump
On 20/03/2019 22:51, Mark Thomas wrote: > Something is going to have to give: > > Tomcat 7.0.x needs to build with Java 6. > - The last version of Checkstyle to run on Java 6 is 6.1.1 > > Gump uses the latest snapshot build of checkstyle > - currently 8.19-SNAPSHOT > > Checkstyle 6.1.1 expects cacheFile to be configured under the TreeWalker > > Checkstyle moved cacheFile to Checker in 6.16 as a breaking change > > Checkstyle finally cacheFile from TreeWalker a few days ago > > Checkstyle fails if the configuration is invalid. > > I can't see a way to have the build work with Checkstyle when building > locally with Java 6 and on Gump. > > Currently validate works on Gump but fails locally. > > I was thinking about running the validate task with Checkstyle 6.16 or > later under Java 7 but I don't see an obvious way to do that. It is > probably possible via an exec task or similar. > > Any suggestions? Of course: https://github.com/rnveach/checkstyle-backport-jre6 I'll switch Tomcat 7 to use this shortly. Gump can carry on using standard Checkstyle. Mark - 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: Switch to Checkstyle JRE6 backport
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 2934d5f Switch to Checkstyle JRE6 backport 2934d5f is described below commit 2934d5f5da9db93de4432e0a2e4b80dc168104a0 Author: Mark Thomas AuthorDate: Thu Mar 21 19:44:24 2019 + Switch to Checkstyle JRE6 backport Allows Gump (using latest snapshot) and local Java 6 build to use the same Checkstyle configuration file. --- build.properties.default | 15 +++ webapps/docs/changelog.xml | 6 ++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/build.properties.default b/build.properties.default index 9eaa9af..f8782c3 100644 --- a/build.properties.default +++ b/build.properties.default @@ -83,6 +83,9 @@ base-maven.loc=https://repo.maven.apache.org/maven2 # Mirror, was used when there were problems with the main SF downloads site # base-sf.loc=https://sunet.dl.sourceforge.net +# checkstyle-backport-jre6 +base-checkstyle.loc=https://rnveach.github.io/checkstyle-backport-jre6/maven2 + # - Commons Logging, version 1.1 or later - # If this version is updated, check the versions required for the dependencies below # - avalon-framework @@ -272,14 +275,18 @@ objenesis.jar=${objenesis.home}/objenesis-${objenesis.version}.jar # - Checkstyle, version 6.0 or later - # Limited to 6.1.1 since that is the latest release that supports Java 6 -checkstyle.version=6.1.1 +# Gump uses the latest checkstyle and the configuration format is incompatible +# between the latest version and 6.1.1 +# Therefore, use checkstyle-backport-jre6 +checkstyle.version=8.17 checkstyle.checksum.enabled=true checkstyle.checksum.algorithm=MD5|SHA-1 -checkstyle.checksum.value=bfbbd909c0b9c6724434421a202e0912|aeb92ff49b80c958fd29f5e8f349f8b5fd4342bd -checkstyle.home=${base.path}/checkstyle-${checkstyle.version} -checkstyle.loc=${base-sf.loc}/checkstyle/checkstyle/${checkstyle.version}/checkstyle-${checkstyle.version}-all.jar +checkstyle.checksum.value=e268f16a5cab5b291546fae909e3f9b3|b626c3e518f315faf860b521807c31a03c9e2d8a +checkstyle.home=${base.path}/checkstyle-backport-jre6-${checkstyle.version} +checkstyle.loc=${base-checkstyle.loc}/com/puppycrawl/tools/checkstyle-backport-jre6/${checkstyle.version}/checkstyle-backport-jre6-${checkstyle.version}-all.jar checkstyle.jar=${checkstyle.home}/checkstyle-${checkstyle.version}-all.jar + # - JSON Libraries (for bayeux module) - json-lib.home=${base.path}/json-20080701 json-lib.lib=http://repo1.maven.org/maven2/org/json/json/20080701/json-20080701.jar diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 79d78b3..0499770 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -181,6 +181,12 @@ Add JDBC 4.1 support to the default database connection pool provided by Tomcat. (markt) + +Switch from Checkstyle to the JRE6 backport and update to version 8.17. +This allows Tomcat 7 to use the newer configuration format (required by +Gump that uses the latest Checkstyle snapshot) while still building with +Java 6. (markt) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 63275] HttpServletRequest.getContextPath does not return an URL encoded value when forwarding a request to a multibyte context
https://bz.apache.org/bugzilla/show_bug.cgi?id=63275 --- Comment #2 from Cees Bos --- @Mark, thanks for the quick fix! -- 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