]> WPIA git - gigi.git/blobdiff - tests/org/cacert/gigi/testUtils/ManagedTest.java
upd: use a more strict pattern for handling forms
[gigi.git] / tests / org / cacert / gigi / testUtils / ManagedTest.java
index 01ee4c5980b869b56054abc0b647a639eb0ff5bd..89b380a96520d2ab9a9062a456852ab78a68e8a0 100644 (file)
@@ -437,7 +437,10 @@ public class ManagedTest extends ConfiguredTest {
     }
 
     public static String executeBasicWebInteraction(String cookie, String path, String query, int formIndex) throws IOException, MalformedURLException, UnsupportedEncodingException {
-        URLConnection uc = post(cookie, path, query, formIndex);
+        HttpURLConnection uc = post(cookie, path, query, formIndex);
+        if (uc.getResponseCode() == 302) {
+            return null;
+        }
         String error = fetchStartErrorMessage(IOUtils.readURL(uc));
         return error;
     }