Author: fmeschbe
Date: Wed Feb  2 08:13:01 2011
New Revision: 1066362

URL: http://svn.apache.org/viewvc?rev=1066362&view=rev
Log:
SLING-1965 Integration test ensuring request parameters on redirect

Modified:
    
sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/RedirectTest.java

Modified: 
sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/RedirectTest.java
URL: 
http://svn.apache.org/viewvc/sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/RedirectTest.java?rev=1066362&r1=1066361&r2=1066362&view=diff
==============================================================================
--- 
sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/RedirectTest.java
 (original)
+++ 
sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/RedirectTest.java
 Wed Feb  2 08:13:01 2011
@@ -76,6 +76,19 @@ public class RedirectTest extends HttpTe
         location = get.getResponseHeader("Location").getValue();
         assertNotNull(location);
         assertTrue(location.endsWith("/index.html.html"));
+
+        // get the created node without following redirects
+        get = new GetMethod(redirNodeUrl + "?param=value");
+        get.setFollowRedirects(false);
+        status = httpClient.executeMethod(get);
+
+        // expect temporary redirect ...
+        assertEquals(302, status);
+
+        // ... to */index.html
+        location = get.getResponseHeader("Location").getValue();
+        assertNotNull(location);
+        assertTrue(location.endsWith("/index.html?param=value"));
     }
 
     /** test 404 response when sling:target is missing */


Reply via email to