You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ad...@apache.org on 2004/10/03 05:47:46 UTC
svn commit: rev 51820 - geronimo/trunk/modules/jetty/src/test/org/apache/geronimo/jetty
Author: adc
Date: Sat Oct 2 20:47:45 2004
New Revision: 51820
Modified:
geronimo/trunk/modules/jetty/src/test/org/apache/geronimo/jetty/SecurityTest.java
Log:
Updated test to account for http://issues.apache.org/jira/browse/GERONIMO-323
Modified: geronimo/trunk/modules/jetty/src/test/org/apache/geronimo/jetty/SecurityTest.java
==============================================================================
--- geronimo/trunk/modules/jetty/src/test/org/apache/geronimo/jetty/SecurityTest.java (original)
+++ geronimo/trunk/modules/jetty/src/test/org/apache/geronimo/jetty/SecurityTest.java Sat Oct 2 20:47:45 2004
@@ -125,9 +125,13 @@
assertEquals(HttpURLConnection.HTTP_MOVED_TEMP, connection.getResponseCode());
String cookie = connection.getHeaderField("Set-Cookie");
+ cookie = cookie.substring(0, cookie.lastIndexOf(';'));
String location = connection.getHeaderField("Location");
- cookie = cookie.substring(0, cookie.lastIndexOf(';'));
+ connection = (HttpURLConnection) new URL(location).openConnection();
+ connection.setInstanceFollowRedirects(false);
+ assertEquals(HttpURLConnection.HTTP_OK, connection.getResponseCode());
+
location = location.substring(0, location.lastIndexOf('/')) + "/j_security_check?j_username=alan&j_password=starcraft";
connection = (HttpURLConnection) new URL(location).openConnection();