[tomcat] branch master updated: Use consistent mark-up when electing to use the CDDL license

2019-05-31 Thread markt
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 4f807ee  Use consistent mark-up when electing to use the CDDL license
4f807ee is described below

commit 4f807eea552981d36a8bb30a73aee7efb049ca6e
Author: Mark Thomas 
AuthorDate: Fri May 31 22:20:55 2019 +0100

Use consistent mark-up when electing to use the CDDL license
---
 java/javax/servlet/resources/javaee_8.xsd  |  6 ++-
 .../servlet/resources/javaee_web_services_1_4.xsd  | 30 ++-
 .../resources/javaee_web_services_client_1_4.xsd   | 58 --
 java/javax/servlet/resources/web-app_4_0.xsd   |  6 ++-
 java/javax/servlet/resources/web-common_4_0.xsd|  6 ++-
 java/javax/servlet/resources/web-fragment_4_0.xsd  |  6 ++-
 6 files changed, 68 insertions(+), 44 deletions(-)

diff --git a/java/javax/servlet/resources/javaee_8.xsd 
b/java/javax/servlet/resources/javaee_8.xsd
index 8346758..f071a06 100644
--- a/java/javax/servlet/resources/javaee_8.xsd
+++ b/java/javax/servlet/resources/javaee_8.xsd
@@ -46,9 +46,13 @@
   only if the new code is made subject to such option by the copyright
   holder.
 
+
+  
+
+  
+
   The Apache Software Foundation elects to include this software under the
   CDDL license.
-
 
   
 
diff --git a/java/javax/servlet/resources/javaee_web_services_1_4.xsd 
b/java/javax/servlet/resources/javaee_web_services_1_4.xsd
index 34e7219..e32c5b7 100644
--- a/java/javax/servlet/resources/javaee_web_services_1_4.xsd
+++ b/java/javax/servlet/resources/javaee_web_services_1_4.xsd
@@ -47,9 +47,13 @@
   only if the new code is made subject to such option by the copyright
   holder.
 
+
+  
+
+  
+
   The Apache Software Foundation elects to include this software under the
   CDDL license.
-
 
   
 
@@ -348,7 +352,7 @@
   
 
 
-   To be used with JAX-RPC based runtime only.
+  To be used with JAX-RPC based runtime only.
 
 
   
@@ -360,7 +364,7 @@
   
 
 
-   To be used with JAX-WS based runtime only.
+  To be used with JAX-WS based runtime only.
 
 
   
@@ -489,7 +493,7 @@
   
 
 The jaxrpc-mapping-file element contains the name of a file that
-describes the JAX-RPC mapping between the Java interaces used by
+describes the JAX-RPC mapping between the Java interfaces used by
 the application and the WSDL description in the wsdl-file.  The
 file name is a relative path within the module.
 
@@ -534,17 +538,17 @@
   
 
   

[tomcat] branch 7.0.x updated: Align 7.0.x with 8.5.x. No functional change.

2019-05-31 Thread markt
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 ff2f0b0  Align 7.0.x with 8.5.x. No functional change.
ff2f0b0 is described below

commit ff2f0b0c36c99a821e92fd828da1dab969dd5d13
Author: Mark Thomas 
AuthorDate: Fri May 31 22:06:24 2019 +0100

Align 7.0.x with 8.5.x. No functional change.
---
 .../javax/servlet/jsp/tagext/SimpleTagSupport.java |  9 +++---
 java/javax/servlet/jsp/tagext/TagAdapter.java  |  2 +-
 java/javax/servlet/jsp/tagext/TagInfo.java | 34 ++
 java/javax/servlet/jsp/tagext/VariableInfo.java|  7 +++--
 4 files changed, 31 insertions(+), 21 deletions(-)

diff --git a/java/javax/servlet/jsp/tagext/SimpleTagSupport.java 
b/java/javax/servlet/jsp/tagext/SimpleTagSupport.java
index 4cbadf7..496ba95 100644
--- a/java/javax/servlet/jsp/tagext/SimpleTagSupport.java
+++ b/java/javax/servlet/jsp/tagext/SimpleTagSupport.java
@@ -184,9 +184,8 @@ public class SimpleTagSupport implements SimpleTag {
 {
 boolean isInterface = false;
 
-if (from == null || klass == null
-|| (!JspTag.class.isAssignableFrom(klass)
-&& !(isInterface = klass.isInterface( {
+if (from == null || klass == null || 
(!JspTag.class.isAssignableFrom(klass) &&
+!(isInterface = klass.isInterface( {
 return null;
 }
 
@@ -206,8 +205,8 @@ public class SimpleTagSupport implements SimpleTag {
 parent = ((TagAdapter) parent).getAdaptee();
 }
 
-if ((isInterface && klass.isInstance(parent))
-|| klass.isAssignableFrom(parent.getClass())) {
+if ((isInterface && klass.isInstance(parent)) ||
+klass.isAssignableFrom(parent.getClass())) {
 return parent;
 }
 
diff --git a/java/javax/servlet/jsp/tagext/TagAdapter.java 
b/java/javax/servlet/jsp/tagext/TagAdapter.java
index 1ae8bb8..aedc16d 100644
--- a/java/javax/servlet/jsp/tagext/TagAdapter.java
+++ b/java/javax/servlet/jsp/tagext/TagAdapter.java
@@ -34,7 +34,7 @@ import javax.servlet.jsp.PageContext;
  */
 public class TagAdapter implements Tag {
 /** The simple tag that's being adapted. */
-private SimpleTag simpleTagAdaptee;
+private final SimpleTag simpleTagAdaptee;
 
 /** The parent, of this tag, converted (if necessary) to be of type Tag. */
 private Tag parent;
diff --git a/java/javax/servlet/jsp/tagext/TagInfo.java 
b/java/javax/servlet/jsp/tagext/TagInfo.java
index 8c8784e..6183cf7 100644
--- a/java/javax/servlet/jsp/tagext/TagInfo.java
+++ b/java/javax/servlet/jsp/tagext/TagInfo.java
@@ -90,6 +90,13 @@ public class TagInfo {
 this.tagExtraInfo  = tagExtraInfo;
 this.attributeInfo = attributeInfo;
 
+// Use defaults for unspecified values
+this.displayName = null;
+this.largeIcon = null;
+this.smallIcon = null;
+this.tagVariableInfo = null;
+this.dynamicAttributes = false;
+
 if (tagExtraInfo != null)
 tagExtraInfo.setTagInfo(this);
 }
@@ -141,6 +148,9 @@ public class TagInfo {
 this.largeIcon = largeIcon;
 this.tagVariableInfo = tvi;
 
+// Use defaults for unspecified values
+this.dynamicAttributes = false;
+
 if (tagExtraInfo != null)
 tagExtraInfo.setTagInfo(this);
 }
@@ -424,24 +434,24 @@ public class TagInfo {
 /*
  * private fields for 1.1 info
  */
-private String tagName; // the name of the tag
-private String tagClassName;
-private String bodyContent;
-private String infoString;
-private TagLibraryInfo tagLibrary;
-private TagExtraInfo   tagExtraInfo; // instance of TagExtraInfo
-private TagAttributeInfo[] attributeInfo;
+private final String tagName; // the name of the tag
+private final String tagClassName;
+private final String bodyContent;
+private final String infoString;
+private TagLibraryInfo   tagLibrary;
+private TagExtraInfo tagExtraInfo; // instance of TagExtraInfo
+private final TagAttributeInfo[] attributeInfo;
 
 /*
  * private fields for 1.2 info
  */
-private String displayName;
-private String smallIcon;
-private String largeIcon;
-private TagVariableInfo[]  tagVariableInfo;
+private final String displayName;
+private final String smallIcon;
+private final String largeIcon;
+private final TagVariableInfo[]  tagVariableInfo;
 
 /*
  * Additional private fields for 2.0 info
  */
-private boolean dynamicAttributes;
+priva

[tomcat] 02/02: Align checkstyle config with 8.5.x and fix resulting warnings

2019-05-31 Thread markt
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

commit 46a7a536e10efcf4d0331353f52f8579ca6da819
Author: Mark Thomas 
AuthorDate: Fri May 31 21:49:49 2019 +0100

Align checkstyle config with 8.5.x and fix resulting warnings

All warnings were "Avoid nested blocks". Took the opportunity to
back-port additional clean-up such as improving Javadoc and removing
unecessary null checks when comparing 7.0.x to 8.5.x.
---
 java/org/apache/catalina/ha/ClusterRuleSet.java| 148 ++---
 .../apache/catalina/manager/util/SessionUtils.java |  98 +++---
 java/org/apache/catalina/util/Base64.java  |  40 +++---
 res/checkstyle/checkstyle.xml  |  26 ++--
 .../apache/catalina/filters/TestExpiresFilter.java | 144 +---
 test/org/apache/juli/TestDateFormatCache.java  |  12 +-
 6 files changed, 216 insertions(+), 252 deletions(-)

diff --git a/java/org/apache/catalina/ha/ClusterRuleSet.java 
b/java/org/apache/catalina/ha/ClusterRuleSet.java
index 0335bcc..088a106 100644
--- a/java/org/apache/catalina/ha/ClusterRuleSet.java
+++ b/java/org/apache/catalina/ha/ClusterRuleSet.java
@@ -110,80 +110,80 @@ public class ClusterRuleSet extends RuleSetBase {
 
 
 String channelPrefix = prefix + "Channel/";
-{ //channel properties
-digester.addObjectCreate(channelPrefix + "Membership",
- null, // MUST be specified in the element
- "className");
-digester.addSetProperties(channelPrefix + "Membership");
-digester.addSetNext(channelPrefix + "Membership",
-"setMembershipService",
-
"org.apache.catalina.tribes.MembershipService");
-
-digester.addObjectCreate(channelPrefix + "MembershipListener",
- null, // MUST be specified in the element
- "className");
-digester.addSetProperties(channelPrefix + "MembershipListener");
-digester.addSetNext(channelPrefix + "MembershipListener",
-"addMembershipListener",
-
"org.apache.catalina.tribes.MembershipListener");
-
-digester.addObjectCreate(channelPrefix + "Sender",
- null, // MUST be specified in the element
- "className");
-digester.addSetProperties(channelPrefix + "Sender");
-digester.addSetNext(channelPrefix + "Sender",
-"setChannelSender",
-"org.apache.catalina.tribes.ChannelSender");
-
-digester.addObjectCreate(channelPrefix + "Sender/Transport",
- null, // MUST be specified in the element
- "className");
-digester.addSetProperties(channelPrefix + "Sender/Transport");
-digester.addSetNext(channelPrefix + "Sender/Transport",
-"setTransport",
-
"org.apache.catalina.tribes.transport.MultiPointSender");
-
-
-digester.addObjectCreate(channelPrefix + "Receiver",
- null, // MUST be specified in the element
- "className");
-digester.addSetProperties(channelPrefix + "Receiver");
-digester.addSetNext(channelPrefix + "Receiver",
-"setChannelReceiver",
-"org.apache.catalina.tribes.ChannelReceiver");
-
-digester.addObjectCreate(channelPrefix + "Interceptor",
- null, // MUST be specified in the element
- "className");
-digester.addSetProperties(channelPrefix + "Interceptor");
-digester.addSetNext(channelPrefix + "Interceptor",
-"addInterceptor",
-
"org.apache.catalina.tribes.ChannelInterceptor");
-
-digester.addObjectCreate(channelPrefix + "Interceptor/LocalMember",
- null, // MUST be specified in the element
- "className");
-digester.addSetProperties(channelPrefix + 
"Interceptor/LocalMember");
-digester.addSetNext(channelPrefix + "Interceptor/LocalMember",
-"setLocalMember",
-"org.apache.catalina.tribes.Member");
-
-digester.addObjectCreate(channelPrefix + "Interceptor/Member",
- null, // MUST be specified in the element
- "

[tomcat] branch 7.0.x updated (8fc84ec -> 46a7a53)

2019-05-31 Thread markt
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 8fc84ec  Remove fragment from RequestDispatcher target if 
(incorrectly) present
 new a3b80b0  Remove trailing whitespace
 new 46a7a53  Align checkstyle config with 8.5.x and fix resulting warnings

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 RELEASE-NOTES  |   2 +-
 java/javax/annotation/Generated.java   |   4 +-
 java/javax/annotation/PostConstruct.java   |   4 +-
 java/javax/annotation/PreDestroy.java  |   4 +-
 java/javax/annotation/Resource.java|   4 +-
 java/javax/annotation/Resources.java   |   4 +-
 java/javax/annotation/security/DeclareRoles.java   |   4 +-
 java/javax/annotation/security/DenyAll.java|   4 +-
 java/javax/annotation/security/PermitAll.java  |   4 +-
 java/javax/annotation/security/RolesAllowed.java   |   4 +-
 java/javax/annotation/security/RunAs.java  |   4 +-
 java/javax/ejb/EJB.java|   4 +-
 java/javax/ejb/EJBs.java   |   4 +-
 java/javax/el/ArrayELResolver.java |   4 +-
 java/javax/el/BeanELResolver.java  |  12 +-
 java/javax/el/CompositeELResolver.java |  10 +-
 java/javax/el/ELContext.java   |  32 +-
 java/javax/el/ELContextEvent.java  |   6 +-
 java/javax/el/ELContextListener.java   |   6 +-
 java/javax/el/ELException.java |  12 +-
 java/javax/el/ELResolver.java  |  18 +-
 java/javax/el/Expression.java  |   8 +-
 java/javax/el/ExpressionFactory.java   |  24 +-
 java/javax/el/FunctionMapper.java  |   6 +-
 java/javax/el/ListELResolver.java  |   4 +-
 java/javax/el/MapELResolver.java   |  10 +-
 java/javax/el/MethodExpression.java|  10 +-
 java/javax/el/MethodInfo.java  |  18 +-
 java/javax/el/MethodNotFoundException.java |   6 +-
 java/javax/el/PropertyNotFoundException.java   |   6 +-
 java/javax/el/PropertyNotWritableException.java|   6 +-
 java/javax/el/ResourceBundleELResolver.java|  18 +-
 java/javax/el/Util.java|   4 +-
 java/javax/el/ValueExpression.java |  12 +-
 java/javax/el/ValueReference.java  |  10 +-
 java/javax/el/VariableMapper.java  |   6 +-
 java/javax/persistence/PersistenceContext.java |   4 +-
 java/javax/persistence/PersistenceContextType.java |   4 +-
 java/javax/persistence/PersistenceContexts.java|   4 +-
 java/javax/persistence/PersistenceUnit.java|   4 +-
 java/javax/persistence/PersistenceUnits.java   |   4 +-
 java/javax/servlet/AsyncContext.java   |  32 +-
 java/javax/servlet/AsyncEvent.java |  10 +-
 java/javax/servlet/Filter.java |   4 +-
 java/javax/servlet/FilterChain.java|   6 +-
 java/javax/servlet/FilterConfig.java   |  14 +-
 java/javax/servlet/FilterRegistration.java |  14 +-
 java/javax/servlet/GenericServlet.java |  22 +-
 java/javax/servlet/HttpConstraintElement.java  |  18 +-
 .../javax/servlet/HttpMethodConstraintElement.java |   4 +-
 java/javax/servlet/MultipartConfigElement.java |  16 +-
 java/javax/servlet/Registration.java   |  14 +-
 java/javax/servlet/RequestDispatcher.java  |  38 +-
 java/javax/servlet/Servlet.java|  54 +-
 java/javax/servlet/ServletConfig.java  |   8 +-
 .../javax/servlet/ServletContainerInitializer.java |   2 +-
 java/javax/servlet/ServletContext.java |  42 +-
 .../servlet/ServletContextAttributeEvent.java  |   2 +-
 .../servlet/ServletContextAttributeListener.java   |   2 +-
 java/javax/servlet/ServletContextEvent.java|   6 +-
 java/javax/servlet/ServletContextListener.java |   4 +-
 java/javax/servlet/ServletException.java   |  10 +-
 java/javax/servlet/ServletInputStream.java |   4 +-
 java/javax/servlet/ServletOutputStream.java|  32 +-
 java/javax/servlet/ServletRegistration.java|   8 +-
 java/javax/servlet/ServletRequest.java |  58 +-
 .../servlet/ServletRequestAttributeEvent.java  |   8 +-
 java/javax/servlet/ServletRequestEvent.java|   4 +-
 java/javax/servlet/ServletRequestWrapper.java  |  28 +-
 java/javax/servlet/ServletResponse.java|  32 +-
 java/javax/servlet/ServletResponseWrapper.java |  10 +-
 java/javax/servlet/ServletSe

[tomcat] branch 7.0.x updated: Remove fragment from RequestDispatcher target if (incorrectly) present

2019-05-31 Thread markt
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 8fc84ec  Remove fragment from RequestDispatcher target if 
(incorrectly) present
8fc84ec is described below

commit 8fc84ec2d7f76b3ba4300d871089890c5cf0c690
Author: Mark Thomas 
AuthorDate: Fri May 31 20:30:08 2019 +0100

Remove fragment from RequestDispatcher target if (incorrectly) present
---
 .../catalina/connector/LocalStrings.properties |  2 +
 java/org/apache/catalina/connector/Request.java| 14 +++-
 .../catalina/core/ApplicationHttpRequest.java  | 76 +-
 .../apache/catalina/core/LocalStrings.properties   |  3 +
 webapps/docs/changelog.xml |  5 ++
 5 files changed, 68 insertions(+), 32 deletions(-)

diff --git a/java/org/apache/catalina/connector/LocalStrings.properties 
b/java/org/apache/catalina/connector/LocalStrings.properties
index a6c8efe..7e5c474 100644
--- a/java/org/apache/catalina/connector/LocalStrings.properties
+++ b/java/org/apache/catalina/connector/LocalStrings.properties
@@ -87,6 +87,8 @@ requestFacade.nullRequest=The request object has been 
recycled and is no longer
 responseFacade.nullResponse=The response object has been recycled and is no 
longer associated with this facade
 
 cometEvent.nullRequest=The event object has been recycled and is no longer 
associated with a request
+
+request.fragmentInDispatchPath=The fragment in dispatch path [{0}] has been 
removed
 request.notAsync=It is illegal to call this method if the current request is 
not in asynchronous mode (i.e. isAsyncStarted() returns false)
 
 #
diff --git a/java/org/apache/catalina/connector/Request.java 
b/java/org/apache/catalina/connector/Request.java
index a7877fb..a593be1 100644
--- a/java/org/apache/catalina/connector/Request.java
+++ b/java/org/apache/catalina/connector/Request.java
@@ -1392,11 +1392,19 @@ implements HttpServletRequest {
 return null;
 }
 
-// If the path is already context-relative, just pass it through
 if (path == null) {
 return null;
-} else if (path.startsWith("/")) {
-return (context.getServletContext().getRequestDispatcher(path));
+}
+
+int fragmentPos = path.indexOf('#');
+if (fragmentPos > -1) {
+log.warn(sm.getString("request.fragmentInDispatchPath", path));
+path = path.substring(0, fragmentPos);
+}
+
+// If the path is already context-relative, just pass it through
+if (path.startsWith("/")) {
+return context.getServletContext().getRequestDispatcher(path);
 }
 
 /*
diff --git a/java/org/apache/catalina/core/ApplicationHttpRequest.java 
b/java/org/apache/catalina/core/ApplicationHttpRequest.java
index fed2963..3409da4 100644
--- a/java/org/apache/catalina/core/ApplicationHttpRequest.java
+++ b/java/org/apache/catalina/core/ApplicationHttpRequest.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.
@@ -39,9 +39,11 @@ import org.apache.catalina.Globals;
 import org.apache.catalina.Manager;
 import org.apache.catalina.Session;
 import org.apache.catalina.util.ParameterMap;
+import org.apache.catalina.util.URLEncoder;
 import org.apache.tomcat.util.buf.B2CConverter;
 import org.apache.tomcat.util.buf.MessageBytes;
 import org.apache.tomcat.util.http.Parameters;
+import org.apache.tomcat.util.res.StringManager;
 
 
 /**
@@ -61,9 +63,7 @@ import org.apache.tomcat.util.http.Parameters;
  */
 class ApplicationHttpRequest extends HttpServletRequestWrapper {
 
-
-// --- Static Variables
-
+private static final StringManager sm = 
StringManager.getManager(ApplicationHttpRequest.class);
 
 /**
  * The set of attribute names that are special for request dispatchers.
@@ -74,9 +74,9 @@ class ApplicationHttpRequest extends 
HttpServletRequestWrapper {
   RequestDispatcher.INCLUDE_SERVLET_PATH,
   RequestDispatcher.INCLUDE_PATH_INFO,
   RequestDispatcher.INCLUDE_QUERY_STRING,
-  RequestDispatcher.FORWARD_REQUEST_URI, 
+  RequestDispatcher.FORWARD_REQUEST_URI,
   RequestDispatcher.FORWARD_CONTEXT_PATH,
-  RequestDispatcher.FORWARD_SERVLET_PATH, 
+  RequestDispatcher.FORWARD_SERVLET_PATH,
   RequestDispatcher.FORWARD_PATH_INFO,
   RequestDispatcher.FORWARD_QUERY_STRING }

[tomcat] branch 8.5.x updated: Remove fragment from RequestDispatcher target if (incorrectly) present

2019-05-31 Thread markt
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 348d395  Remove fragment from RequestDispatcher target if 
(incorrectly) present
348d395 is described below

commit 348d395c0eb7c15c5b4562ed589ac8975f828d8e
Author: Mark Thomas 
AuthorDate: Fri May 31 20:30:08 2019 +0100

Remove fragment from RequestDispatcher target if (incorrectly) present
---
 .../catalina/connector/LocalStrings.properties |  1 +
 java/org/apache/catalina/connector/Request.java| 14 ++--
 .../catalina/core/ApplicationHttpRequest.java  | 38 --
 .../apache/catalina/core/LocalStrings.properties   |  2 ++
 webapps/docs/changelog.xml |  5 +++
 5 files changed, 47 insertions(+), 13 deletions(-)

diff --git a/java/org/apache/catalina/connector/LocalStrings.properties 
b/java/org/apache/catalina/connector/LocalStrings.properties
index b70b187..1631c62 100644
--- a/java/org/apache/catalina/connector/LocalStrings.properties
+++ b/java/org/apache/catalina/connector/LocalStrings.properties
@@ -76,6 +76,7 @@ inputBuffer.requiresNonBlocking=Not available in non blocking 
mode
 outputBuffer.writeNull=The String argument to write(String,int,int) may not be 
null
 
 request.asyncNotSupported=A filter or servlet of the current chain does not 
support asynchronous operations.
+request.fragmentInDispatchPath=The fragment in dispatch path [{0}] has been 
removed
 request.illegalWrap=The request wrapper must wrap the request obtained from 
getRequest()
 request.notAsync=It is illegal to call this method if the current request is 
not in asynchronous mode (i.e. isAsyncStarted() returns false)
 
diff --git a/java/org/apache/catalina/connector/Request.java 
b/java/org/apache/catalina/connector/Request.java
index 8aed515..03f55a0 100644
--- a/java/org/apache/catalina/connector/Request.java
+++ b/java/org/apache/catalina/connector/Request.java
@@ -1373,11 +1373,19 @@ public class Request implements 
org.apache.catalina.servlet4preview.http.HttpSer
 return null;
 }
 
-// If the path is already context-relative, just pass it through
 if (path == null) {
 return null;
-} else if (path.startsWith("/")) {
-return (context.getServletContext().getRequestDispatcher(path));
+}
+
+int fragmentPos = path.indexOf('#');
+if (fragmentPos > -1) {
+log.warn(sm.getString("request.fragmentInDispatchPath", path));
+path = path.substring(0, fragmentPos);
+}
+
+// If the path is already context-relative, just pass it through
+if (path.startsWith("/")) {
+return context.getServletContext().getRequestDispatcher(path);
 }
 
 /*
diff --git a/java/org/apache/catalina/core/ApplicationHttpRequest.java 
b/java/org/apache/catalina/core/ApplicationHttpRequest.java
index f7c86c9..f49b32a 100644
--- a/java/org/apache/catalina/core/ApplicationHttpRequest.java
+++ b/java/org/apache/catalina/core/ApplicationHttpRequest.java
@@ -45,9 +45,11 @@ import org.apache.catalina.connector.RequestFacade;
 import org.apache.catalina.servlet4preview.http.PushBuilder;
 import org.apache.catalina.servlet4preview.http.ServletMapping;
 import org.apache.catalina.util.ParameterMap;
+import org.apache.catalina.util.URLEncoder;
 import org.apache.tomcat.util.buf.B2CConverter;
 import org.apache.tomcat.util.buf.MessageBytes;
 import org.apache.tomcat.util.http.Parameters;
+import org.apache.tomcat.util.res.StringManager;
 
 
 /**
@@ -68,9 +70,7 @@ import org.apache.tomcat.util.http.Parameters;
 class ApplicationHttpRequest
 extends 
org.apache.catalina.servlet4preview.http.HttpServletRequestWrapper {
 
-
-// --- Static Variables
-
+private static final StringManager sm = 
StringManager.getManager(ApplicationHttpRequest.class);
 
 /**
  * The set of attribute names that are special for request dispatchers.
@@ -319,11 +319,20 @@ class ApplicationHttpRequest
 if (context == null)
 return (null);
 
+if (path == null) {
+return null;
+}
+
+int fragmentPos = path.indexOf('#');
+if (fragmentPos > -1) {
+
context.getLogger().warn(sm.getString("applicationHttpRequest.fragmentInDispatchPath",
 path));
+path = path.substring(0, fragmentPos);
+}
+
 // If the path is already context-relative, just pass it through
-if (path == null)
-return (null);
-else if (path.startsWith("/"))
-return (context.getServletContext().getRequestDispatcher(path));
+if (path.startsWith("/")) {
+return context.getServletContext().getRequestDispatcher(path);
+}
 
 // Convert a request

[tomcat] branch master updated: Remove fragment from RequestDispatcher target if (incorrectly) present

2019-05-31 Thread markt
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 1f31cf1  Remove fragment from RequestDispatcher target if 
(incorrectly) present
1f31cf1 is described below

commit 1f31cf1e192ddd530cc1e5c0383f8fa1d35a3f40
Author: Mark Thomas 
AuthorDate: Fri May 31 20:30:08 2019 +0100

Remove fragment from RequestDispatcher target if (incorrectly) present
---
 .../catalina/connector/LocalStrings.properties |  1 +
 java/org/apache/catalina/connector/Request.java| 12 ++--
 .../catalina/core/ApplicationHttpRequest.java  | 36 --
 .../apache/catalina/core/LocalStrings.properties   |  2 ++
 webapps/docs/changelog.xml |  5 +++
 5 files changed, 45 insertions(+), 11 deletions(-)

diff --git a/java/org/apache/catalina/connector/LocalStrings.properties 
b/java/org/apache/catalina/connector/LocalStrings.properties
index bb018d9..ad14b81 100644
--- a/java/org/apache/catalina/connector/LocalStrings.properties
+++ b/java/org/apache/catalina/connector/LocalStrings.properties
@@ -80,6 +80,7 @@ inputBuffer.streamClosed=Stream closed
 outputBuffer.writeNull=The String argument to write(String,int,int) may not be 
null
 
 request.asyncNotSupported=A filter or servlet of the current chain does not 
support asynchronous operations.
+request.fragmentInDispatchPath=The fragment in dispatch path [{0}] has been 
removed
 request.illegalWrap=The request wrapper must wrap the request obtained from 
getRequest()
 request.notAsync=It is illegal to call this method if the current request is 
not in asynchronous mode (i.e. isAsyncStarted() returns false)
 
diff --git a/java/org/apache/catalina/connector/Request.java 
b/java/org/apache/catalina/connector/Request.java
index ec38789..8a4a459 100644
--- a/java/org/apache/catalina/connector/Request.java
+++ b/java/org/apache/catalina/connector/Request.java
@@ -1371,10 +1371,18 @@ public class Request implements HttpServletRequest {
 return null;
 }
 
-// If the path is already context-relative, just pass it through
 if (path == null) {
 return null;
-} else if (path.startsWith("/")) {
+}
+
+int fragmentPos = path.indexOf('#');
+if (fragmentPos > -1) {
+log.warn(sm.getString("request.fragmentInDispatchPath", path));
+path = path.substring(0, fragmentPos);
+}
+
+// If the path is already context-relative, just pass it through
+if (path.startsWith("/")) {
 return context.getServletContext().getRequestDispatcher(path);
 }
 
diff --git a/java/org/apache/catalina/core/ApplicationHttpRequest.java 
b/java/org/apache/catalina/core/ApplicationHttpRequest.java
index fc3a1d6..e049e83 100644
--- a/java/org/apache/catalina/core/ApplicationHttpRequest.java
+++ b/java/org/apache/catalina/core/ApplicationHttpRequest.java
@@ -48,9 +48,11 @@ import org.apache.catalina.Session;
 import org.apache.catalina.connector.RequestFacade;
 import org.apache.catalina.util.ParameterMap;
 import org.apache.catalina.util.RequestUtil;
+import org.apache.catalina.util.URLEncoder;
 import org.apache.tomcat.util.buf.B2CConverter;
 import org.apache.tomcat.util.buf.MessageBytes;
 import org.apache.tomcat.util.http.Parameters;
+import org.apache.tomcat.util.res.StringManager;
 
 
 /**
@@ -70,9 +72,7 @@ import org.apache.tomcat.util.http.Parameters;
  */
 class ApplicationHttpRequest extends HttpServletRequestWrapper {
 
-
-// --- Static Variables
-
+private static final StringManager sm = 
StringManager.getManager(ApplicationHttpRequest.class);
 
 /**
  * The set of attribute names that are special for request dispatchers.
@@ -321,11 +321,20 @@ class ApplicationHttpRequest extends 
HttpServletRequestWrapper {
 if (context == null)
 return null;
 
-// If the path is already context-relative, just pass it through
-if (path == null)
+if (path == null) {
 return null;
-else if (path.startsWith("/"))
+}
+
+int fragmentPos = path.indexOf('#');
+if (fragmentPos > -1) {
+
context.getLogger().warn(sm.getString("applicationHttpRequest.fragmentInDispatchPath",
 path));
+path = path.substring(0, fragmentPos);
+}
+
+// If the path is already context-relative, just pass it through
+if (path.startsWith("/")) {
 return context.getServletContext().getRequestDispatcher(path);
+}
 
 // Convert a request-relative path to a context-relative one
 String servletPath =
@@ -345,10 +354,19 @@ class ApplicationHttpRequest extends 
HttpServletRequestWrapper {
 
 int pos = requestPath.lastIndexOf('/');
 String relativ

Re: JDK 13 - Early Access build 23 is available

2019-05-31 Thread Rory O'Donnell

Thanks for the feedback Mark.

Rgsd,Rory

On 31/05/2019 12:53, Mark Thomas wrote:

No issues found.

Tomcat 9.0.x builds without any errors / warnings.

It passes a basic smoke test (HTTP, WebSocket and HTTP/2)

The unit tests pass with NIO, NIO2 and APR/native.

Mark



On 31/05/2019 08:21, Rory O'Donnell wrote:

Hi Mark,


   *OpenJDK builds  *- JDK 13 - Early Access build 23 is available at
   http://jdk.java.net/13/

   * These early-access , open-source builds are provided under the
   o GNU General Public License, version 2, with the Classpath
 Exception .
   * Changes in this build
 


   * Release notes [1]


 *Significant changes since the last availability email*

   * build 23
   o Support for Unicode 12.1 (JDK-8221431
 )
   o Add new keytool -showinfo -tls command for displaying TLS
 configuration information (JDK-8219861
 )
   * build 22
   o New methods for creating DOM and SAX factories with Namespace
 support (JDK-8219692
 )
   o Removal of two DocuSign root CA certificates (JDK-8223499
 )
   * build 21
   o JDWP support for IPv6 (JDK-8184770
 )
   o Change the mechanism by which JDK loads the platform-specific
 AWT Toolkit (JDK-8212700
 )
   o Upgrade CLDR to Version 35.1 (JDK-8221432
 )
   o xConfigurable Read Timeout for CRLs (JDK-8191808
 )
   o Removal of two Comodo root CA certificates (JDK-8222136
 )


 Bug fixes for issues reported by Open Source Projects

   * build 22
   o OutOfMemory on compiling with darcula.jar in classpath
 (JDK-8222807 )
   * build 21
   o java -version output and certain system properties contain
 "null" text in their values (JDK-8223695
 )
   * build 20
   o assert(Compile::current()->live_nodes() <
 Compile::current()->max_node_limit()) failed: Live Node limit
 exceeded limit (JDK-8219520
 )
   o C2: MemNode::can_see_stored_value() ignores casts which carry
 control dependency (JDK-8219902
 )
   o New fix of the deadlock in sun.security.ssl.SSLSocketImpl
 (JDK-8219991 )


 JEP updates since last email

   * JEP 350: Dynamic CDS Archives  was
 *Integrated*.
   * JEP 351: ZGC: Uncommit Unused Memory
  was *Integrated*.
   * JEP 353: Reimplement the Legacy Socket API
  was*Targetted* JDK 13.
   * JEP 355: Text Blocks (Preview)
  was *Proposed to target* JDK 13.


Rgds,Rory

[1] http://jdk.java.net/13/release-notes

--
Rgds, Rory O'Donnell
Quality Engineering Manager
Oracle EMEA, Dublin, Ireland


--
Rgds, Rory O'Donnell
Quality Engineering Manager
Oracle EMEA, Dublin, Ireland


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



Re: JDK 13 - Early Access build 23 is available

2019-05-31 Thread Mark Thomas
No issues found.

Tomcat 9.0.x builds without any errors / warnings.

It passes a basic smoke test (HTTP, WebSocket and HTTP/2)

The unit tests pass with NIO, NIO2 and APR/native.

Mark



On 31/05/2019 08:21, Rory O'Donnell wrote:
> Hi Mark,
> 
> 
>   *OpenJDK builds  *- JDK 13 - Early Access build 23 is available at
>   http://jdk.java.net/13/
> 
>   * These early-access , open-source builds are provided under the
>   o GNU General Public License, version 2, with the Classpath
> Exception .
>   * Changes in this build
> 
> 
> 
>   * Release notes [1]
> 
> 
> *Significant changes since the last availability email*
> 
>   * build 23
>   o Support for Unicode 12.1 (JDK-8221431
> )
>   o Add new keytool -showinfo -tls command for displaying TLS
> configuration information (JDK-8219861
> )
>   * build 22
>   o New methods for creating DOM and SAX factories with Namespace
> support (JDK-8219692
> )
>   o Removal of two DocuSign root CA certificates (JDK-8223499
> )
>   * build 21
>   o JDWP support for IPv6 (JDK-8184770
> )
>   o Change the mechanism by which JDK loads the platform-specific
> AWT Toolkit (JDK-8212700
> )
>   o Upgrade CLDR to Version 35.1 (JDK-8221432
> )
>   o xConfigurable Read Timeout for CRLs (JDK-8191808
> )
>   o Removal of two Comodo root CA certificates (JDK-8222136
> )
> 
> 
> Bug fixes for issues reported by Open Source Projects 
> 
>   * build 22
>   o OutOfMemory on compiling with darcula.jar in classpath
> (JDK-8222807 )
>   * build 21
>   o java -version output and certain system properties contain
> "null" text in their values (JDK-8223695
> )
>   * build 20
>   o assert(Compile::current()->live_nodes() <
> Compile::current()->max_node_limit()) failed: Live Node limit
> exceeded limit (JDK-8219520
> )
>   o C2: MemNode::can_see_stored_value() ignores casts which carry
> control dependency (JDK-8219902
> )
>   o New fix of the deadlock in sun.security.ssl.SSLSocketImpl
> (JDK-8219991 )
> 
> 
> JEP updates since last email
> 
>   * JEP 350: Dynamic CDS Archives  was
> *Integrated*.
>   * JEP 351: ZGC: Uncommit Unused Memory
>  was *Integrated*.
>   * JEP 353: Reimplement the Legacy Socket API
>  was*Targetted* JDK 13.
>   * JEP 355: Text Blocks (Preview)
>  was *Proposed to target* JDK 13.
> 
> 
> Rgds,Rory
> 
> [1] http://jdk.java.net/13/release-notes
> 
> -- 
> Rgds, Rory O'Donnell
> Quality Engineering Manager
> Oracle EMEA, Dublin, Ireland
> 


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



[tomcat] branch master updated: Port NPE prevention fix from NIO

2019-05-31 Thread remm
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 b7384c2  Port NPE prevention fix from NIO
b7384c2 is described below

commit b7384c2f3444a31d5bdd97ad985c9a952d906220
Author: remm 
AuthorDate: Fri May 31 10:56:33 2019 +0200

Port NPE prevention fix from NIO
---
 java/org/apache/tomcat/util/net/Nio2Endpoint.java | 118 +-
 1 file changed, 68 insertions(+), 50 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/Nio2Endpoint.java 
b/java/org/apache/tomcat/util/net/Nio2Endpoint.java
index 767253a..66f9e20 100644
--- a/java/org/apache/tomcat/util/net/Nio2Endpoint.java
+++ b/java/org/apache/tomcat/util/net/Nio2Endpoint.java
@@ -1467,30 +1467,36 @@ public class Nio2Endpoint extends 
AbstractJsseEndpoint

[tomcat] branch master updated: Remove HTTP/2 debug for now

2019-05-31 Thread remm
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 c01cfa33f Remove HTTP/2 debug for now
c01cfa33f is described below

commit c01cfa33f583e8dba232b8f66f26ccef007df566
Author: remm 
AuthorDate: Fri May 31 10:24:25 2019 +0200

Remove HTTP/2 debug for now
---
 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



JDK 13 - Early Access build 23 is available

2019-05-31 Thread Rory O'Donnell

Hi Mark,


 *OpenJDK builds *- JDK 13 - Early Access build 23 is available at
 http://jdk.java.net/13/

 * These early-access , open-source builds are provided under the
 o GNU General Public License, version 2, with the Classpath
   Exception .
 * Changes in this build
   


 * Release notes [1]


   *Significant changes since the last availability email*

 * build 23
 o Support for Unicode 12.1 (JDK-8221431
   )
 o Add new keytool -showinfo -tls command for displaying TLS
   configuration information (JDK-8219861
   )
 * build 22
 o New methods for creating DOM and SAX factories with Namespace
   support (JDK-8219692
   )
 o Removal of two DocuSign root CA certificates (JDK-8223499
   )
 * build 21
 o JDWP support for IPv6 (JDK-8184770
   )
 o Change the mechanism by which JDK loads the platform-specific
   AWT Toolkit (JDK-8212700
   )
 o Upgrade CLDR to Version 35.1 (JDK-8221432
   )
 o xConfigurable Read Timeout for CRLs (JDK-8191808
   )
 o Removal of two Comodo root CA certificates (JDK-8222136
   )


   Bug fixes for issues reported by Open Source Projects

 * build 22
 o OutOfMemory on compiling with darcula.jar in classpath
   (JDK-8222807 )
 * build 21
 o java -version output and certain system properties contain
   "null" text in their values (JDK-8223695
   )
 * build 20
 o assert(Compile::current()->live_nodes() <
   Compile::current()->max_node_limit()) failed: Live Node limit
   exceeded limit (JDK-8219520
   )
 o C2: MemNode::can_see_stored_value() ignores casts which carry
   control dependency (JDK-8219902
   )
 o New fix of the deadlock in sun.security.ssl.SSLSocketImpl
   (JDK-8219991 )


   JEP updates since last email

 * JEP 350: Dynamic CDS Archives  was
   *Integrated*.
 * JEP 351: ZGC: Uncommit Unused Memory
    was *Integrated*.
 * JEP 353: Reimplement the Legacy Socket API
    was*Targetted* JDK 13.
 * JEP 355: Text Blocks (Preview)
    was *Proposed to target* JDK 13.


Rgds,Rory

[1] http://jdk.java.net/13/release-notes

--
Rgds, Rory O'Donnell
Quality Engineering Manager
Oracle EMEA, Dublin, Ireland