Author: sshafroi
Date: 2008-07-07 10:31:14 +0200 (Mon, 07 Jul 2008)
New Revision: 6724
Modified:
branches/2.17/war/src/main/java/no/sesat/search/http/servlet/BoomerangServlet.java
Log:
Change the syntax of XML written for the logparser.
Instead of using the parameter's key, as the name of the tag, we now use the
fixed tag <parameter> for this. The key and value are added as parameters
inside the parameter tag.
So we have gone from this:
<1_wonkey_name>123</1_wonkey_name>
to
<parameter key="1_wonkey_name" value="123" />
Which is much safer.
Modified:
branches/2.17/war/src/main/java/no/sesat/search/http/servlet/BoomerangServlet.java
===================================================================
---
branches/2.17/war/src/main/java/no/sesat/search/http/servlet/BoomerangServlet.java
2008-07-07 08:14:56 UTC (rev 6723)
+++
branches/2.17/war/src/main/java/no/sesat/search/http/servlet/BoomerangServlet.java
2008-07-07 08:31:14 UTC (rev 6724)
@@ -159,13 +159,10 @@
? ((StringDataObject) params.get(key)).getXmlEscaped()
: StringEscapeUtils.escapeXml((String)
params.get(key));
- // it's critical for the logparser that we write valid xml
final String keyEscaped =
StringEscapeUtils.escapeXml(URLDecoder.decode(key, "UTF-8"));
- if (!keyEscaped.contains("%")) {
- bob.append('<' + keyEscaped + '>' + value + "</" +
keyEscaped + '>');
- }else{
- bob.append("<doubled-url-encoded-tag-ignored-here/>");
- }
+
+ bob.append("<parameter key=\"" + keyEscaped + "\" value=\"" +
value + "\"/>");
+
}catch (UnsupportedEncodingException ex) {
LOG.error("Failed to kangerooGrub " + key, ex);
}
_______________________________________________
Kernel-commits mailing list
[email protected]
http://sesat.no/mailman/listinfo/kernel-commits