This is an automated email from the ASF dual-hosted git repository.
jleroux pushed a commit to branch release18.12
in repository
https://gitbox.apache.org/repos/asf/ofbiz-framework.gitThe following commit(s) were added to refs/heads/release18.12 by this push:
new 59b1ba1 Improved: SeoContextFilter.java is not able to handle query strings (OFBIZ-11278)
59b1ba1 is described below
commit 59b1ba17faece5939d479577ffa772dfe89d0454
Author: Jacques Le Roux <
[hidden email]>
AuthorDate: Sun Nov 10 10:43:07 2019 +0100
Improved: SeoContextFilter.java is not able to handle query strings
(OFBIZ-11278)
Removes a trailing blank and uses empty to check request::getParameterMap result
Thanks: Mathieu to spot "empty to check request::getParameterMap result"
(cherry picked from commit 61ade2add5af585ec873280da8051bdb1f139c71)
---
.../main/java/org/apache/ofbiz/product/category/SeoContextFilter.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/applications/product/src/main/java/org/apache/ofbiz/product/category/SeoContextFilter.java b/applications/product/src/main/java/org/apache/ofbiz/product/category/SeoContextFilter.java
index 52e8017..b518ded 100644
--- a/applications/product/src/main/java/org/apache/ofbiz/product/category/SeoContextFilter.java
+++ b/applications/product/src/main/java/org/apache/ofbiz/product/category/SeoContextFilter.java
@@ -102,7 +102,7 @@ public class SeoContextFilter implements Filter {
String uri = httpRequest.getRequestURI();
Map<String, String[]> parameterMap =request.getParameterMap();
- if (parameterMap != null) {
+ if (!parameterMap.isEmpty()) {
List<BasicNameValuePair> params = new ArrayList<BasicNameValuePair>();
request.getParameterMap().forEach((name, values) -> {
for(String value : values) {
@@ -110,7 +110,7 @@ public class SeoContextFilter implements Filter {
}
});
String queryString = URLEncodedUtils.format(params, Charset.forName("UTF-8"));
- uri = uri + "?" + queryString;
+ uri = uri + "?" + queryString;
}
boolean forwarded = forwardUri(httpResponse, uri);