Skip to content

Commit 6fe3444

Browse files
author
schallee@darkmist.net
committed
Add the ability to set the query string for servlet request tests. This
is needed for testing issue 121 and issue 125.
1 parent 38a473b commit 6fe3444

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

‎src/test/java/org/owasp/esapi/http/TestHttpServletRequest.java‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ public class TestHttpServletRequest implements HttpServletRequest {
6161
private String contentType = null;
6262

6363
private String method = "POST";
64+
65+
private String queryString;
6466

6567
public TestHttpServletRequest() {
6668
}
@@ -222,7 +224,15 @@ public String getPathTranslated() {
222224
*/
223225
public String getQueryString() {
224226

225-
return null;
227+
return queryString;
228+
}
229+
230+
/**
231+
* set the query string.
232+
*/
233+
public void setQueryString(String str)
234+
{
235+
this.queryString = str;
226236
}
227237

228238
/**

0 commit comments

Comments
 (0)