use of org.apache.tomcat.unittest.TesterRequest in project tomcat by apache.
the class TestResponse method testBug53062b.
@Test
public void testBug53062b() throws Exception {
Request req = new TesterRequest();
Response resp = new Response();
resp.setRequest(req);
String result = resp.toAbsolute(".");
Assert.assertEquals("http://localhost:8080/level1/level2/", result);
}
use of org.apache.tomcat.unittest.TesterRequest in project tomcat by apache.
the class TestResponse method testBug53469b.
@Test
public void testBug53469b() throws Exception {
Request req = new TesterRequest();
Response resp = new Response();
resp.setRequest(req);
String result = resp.encodeURL("../../../../bar.html");
Assert.assertEquals("../../../../bar.html", result);
}
use of org.apache.tomcat.unittest.TesterRequest in project tomcat by apache.
the class TestResponse method testBug53062j.
@Test
public void testBug53062j() throws Exception {
Request req = new TesterRequest();
Response resp = new Response();
resp.setRequest(req);
String result = resp.toAbsolute("./..?x=/../../");
Assert.assertEquals("http://localhost:8080/level1/?x=/../../", result);
}
use of org.apache.tomcat.unittest.TesterRequest in project tomcat by apache.
the class TestResponse method testBug53062p.
@Test
public void testBug53062p() throws Exception {
Request req = new TesterRequest();
Response resp = new Response();
resp.setRequest(req);
String result = resp.toAbsolute("./..#/../..");
Assert.assertEquals("http://localhost:8080/level1/#/../..", result);
}
use of org.apache.tomcat.unittest.TesterRequest in project tomcat by apache.
the class TestResponse method testBug53062g.
@Test
public void testBug53062g() throws Exception {
Request req = new TesterRequest();
Response resp = new Response();
resp.setRequest(req);
String result = resp.toAbsolute("bar.html?x=/../");
Assert.assertEquals("http://localhost:8080/level1/level2/bar.html?x=/../", result);
}
Aggregations