X-Git-Url: https://code.wpia.club/?p=gigi.git;a=blobdiff_plain;f=tests%2Forg%2Fcacert%2Fgigi%2FtestUtils%2FIOUtils.java;h=61cd17840c88c659f225c5ee08b54af5a2dd4243;hp=23db401f8221d0c50769c08acb893437e53ba7a3;hb=a09f042a230804825c3d22726dce65e7b8ed814e;hpb=aa5723dbb64ec8efa63909d39ff72364f0a5ee96 diff --git a/tests/org/cacert/gigi/testUtils/IOUtils.java b/tests/org/cacert/gigi/testUtils/IOUtils.java index 23db401f..61cd1784 100644 --- a/tests/org/cacert/gigi/testUtils/IOUtils.java +++ b/tests/org/cacert/gigi/testUtils/IOUtils.java @@ -17,7 +17,7 @@ public class IOUtils { public static String readURL(URLConnection in) { try { - if ( !in.getContentType().equals("text/html; charset=UTF-8") && !in.getContentType().equals("text/plain; charset=UTF-8")) { + if ( !in.getContentType().equals("text/html; charset=UTF-8") && !in.getContentType().equals("text/plain; charset=UTF-8") && !in.getContentType().equals("application/json; charset=UTF-8")) { if (in instanceof HttpURLConnection && ((HttpURLConnection) in).getResponseCode() != 200) { System.err.println(readURL(new InputStreamReader(((HttpURLConnection) in).getErrorStream(), "UTF-8"))); }