Uploaded image for project: 'Chemistry (Retired)'
  1. Chemistry (Retired)
  2. CMIS-474

HttpURLConnection do not close

    XMLWordPrintableJSON

Details

    Description

      If execute this code i got an error.
      Session session = getCMISSession();
      try{
      Folder folder = (Folder) session.getObjectByPath("/");
      for (int i = 0; i < 100; i++)

      { System.out.println("before create folder"); Folder newFolder = createNewFolder(folder, "TEST HTTPCONNECTION CLOSE"); System.out.println("after create folder"); newFolder.delete(true); System.out.println("after delete folder"); }

      }catch (CmisBaseException e)

      { e.printStackTrace(); System.err.println(e.getErrorContent()); }


      Maybe because in org.apache.chemistry.opencmis.client.bindings.spi.atompub.HttpUtils after open connection
      don't close the connection.
      HttpURLConnection conn = (HttpURLConnection) (new URL(url.toString())).openConnection();
      if I add this code everythings work fine.
      conn.setRequestProperty("connection", "close");

      Attachments

        Activity

          People

            Unassigned Unassigned
            marco.spasiano Marco Spasiano
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: