commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philippe Poulard <Philippe.Poul...@sophia.inria.fr>
Subject [VFS] unexpected http connect
Date Mon, 02 Oct 2006 07:51:21 GMT
hi,

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;
     }

-- 
Cordialement,

               ///
              (. .)
  --------ooO--(_)--Ooo--------
|      Philippe Poulard       |
  -----------------------------
  http://reflex.gforge.inria.fr/
        Have the RefleX !

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message