Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.equinox.http.servlet.tests/src/org')
-rw-r--r--bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/ServletTest.java20
-rw-r--r--bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/resource2.txt1
2 files changed, 21 insertions, 0 deletions
diff --git a/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/ServletTest.java b/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/ServletTest.java
index 299c6feb..e820cef8 100644
--- a/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/ServletTest.java
+++ b/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/ServletTest.java
@@ -1969,6 +1969,26 @@ public class ServletTest extends BaseTest {
}
@Test
+ public void test_ResourceAliasNormal() throws Exception {
+ HttpService extendedHttpService = getHttpService();
+
+ extendedHttpService.registerResources("/testalias", "/org/eclipse/equinox/http/servlet/tests", null);
+
+ String actual = requestAdvisor.request("testalias/resource2.txt");
+ Assert.assertEquals("Wrong value.", "test", actual);
+ }
+
+ @Test
+ public void test_ResourceAliasSlash() throws Exception {
+ HttpService extendedHttpService = getHttpService();
+
+ extendedHttpService.registerResources("/", "/org/eclipse/equinox/http/servlet/tests", null);
+
+ String actual = requestAdvisor.request("resource2.txt");
+ Assert.assertEquals("Wrong value.", "test", actual);
+ }
+
+ @Test
public void test_ResourceRangeRequest_Complete() throws Exception {
Bundle bundle = installBundle(TEST_BUNDLE_2);
ServletContextHelper customSCH = new ServletContextHelper(bundle) {
diff --git a/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/resource2.txt b/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/resource2.txt
new file mode 100644
index 00000000..30d74d25
--- /dev/null
+++ b/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/resource2.txt
@@ -0,0 +1 @@
+test \ No newline at end of file

Back to the top