Uploaded image for project: 'Commons VFS'
  1. Commons VFS
  2. VFS-85

unexpected http connect

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • later
    • None

    Description

      when I try to create a file object with "http://www.somehost.com/", VFS fails when the host is unreachable (e.g. when not connected to internet)

      this is because org.apache.commons.vfs.provider.http.HttpFileSystem has a constructor that has an argument HttpClient, whereas it should be an HttpClientFactory

      the HttpClient should be resolved only when required :

      protected HttpClient getClient()
      {
      if ( this.client == null )

      { this.client = clientFactory.createConnection(...); }

      return client;
      }

      I didn't check it, but this issue is certainly present with FTP and others...

      Attachments

        Activity

          People

            Unassigned Unassigned
            ppoulard Philippe Poulard
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: