[struts] branch WW-5310-equal-sign created (now b97339e31)

2023-05-23 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a change to branch WW-5310-equal-sign
in repository https://gitbox.apache.org/repos/asf/struts.git


  at b97339e31 WW-5310 Properly parses param value with equal sign

This branch includes the following new commits:

 new b97339e31 WW-5310 Properly parses param value with equal sign

The 1 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.




[struts] 01/01: WW-5310 Properly parses param value with equal sign

2023-05-23 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch WW-5310-equal-sign
in repository https://gitbox.apache.org/repos/asf/struts.git

commit b97339e31e8aab08a773d35f0c3d29ed106953f9
Author: Lukasz Lenart 
AuthorDate: Wed May 24 07:06:15 2023 +0200

WW-5310 Properly parses param value with equal sign
---
 .../struts2/url/StrutsQueryStringParser.java   | 19 +++
 .../struts2/url/StrutsQueryStringParserTest.java   | 27 ++
 2 files changed, 35 insertions(+), 11 deletions(-)

diff --git 
a/core/src/main/java/org/apache/struts2/url/StrutsQueryStringParser.java 
b/core/src/main/java/org/apache/struts2/url/StrutsQueryStringParser.java
index f1764511e..3b3ec80eb 100644
--- a/core/src/main/java/org/apache/struts2/url/StrutsQueryStringParser.java
+++ b/core/src/main/java/org/apache/struts2/url/StrutsQueryStringParser.java
@@ -55,19 +55,16 @@ public class StrutsQueryStringParser implements 
QueryStringParser {
 LOG.debug("Param [{}] is blank, skipping", param);
 continue;
 }
-
-String[] tmpParams = param.split("=");
-String paramName = null;
+String paramName;
 String paramValue = "";
-if (tmpParams.length > 0) {
-paramName = tmpParams[0];
-}
-if (tmpParams.length > 1) {
-paramValue = tmpParams[1];
-}
-if (paramName != null) {
-extractParam(paramName, paramValue, queryParams, 
forceValueArray);
+int index = param.indexOf("=");
+if (index > -1) {
+paramName = param.substring(0, index);
+paramValue = param.substring(index + 1);
+} else {
+paramName = param;
 }
+extractParam(paramName, paramValue, queryParams, forceValueArray);
 }
 return queryParams;
 }
diff --git 
a/core/src/test/java/org/apache/struts2/url/StrutsQueryStringParserTest.java 
b/core/src/test/java/org/apache/struts2/url/StrutsQueryStringParserTest.java
index 001749edf..ab0622cd5 100644
--- a/core/src/test/java/org/apache/struts2/url/StrutsQueryStringParserTest.java
+++ b/core/src/test/java/org/apache/struts2/url/StrutsQueryStringParserTest.java
@@ -76,6 +76,33 @@ public class StrutsQueryStringParserTest {
 assertEquals("value with space", queryParameters.get("name"));
 }
 
