]> WPIA git - gigi.git/blobdiff - tests/org/cacert/gigi/testUtils/IOUtils.java
upd: make output of Find-Agent-info JSON-formatted
[gigi.git] / tests / org / cacert / gigi / testUtils / IOUtils.java
index 23db401f8221d0c50769c08acb893437e53ba7a3..61cd17840c88c659f225c5ee08b54af5a2dd4243 100644 (file)
@@ -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")));
                 }