You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2019/11/10 09:49:32 UTC
[ofbiz-framework] branch release17.12 updated: Improved:
SeoContextFilter.java is not able to handle query strings (OFBIZ-11278)
This is an automated email from the ASF dual-hosted git repository.
jleroux pushed a commit to branch release17.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/release17.12 by this push:
new 53faf82 Improved: SeoContextFilter.java is not able to handle query strings (OFBIZ-11278)
53faf82 is described below
commit 53faf82d465f98d53b59e99acc60355cb35a974a
Author: Jacques Le Roux <ja...@les7arts.com>
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"
---
.../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 b57976d..9944eb2 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);