]> WPIA git - gigi.git/blobdiff - tests/org/cacert/gigi/testUtils/PingTest.java
Fix: various coverity charset issues.
[gigi.git] / tests / org / cacert / gigi / testUtils / PingTest.java
index 50d5d7fc14696a97692c39e8fb85b35ec8feb9ed..20395878fb4411dc7251bd0166f8cfb2df0eef44 100644 (file)
@@ -18,8 +18,14 @@ import org.cacert.gigi.database.GigiResultSet;
 import org.cacert.gigi.pages.account.domain.DomainOverview;
 import org.junit.After;
 
+/**
+ * Base class for test suites that check extensively if the domain-ping
+ * functionality wroks as expected.
+ */
 public abstract class PingTest extends ClientTest {
 
+    protected String csrf;
+
     protected static void updateService(String token, String value, String action) throws IOException, MalformedURLException {
         String manage = getTestProps().getProperty("domain.manage");
         assumeNotNull(manage);
@@ -44,7 +50,7 @@ public abstract class PingTest extends ClientTest {
         URLConnection openConnection = u.openConnection();
         openConnection.setRequestProperty("Cookie", cookie);
         openConnection.setDoOutput(true);
-        openConnection.getOutputStream().write(content.getBytes());
+        openConnection.getOutputStream().write(content.getBytes("UTF-8"));
         openConnection.getHeaderField("Location");
 
         String newcontent = IOUtils.readURL(cookie(u.openConnection(), cookie));