+@Test
+public void shouldProperlySplitParamsWithDoubleEqualSign() {
+Map queryParameters = 
parser.parse("id1=n123=&id2=n3456", false);
+
+assertTrue(queryParameters.containsKey("id1"));
+assertTrue(queryParameters.containsKey("id2"));
+assertEquals("n123=", queryParameters.get("id1"));
+assertEquals("n3456", queryParameters.get("id2"));
+}
+
+@Test
+public void shouldHandleParamWithNoValue1() {
+Map queryParameters = parser.parse("paramNoValue", 
false);
+
+assertTrue(queryParameters.containsKey("paramNoValue"));
+assertEquals("", queryParameters.get("paramNoValue"));
+}
+
+@Test
+public void shouldHandleParamWithNoValue2() {
+Map queryParameters = 
parser.parse("paramNoValue¶m1=1234", false);
+
+assertTrue(queryParameters.containsKey("paramNoValue"));
+assertTrue(queryParameters.containsKey("param1"));
+assertEquals("1234", queryParameters.get("param1"));
+}
+
 @Before
 public void setUp() throws Exception {
 this.parser = new StrutsQueryStringParser(new StrutsUrlDecoder());



[struts-site] branch master updated (76a1d06f4 -> 53d85eb28)

2023-05-23 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/struts-site.git


from 76a1d06f4 Merge pull request #192 from apache/WW-5289-executor
 new 62f8160a6 WW-5301 Update documentation for struts-deferred.xml
 new a8e8720b9 WW-5301 Fix anchor tag in markdown
 new 53d85eb28 Merge pull request #195 from 
atlassian-forks/WW-5301-deferred-docs

The 1385 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:
 source/core-developers/configuration-files.md  | 20 +-
 .../configuration-provider-and-configuration.md| 10 +++--
 source/core-developers/constant-configuration.md   |  3 +-
 source/core-developers/struts-xml.md   |  2 +-
 source/plugins/plugins-architecture.md | 45 +-
 5 files changed, 46 insertions(+), 34 deletions(-)



[struts-site] branch asf-site updated: Automatic Site Publish by Buildbot

2023-05-23 Thread git-site-role
This is an automated email from the ASF dual-hosted git repository.

git-site-role pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/struts-site.git


The following commit(s) were added to refs/heads/asf-site by this push:
 new e1364279d Automatic Site Publish by Buildbot
e1364279d is described below

commit e1364279d4f5372a1a6b882e95b66e2267332a3f
Author: buildbot 
AuthorDate: Wed May 24 05:40:11 2023 +

Automatic Site Publish by Buildbot
---
 output/core-developers/configuration-files.html| 18 -
 .../configuration-provider-and-configuration.html  |  8 +++-
 output/core-developers/constant-configuration.html |  3 +-
 output/core-developers/struts-xml.html |  2 +-
 output/plugins/plugins-architecture.html   | 47 +-
 5 files changed, 45 insertions(+), 33 deletions(-)

diff --git a/output/core-developers/configuration-files.html 
b/output/core-developers/configuration-files.html
index 99eab2d14..b797a8443 100644
--- a/output/core-developers/configuration-files.html
+++ b/output/core-developers/configuration-files.html
@@ -160,13 +160,7 @@ See Reloading 
configuration for more.
   struts.xml
   yes
   /WEB-INF/classes/
-  Main configuration, contains result/view types, action mappings, 
interceptors, and so forth \
-
-
-   
-   
-   
-   
+  Main configuration, contains result/view types, action mappings, 
interceptors, and so forth
 
 
   default.properties
@@ -187,10 +181,16 @@ See Reloading 
configuration for more.
   Default macros referenced by velocity.properties
 
 
-  struts-plugin.xml
+  struts-plugin.xml
+  yes
+  At the root of a plugin JAR
+  Optional configuration files for Plugins in the same format as 
struts.xml.
+
+
+  struts-deferred.xml
   yes
   At the root of a plugin JAR
-  Optional configuration files for Plugins  in the same format as 
struts.xml.
+  Optional configuration files for Plugins, most useful for defining 
extension points
 
 
   velocity.properties
diff --git 
a/output/core-developers/configuration-provider-and-configuration.html 
b/output/core-developers/configuration-provider-and-configuration.html
index be6d98308..25a844648 100644
--- a/output/core-developers/configuration-provider-and-configuration.html
+++ b/output/core-developers/configuration-provider-and-configuration.html
@@ -155,8 +155,12 @@ through a Dispatcher’s DispatcherListener.
 
 
-  XmlConfigurationProvider - an abstract based 
implementation which can use XML files as source of configuration
-  StrutsXmlConfigurationProvider - primary 
configuration provider, represents struts.xml and struts-plugin.xml files
+  XmlDocConfigurationProvider - an abstract based 
implementation which can use XML documents from any source as
+configuration
+  XmlConfigurationProvider - an abstract based 
implementation which can use XML files on disk as source of
+configuration
+  StrutsXmlConfigurationProvider - primary 
configuration provider, represents struts.xml, struts-plugin.xml
+and struts-deferred.xml files
   PropertiesConfigurationProvider - used to load struts.properties
 -ServletContextAwareConfigurationProvider - marking 
interface allowing to inject ServletContext into provider
 
diff --git a/output/core-developers/constant-configuration.html 
b/output/core-developers/constant-configuration.html
index 03f9e30df..cf36457ff 100644
--- a/output/core-developers/constant-configuration.html
+++ b/output/core-developers/constant-configuration.html
@@ -141,10 +141,11 @@ for subsequent files to override previous ones:
 
 
   struts-default.xml
-  struts-plugin.xml
+  struts-plugin.xml
   struts.xml
   default.properties
   web.xml
+  struts-deferred.xml
 
 
 
diff --git a/output/core-developers/struts-xml.html 
b/output/core-developers/struts-xml.html
index 85e87c9fb..55b905135 100644
--- a/output/core-developers/struts-xml.html
+++ b/output/core-developers/struts-xml.html
@@ -136,7 +136,7 @@ of the webapp (generally /WEB
 
 
   The default file may include other configuration files as needed.
-  A struts-plugin.xml file can be placed in a JAR and 
automatically plugged into an application, so that modules 
+  A struts-plugin.xml (and/or a struts-deferred.xml) file 
can be placed in a JAR and automatically plugged into an application, so that 
modules 
 can be self-contained and automatically configured.
   In the case of Freemarker and Velocity modules, the templates can also 
be loaded from the classpath, so the entire 
 module can be plugged in as a single JAR.
diff --git a/output/plugins/plugins-architecture.html 
b/output/plugins/plugins-architecture.html
index f0e15ba96..bad09d682 100644
--- a/output/plugins/plugins-architecture.html
+++ b/output/plugins/plugins-architecture.html
@@ -143,43 +143,49 @@
   
   Developing new extension 
point
   Extension point provided 
by the Core
-   

[struts-site] branch asf-staging updated: Updates stage by Jenkins

2023-05-23 Thread git-site-role
This is an automated email from the ASF dual-hosted git repository.

git-site-role pushed a commit to branch asf-staging
in repository https://gitbox.apache.org/repos/asf/struts-site.git


The following commit(s) were added to refs/heads/asf-staging by this push:
 new e9d3f17f9 Updates stage by Jenkins
e9d3f17f9 is described below

commit e9d3f17f94b7a8c0a8958d4408546595b108f863
Author: jenkins 
AuthorDate: Wed May 24 05:44:58 2023 +

Updates stage by Jenkins
---
 content/core-developers/configuration-files.html   | 18 ++--
 .../configuration-provider-and-configuration.html  |  8 +-
 .../core-developers/constant-configuration.html|  3 +-
 content/core-developers/struts-xml.html|  2 +-
 content/plugins/plugins-architecture.html  | 47 ++-
 content/tag-developers/ognl-basics.html| 98 +-
 content/tag-developers/ognl.html   | 24 --
 7 files changed, 138 insertions(+), 62 deletions(-)

diff --git a/content/core-developers/configuration-files.html 
b/content/core-developers/configuration-files.html
index 99eab2d14..b797a8443 100644
--- a/content/core-developers/configuration-files.html
+++ b/content/core-developers/configuration-files.html
@@ -160,13 +160,7 @@ See Reloading 
configuration for more.
   struts.xml
   yes
   /WEB-INF/classes/
-  Main configuration, contains result/view types, action mappings, 
interceptors, and so forth \
-
-
-   
-   
-   
-   
+  Main configuration, contains result/view types, action mappings, 
interceptors, and so forth
 
 
   default.properties
@@ -187,10 +181,16 @@ See Reloading 
configuration for more.
   Default macros referenced by velocity.properties
 
 
-  struts-plugin.xml
+  struts-plugin.xml
+  yes
+  At the root of a plugin JAR
+  Optional configuration files for Plugins in the same format as 
struts.xml.
+
+
+  struts-deferred.xml
   yes
   At the root of a plugin JAR
-  Optional configuration files for Plugins  in the same format as 
struts.xml.
+  Optional configuration files for Plugins, most useful for defining 
extension points
 
 
   velocity.properties
diff --git 
a/content/core-developers/configuration-provider-and-configuration.html 
b/content/core-developers/configuration-provider-and-configuration.html
index be6d98308..25a844648 100644
--- a/content/core-developers/configuration-provider-and-configuration.html
+++ b/content/core-developers/configuration-provider-and-configuration.html
@@ -155,8 +155,12 @@ through a Dispatcher’s DispatcherListener.
 
 
-  XmlConfigurationProvider - an abstract based 
implementation which can use XML files as source of configuration
-  StrutsXmlConfigurationProvider - primary 
configuration provider, represents struts.xml and struts-plugin.xml files
+  XmlDocConfigurationProvider - an abstract based 
implementation which can use XML documents from any source as
+configuration
+  XmlConfigurationProvider - an abstract based 
implementation which can use XML files on disk as source of
+configuration
+  StrutsXmlConfigurationProvider - primary 
configuration provider, represents struts.xml, struts-plugin.xml
+and struts-deferred.xml files
   PropertiesConfigurationProvider - used to load struts.properties
 -ServletContextAwareConfigurationProvider - marking 
interface allowing to inject ServletContext into provider
 
diff --git a/content/core-developers/constant-configuration.html 
b/content/core-developers/constant-configuration.html
index 03f9e30df..cf36457ff 100644
--- a/content/core-developers/constant-configuration.html
+++ b/content/core-developers/constant-configuration.html
@@ -141,10 +141,11 @@ for subsequent files to override previous ones:
 
 
   struts-default.xml
-  struts-plugin.xml
+  struts-plugin.xml
   struts.xml
   default.properties
   web.xml
+  struts-deferred.xml
 
 
 
diff --git a/content/core-developers/struts-xml.html 
b/content/core-developers/struts-xml.html
index 85e87c9fb..55b905135 100644
--- a/content/core-developers/struts-xml.html
+++ b/content/core-developers/struts-xml.html
@@ -136,7 +136,7 @@ of the webapp (generally /WEB
 
 
   The default file may include other configuration files as needed.
-  A struts-plugin.xml file can be placed in a JAR and 
automatically plugged into an application, so that modules 
+  A struts-plugin.xml (and/or a struts-deferred.xml) file 
can be placed in a JAR and automatically plugged into an application, so that 
modules 
 can be self-contained and automatically configured.
   In the case of Freemarker and Velocity modules, the templates can also 
be loaded from the classpath, so the entire 
 module can be plugged in as a single JAR.
diff --git a/content/plugins/plugins-architecture.html 
b/content/plugins/plugins-architecture.html
index f0e15ba96..bad09d682 100644
--- a/content/plugins/plugins-architecture.html
+++ b/content/plugins/plugins-