X-Git-Url: https://code.wpia.club/?p=gigi.git;a=blobdiff_plain;f=tests%2Forg%2Fcacert%2Fgigi%2FtestUtils%2FPingTest.java;h=31f45c99b8143c3e0d40e66ffccc70568a186d0e;hp=fd5de700daa9d0c87a0443cda2c3c097f54cabc4;hb=ed2d14a0fb2a1ce8df9537c0e8895bb2f783adfc;hpb=b64118c8dbe75bcae43a4bd8bc8278125e48a7af diff --git a/tests/org/cacert/gigi/testUtils/PingTest.java b/tests/org/cacert/gigi/testUtils/PingTest.java index fd5de700..31f45c99 100644 --- a/tests/org/cacert/gigi/testUtils/PingTest.java +++ b/tests/org/cacert/gigi/testUtils/PingTest.java @@ -52,6 +52,9 @@ public abstract class PingTest extends ClientTest { openConnection.setDoOutput(true); openConnection.getOutputStream().write(content.getBytes("UTF-8")); openConnection.getHeaderField("Location"); + if (((HttpURLConnection) openConnection).getResponseCode() != 302) { + throw new Error(IOUtils.readURL(openConnection)); + } String newcontent = IOUtils.readURL(cookie(u.openConnection(), cookie)); Pattern dlink = Pattern.compile(DomainOverview.PATH + "([0-9]+)'>");