diff --git a/.gitignore b/.gitignore
index 7966828f435..ff5ed7e2d15 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,7 @@
.classpath
.project
.settings
+.gitignore
# maven
target/
diff --git a/examples/async-rest/async-rest-jar/pom.xml b/examples/async-rest/async-rest-jar/pom.xml
index 6156b0c4b42..03f8e5450a5 100644
--- a/examples/async-rest/async-rest-jar/pom.xml
+++ b/examples/async-rest/async-rest-jar/pom.xml
@@ -24,7 +24,6 @@
javax.servlet
javax.servlet-api
- 3.1-b08
provided
diff --git a/examples/async-rest/async-rest-jar/src/main/java/org/eclipse/jetty/example/asyncrest/AbstractRestServlet.java b/examples/async-rest/async-rest-jar/src/main/java/org/eclipse/jetty/example/asyncrest/AbstractRestServlet.java
index 8778d986678..9a549fe1406 100644
--- a/examples/async-rest/async-rest-jar/src/main/java/org/eclipse/jetty/example/asyncrest/AbstractRestServlet.java
+++ b/examples/async-rest/async-rest-jar/src/main/java/org/eclipse/jetty/example/asyncrest/AbstractRestServlet.java
@@ -66,6 +66,14 @@ public class AbstractRestServlet extends HttpServlet
else
_appid = servletConfig.getInitParameter(APPID_PARAM);
}
+
+
+ public static String sanitize(String s)
+ {
+ if (s==null)
+ return null;
+ return s.replace("<","?").replace("&","?").replace("\n","?");
+ }
protected String restURL(String item)
{
diff --git a/examples/async-rest/async-rest-jar/src/main/java/org/eclipse/jetty/example/asyncrest/AsyncRestServlet.java b/examples/async-rest/async-rest-jar/src/main/java/org/eclipse/jetty/example/asyncrest/AsyncRestServlet.java
index 421eb6e5433..c5868d2c50b 100644
--- a/examples/async-rest/async-rest-jar/src/main/java/org/eclipse/jetty/example/asyncrest/AsyncRestServlet.java
+++ b/examples/async-rest/async-rest-jar/src/main/java/org/eclipse/jetty/example/asyncrest/AsyncRestServlet.java
@@ -97,7 +97,7 @@ public class AsyncRestServlet extends AbstractRestServlet
async.setTimeout(30000);
// extract keywords to search for
- String[] keywords=request.getParameter(ITEMS_PARAM).split(",");
+ String[] keywords=sanitize(request.getParameter(ITEMS_PARAM)).split(",");
final AtomicInteger outstanding=new AtomicInteger(keywords.length);
// Send request each keyword
@@ -146,7 +146,7 @@ public class AsyncRestServlet extends AbstractRestServlet
long generate=now-start;
long thread=initial+generate;
- out.print("Asynchronous: "+request.getParameter(ITEMS_PARAM)+"
");
+ out.print("Asynchronous: "+sanitize(request.getParameter(ITEMS_PARAM))+"
");
out.print("Total Time: "+ms(total)+"ms
");
out.print("Thread held (red): "+ms(thread)+"ms (" + ms(initial) + " initial + " + ms(generate) + " generate )
");
@@ -162,7 +162,7 @@ public class AsyncRestServlet extends AbstractRestServlet
out.println("