[ 
https://issues.apache.org/jira/browse/VFS-85?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12778248#action_12778248
 ] 

Philippe Poulard commented on VFS-85:
-------------------------------------

Hi,

Well the snippet code I proposed below was supposed to fix the issue; 
for my own use, I have rewritten the http provider to solve it

Things doesn't move so much on this project; is it still alive ?



-- 
Cordialement,

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


> unexpected http connect
> -----------------------
>
>                 Key: VFS-85
>                 URL: https://issues.apache.org/jira/browse/VFS-85
>             Project: Commons VFS
>          Issue Type: Improvement
>            Reporter: Philippe Poulard
>             Fix For: later
>
>
> 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...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to