Author: ssmiweve
Date: 2007-05-31 22:13:46 +0200 (Thu, 31 May 2007)
New Revision: 5239
Modified:
branches/2.13/war/src/main/java/no/schibstedsok/searchportal/http/filters/DataModelFilter.java
branches/2.13/war/src/main/java/no/schibstedsok/searchportal/http/filters/SiteLocatorFilter.java
Log:
SEARCH-1981 - Ampersand (&) character i url til urlrewrite feiler.
Modified:
branches/2.13/war/src/main/java/no/schibstedsok/searchportal/http/filters/DataModelFilter.java
===================================================================
---
branches/2.13/war/src/main/java/no/schibstedsok/searchportal/http/filters/DataModelFilter.java
2007-05-31 18:39:14 UTC (rev 5238)
+++
branches/2.13/war/src/main/java/no/schibstedsok/searchportal/http/filters/DataModelFilter.java
2007-05-31 20:13:46 UTC (rev 5239)
@@ -281,10 +281,18 @@
break;
}
}
-
+
if (null != value && null != queryStringValue) {
try {
+
+ LOG.debug("param-plain " + value);
+ LOG.debug("param-utf8Encode " + URLEncoder.encode(value, "UTF-8"));
+ LOG.debug("param-isoEncode " + URLEncoder.encode(value,
"ISO-8859-1"));
+ LOG.debug("url-plain " + queryStringValue);
+ LOG.debug("url-utf8Dencode " + URLDecoder.decode(queryStringValue,
"UTF-8"));
+ LOG.debug("url-isoDencode " + URLDecoder.decode(queryStringValue,
"ISO-8859-1"));
+
final String encodedReqValue = URLEncoder.encode(value,
"UTF-8")
.replaceAll("[+]", "%20")
.replaceAll("[*]", "%2A");
Modified:
branches/2.13/war/src/main/java/no/schibstedsok/searchportal/http/filters/SiteLocatorFilter.java
===================================================================
---
branches/2.13/war/src/main/java/no/schibstedsok/searchportal/http/filters/SiteLocatorFilter.java
2007-05-31 18:39:14 UTC (rev 5238)
+++
branches/2.13/war/src/main/java/no/schibstedsok/searchportal/http/filters/SiteLocatorFilter.java
2007-05-31 20:13:46 UTC (rev 5239)
@@ -418,6 +418,10 @@
request.setAttribute("startTime", START_TIME);
MDC.put(Site.NAME_KEY, site.getName());
MDC.put("UNIQUE_ID", getRequestId(request));
+
+ /* Setting default encoding */
+ request.setCharacterEncoding("UTF-8");
+ response.setCharacterEncoding("UTF-8");
}
private void doAfterProcessing(final ServletRequest request, final
ServletResponse response)
_______________________________________________
Kernel-commits mailing list
[email protected]
http://sesat.no/mailman/listinfo/kernel-commits