Merge branch 'develop' into features/JAL-4219_extended_fasta_rna_ss
[jalview.git] / src / jalview / ext / pymol / PymolManager.java
index 7dfdb0c..80327b8 100644 (file)
@@ -38,6 +38,7 @@ import jalview.bin.Cache;
 import jalview.bin.Console;
 import jalview.gui.Preferences;
 import jalview.structure.StructureCommandI;
+import jalview.util.HttpUtils;
 import jalview.util.Platform;
 
 public class PymolManager
@@ -158,7 +159,7 @@ public class PymolManager
           boolean getReply)
   {
     String postBody = getPostRequest(command);
-    // System.out.println(postBody);// debug
+    // jalview.bin.Console.outPrintln(postBody);// debug
     String rpcUrl = "http://127.0.0.1:" + this.pymolXmlRpcPort;
     PrintWriter out = null;
     BufferedReader in = null;
@@ -167,7 +168,8 @@ public class PymolManager
     try
     {
       URL realUrl = new URL(rpcUrl);
-      HttpURLConnection conn = (HttpURLConnection) realUrl.openConnection();
+      HttpURLConnection conn = (HttpURLConnection) HttpUtils
+              .openConnection(realUrl);
       conn.setRequestProperty("accept", "*/*");
       conn.setRequestProperty("content-type", "text/xml");
       conn.setDoOutput(true);