Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E7CCD10CB6 for ; Wed, 4 Feb 2015 11:43:37 +0000 (UTC) Received: (qmail 77243 invoked by uid 500); 4 Feb 2015 11:43:35 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 77153 invoked by uid 500); 4 Feb 2015 11:43:35 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 77139 invoked by uid 99); 4 Feb 2015 11:43:35 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Feb 2015 11:43:35 +0000 Date: Wed, 4 Feb 2015 11:43:35 +0000 (UTC) From: "Patrick GH (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (VFS-560) File can't be downloaded if HTTP HEAD on base url fails MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/VFS-560?page=3Dcom.atlassian.ji= ra.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1430498= 7#comment-14304987 ]=20 Patrick GH commented on VFS-560: -------------------------------- I have reproduced the problem with the following code: {code:java}public class TestPgh { public static void main(String[] args) throws FileSystemException{ StandardFileSystemManager fileSystemManager =3D new StandardFileSys= temManager(); fileSystemManager.init(); FileObject srcFile =3D fileSystemManager.resolveFile("https://serve= r1.com/images/4/1/7/1/prev_14044171.jpg"); FileObject dstFile =3D fileSystemManager.resolveFile("/Users/pgh/De= sktop/image.jpg"); dstFile.copyFrom(srcFile, new AllFileSelector()); fileSystemManager.close(); } }{code} The result was: {noformat} 12:34:11.221 [main] INFO o.a.c.v.i.StandardFileSystemManager - Using "/var= /folders/7h/6fvqgj9x4bz6fbn0l_213qxr0000gn/T/vfs_cache" as temporary files = store. 12:34:11.311 [main] DEBUG o.a.c.v.i.StandardFileSystemManager - Skipping pr= ovider "org.apache.commons.vfs2.provider.webdav.WebdavFileProvider" because= required class "org.apache.jackrabbit.webdav.client.methods.DavMethod" is = not available. 12:34:11.337 [main] DEBUG o.a.c.h.params.DefaultHttpParams - Set parameter = http.useragent =3D Jakarta Commons-HttpClient/3.1 12:34:11.339 [main] DEBUG o.a.c.h.params.DefaultHttpParams - Set parameter = http.protocol.version =3D HTTP/1.1 12:34:11.340 [main] DEBUG o.a.c.h.params.DefaultHttpParams - Set parameter = http.connection-manager.class =3D class org.apache.commons.httpclient.Simpl= eHttpConnectionManager 12:34:11.341 [main] DEBUG o.a.c.h.params.DefaultHttpParams - Set parameter = http.protocol.cookie-policy =3D default 12:34:11.341 [main] DEBUG o.a.c.h.params.DefaultHttpParams - Set parameter = http.protocol.element-charset =3D US-ASCII 12:34:11.341 [main] DEBUG o.a.c.h.params.DefaultHttpParams - Set parameter = http.protocol.content-charset =3D ISO-8859-1 12:34:11.342 [main] DEBUG o.a.c.h.params.DefaultHttpParams - Set parameter = http.method.retry-handler =3D org.apache.commons.httpclient.DefaultHttpMeth= odRetryHandler@6ee1dac2 12:34:11.343 [main] DEBUG o.a.c.h.params.DefaultHttpParams - Set parameter = http.dateparser.patterns =3D [EEE, dd MMM yyyy HH:mm:ss zzz, EEEE, dd-MMM-y= y HH:mm:ss zzz, EEE MMM d HH:mm:ss yyyy, EEE, dd-MMM-yyyy HH:mm:ss z, EEE, = dd-MMM-yyyy HH-mm-ss z, EEE, dd MMM yy HH:mm:ss z, EEE dd-MMM-yyyy HH:mm:ss= z, EEE dd MMM yyyy HH:mm:ss z, EEE dd-MMM-yyyy HH-mm-ss z, EEE dd-MMM-yy H= H:mm:ss z, EEE dd MMM yy HH:mm:ss z, EEE,dd-MMM-yy HH:mm:ss z, EEE,dd-MMM-y= yyy HH:mm:ss z, EEE, dd-MM-yyyy HH:mm:ss z] 12:34:11.345 [main] DEBUG o.a.commons.httpclient.HttpClient - Java version:= 1.6.0_65 12:34:11.346 [main] DEBUG o.a.commons.httpclient.HttpClient - Java vendor: = Apple Inc. 12:34:11.346 [main] DEBUG o.a.commons.httpclient.HttpClient - Java class pa= th: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/de= ploy.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/l= ib/dt.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/= lib/javaws.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/= Home/lib/jce.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Content= s/Home/lib/jconsole.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/= Contents/Home/lib/management-agent.jar:/System/Library/Java/JavaVirtualMach= ines/1.6.0.jdk/Contents/Home/lib/plugin.jar:/System/Library/Java/JavaVirtua= lMachines/1.6.0.jdk/Contents/Home/lib/sa-jdi.jar:/System/Library/Java/JavaV= irtualMachines/1.6.0.jdk/Contents/Classes/charsets.jar:/System/Library/Java= /JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar:/System/Library= /Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/jsse.jar:/System/Libra= ry/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/ui.jar:/System/Libra= ry/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/apple_provider.= jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ex= t/dnsns.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Hom= e/lib/ext/localedata.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk= /Contents/Home/lib/ext/sunjce_provider.jar:/System/Library/Java/JavaVirtual= Machines/1.6.0.jdk/Contents/Home/lib/ext/sunpkcs11.jar:/Users/Shared/develo= pment/projects_git/processsystem3/agent-vfsagent/target/classes:/Users/pgh/= .m2/repository/de/laudert/processsystem3/laudert/ps-core/3.0.6-17/ps-core-3= .0.6-17.jar:/Users/pgh/.m2/repository/org/slf4j/jcl-over-slf4j/1.7.5/jcl-ov= er-slf4j-1.7.5.jar:/Users/pgh/.m2/repository/org/slf4j/slf4j-api/1.7.5/slf4= j-api-1.7.5.jar:/Users/pgh/.m2/repository/ch/qos/logback/logback-classic/1.= 0.13/logback-classic-1.0.13.jar:/Users/pgh/.m2/repository/ch/qos/logback/lo= gback-core/1.0.13/logback-core-1.0.13.jar:/Users/pgh/.m2/repository/org/jdo= m/jdom/1.1.3/jdom-1.1.3.jar:/Users/pgh/.m2/repository/org/apache/commons/co= mmons-lang3/3.0.1/commons-lang3-3.0.1.jar:/Users/pgh/.m2/repository/de/laud= ert/processsystem3/laudert/ps-agent/3.0.6-17/ps-agent-3.0.6-17.jar:/Users/p= gh/.m2/repository/commons-daemon/commons-daemon/1.0.7/commons-daemon-1.0.7.= jar:/Users/pgh/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.= 6.jar:/Users/pgh/.m2/repository/commons-io/commons-io/2.1/commons-io-2.1.ja= r:/Users/pgh/.m2/repository/org/apache/commons/commons-exec/1.3/commons-exe= c-1.3.jar:/Users/pgh/.m2/repository/org/springframework/spring-context/3.2.= 5.RELEASE/spring-context-3.2.5.RELEASE.jar:/Users/pgh/.m2/repository/org/sp= ringframework/spring-aop/3.2.5.RELEASE/spring-aop-3.2.5.RELEASE.jar:/Users/= pgh/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar:/Users/p= gh/.m2/repository/org/springframework/spring-beans/3.2.5.RELEASE/spring-bea= ns-3.2.5.RELEASE.jar:/Users/pgh/.m2/repository/org/springframework/spring-c= ore/3.2.5.RELEASE/spring-core-3.2.5.RELEASE.jar:/Users/pgh/.m2/repository/c= ommons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar:/Users/pgh/.= m2/repository/org/springframework/spring-expression/3.2.5.RELEASE/spring-ex= pression-3.2.5.RELEASE.jar:/Users/pgh/.m2/repository/org/apache/commons/com= mons-vfs2/2.0-SNAPSHOT/commons-vfs2-2.0-SNAPSHOT.jar:/Users/pgh/.m2/reposit= ory/org/apache/maven/scm/maven-scm-api/1.4/maven-scm-api-1.4.jar:/Users/pgh= /.m2/repository/org/codehaus/plexus/plexus-utils/1.5.6/plexus-utils-1.5.6.j= ar:/Users/pgh/.m2/repository/org/apache/maven/scm/maven-scm-provider-svnexe= /1.4/maven-scm-provider-svnexe-1.4.jar:/Users/pgh/.m2/repository/org/apache= /maven/scm/maven-scm-provider-svn-commons/1.4/maven-scm-provider-svn-common= s-1.4.jar:/Users/pgh/.m2/repository/regexp/regexp/1.3/regexp-1.3.jar:/Users= /pgh/.m2/repository/com/jcraft/jsch/0.1.50/jsch-0.1.50.jar:/Users/pgh/.m2/r= epository/commons-net/commons-net/3.1/commons-net-3.1.jar:/Users/pgh/.m2/re= pository/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.j= ar:/Users/pgh/.m2/repository/commons-codec/commons-codec/1.2/commons-codec-= 1.2.jar:/Users/pgh/.m2/repository/org/springframework/spring-jdbc/3.2.5.REL= EASE/spring-jdbc-3.2.5.RELEASE.jar:/Users/pgh/.m2/repository/org/springfram= ework/spring-tx/3.2.5.RELEASE/spring-tx-3.2.5.RELEASE.jar:/Users/pgh/.m2/re= pository/org/springframework/spring-orm/3.2.5.RELEASE/spring-orm-3.2.5.RELE= ASE.jar:/Users/pgh/.m2/repository/mysql/mysql-connector-java/5.1.20/mysql-c= onnector-java-5.1.20.jar:/Applications/IntelliJ IDEA 12.app/lib/idea_rt.jar 12:34:11.346 [main] DEBUG o.a.commons.httpclient.HttpClient - Operating sys= tem name: Mac OS X 12:34:11.346 [main] DEBUG o.a.commons.httpclient.HttpClient - Operating sys= tem architecture: x86_64 12:34:11.346 [main] DEBUG o.a.commons.httpclient.HttpClient - Operating sys= tem version: 10.10.2 12:34:11.390 [main] DEBUG o.a.commons.httpclient.HttpClient - SUN 1.6: SUN = (DSA key/parameter generation; DSA signing; SHA-1, MD5 digests; SecureRando= m; X.509 certificates; JKS keystore; PKIX CertPathValidator; PKIX CertPathB= uilder; LDAP, Collection CertStores, JavaPolicy Policy; JavaLoginConfig Con= figuration) 12:34:11.390 [main] DEBUG o.a.commons.httpclient.HttpClient - Apple 1.0: Ap= ple Provider (implements DES, Triple DES, AES, Blowfish, PBE, Diffie-Hellma= n, HMAC/MD5, HMAC/SHA1) 12:34:11.390 [main] DEBUG o.a.commons.httpclient.HttpClient - SunRsaSign 1.= 5: Sun RSA signature provider 12:34:11.390 [main] DEBUG o.a.commons.httpclient.HttpClient - SunJSSE 1.6: = Sun JSSE provider(PKCS12, SunX509 key/trust factories, SSLv3, TLSv1) 12:34:11.390 [main] DEBUG o.a.commons.httpclient.HttpClient - SunJCE 1.6: S= unJCE Provider (implements RSA, DES, Triple DES, AES, Blowfish, ARCFOUR, RC= 2, PBE, Diffie-Hellman, HMAC) 12:34:11.390 [main] DEBUG o.a.commons.httpclient.HttpClient - SunJGSS 1.0: = Sun (Kerberos v5, SPNEGO) 12:34:11.390 [main] DEBUG o.a.commons.httpclient.HttpClient - SunSASL 1.5: = Sun SASL provider(implements client mechanisms for: DIGEST-MD5, GSSAPI, EXT= ERNAL, PLAIN, CRAM-MD5; server mechanisms for: DIGEST-MD5, GSSAPI, CRAM-MD5= ) 12:34:11.390 [main] DEBUG o.a.commons.httpclient.HttpClient - XMLDSig 1.0: = XMLDSig (DOM XMLSignatureFactory; DOM KeyInfoFactory) 12:34:11.390 [main] DEBUG o.a.commons.httpclient.HttpClient - SunPCSC 1.6: = Sun PC/SC provider 12:34:11.400 [main] DEBUG o.a.c.h.params.DefaultHttpParams - Set parameter = http.connection-manager.max-per-host =3D {HostConfiguration[host=3Dhttps://= server1.com]=3D5} 12:34:11.400 [main] DEBUG o.a.c.h.params.DefaultHttpParams - Set parameter = http.connection-manager.max-total =3D 50 12:34:11.418 [main] DEBUG o.a.c.h.MultiThreadedHttpConnectionManager - Http= ConnectionManager.getConnection: config =3D HostConfiguration[host=3Dhttps= ://server1.com], timeout =3D 0 12:34:11.419 [main] DEBUG o.a.c.h.MultiThreadedHttpConnectionManager - Allo= cating new connection, hostConfig=3DHostConfiguration[host=3Dhttps://server= 1.com] 12:34:11.422 [main] DEBUG o.a.c.httpclient.HttpConnection - Open connection= to server1.com:443 12:34:11.759 [main] DEBUG httpclient.wire.header - >> "HEAD / HTTP/1.1[\r][= \n]" 12:34:11.762 [main] DEBUG o.a.c.httpclient.HttpMethodBase - Adding Host req= uest header 12:34:11.773 [main] DEBUG httpclient.wire.header - >> "User-Agent: Jakarta = Commons-HttpClient/3.1[\r][\n]" 12:34:11.773 [main] DEBUG httpclient.wire.header - >> "Host: server1.com[\r= ][\n]" 12:34:11.773 [main] DEBUG httpclient.wire.header - >> "[\r][\n]" 12:34:11.992 [main] DEBUG httpclient.wire.header - << "HTTP/1.1 302 Found[\= r][\n]" 12:34:11.992 [main] DEBUG httpclient.wire.header - << "HTTP/1.1 302 Found[\= r][\n]" 12:34:11.993 [main] DEBUG httpclient.wire.header - << "Date: Wed, 04 Feb 20= 15 11:34:11 GMT[\r][\n]" 12:34:11.993 [main] DEBUG httpclient.wire.header - << "Server: Apache/2.2.1= 6 (Debian)[\r][\n]" 12:34:11.993 [main] DEBUG httpclient.wire.header - << "Location: http://www= .server2.com[\r][\n]" 12:34:11.994 [main] DEBUG httpclient.wire.header - << "Vary: Accept-Encodin= g[\r][\n]" 12:34:11.994 [main] DEBUG httpclient.wire.header - << "Content-Type: text/h= tml; charset=3Diso-8859-1[\r][\n]" 12:34:11.994 [main] DEBUG httpclient.wire.header - << "[\r][\n]" 12:34:11.994 [main] DEBUG o.a.c.httpclient.HttpMethodBase - Resorting to pr= otocol version default close connection policy 12:34:11.994 [main] DEBUG o.a.c.httpclient.HttpMethodBase - Should NOT clos= e connection, using HTTP/1.1 12:34:11.994 [main] DEBUG o.a.c.httpclient.HttpMethodDirector - Redirect re= quired 12:34:11.994 [main] DEBUG o.a.c.httpclient.HttpMethodDirector - Redirect re= quested to location 'http://www.server2.com' 12:34:12.007 [main] DEBUG o.a.c.httpclient.HttpMethodDirector - Redirecting= from 'https://server1.com:443/' to 'http://www.server2.com 12:34:12.007 [main] DEBUG o.a.c.httpclient.HttpMethodDirector - Execute red= irect 1 of 100 12:34:12.007 [main] DEBUG o.a.c.httpclient.HttpConnection - Releasing conne= ction back to connection manager. 12:34:12.007 [main] DEBUG o.a.c.h.MultiThreadedHttpConnectionManager - Free= ing connection, hostConfig=3DHostConfiguration[host=3Dhttps://server1.com] 12:34:12.008 [main] DEBUG o.a.c.h.util.IdleConnectionHandler - Adding conne= ction at: 1423049652008 12:34:12.008 [main] DEBUG o.a.c.h.MultiThreadedHttpConnectionManager - Noti= fying no-one, there are no waiting threads 12:34:12.008 [main] DEBUG o.a.c.h.MultiThreadedHttpConnectionManager - Http= ConnectionManager.getConnection: config =3D HostConfiguration[host=3Dhttp:= //www.server2.com], timeout =3D 0 12:34:12.008 [main] DEBUG o.a.c.h.MultiThreadedHttpConnectionManager - Allo= cating new connection, hostConfig=3DHostConfiguration[host=3Dhttp://www.ser= ver2.com] 12:34:12.008 [main] DEBUG o.a.c.httpclient.HttpConnection - Open connection= to www.server2.com:80 12:34:12.011 [main] DEBUG httpclient.wire.header - >> "HEAD / HTTP/1.1[\r][= \n]" 12:34:12.011 [main] DEBUG o.a.c.httpclient.HttpMethodBase - Adding Host req= uest header 12:34:12.011 [main] DEBUG httpclient.wire.header - >> "User-Agent: Jakarta = Commons-HttpClient/3.1[\r][\n]" 12:34:12.011 [main] DEBUG httpclient.wire.header - >> "Host: www.server2.co= m[\r][\n]" 12:34:12.011 [main] DEBUG httpclient.wire.header - >> "[\r][\n]" 12:34:12.012 [main] DEBUG o.a.c.httpclient.HttpMethodDirector - Closing the= connection. 12:34:12.013 [main] INFO o.a.c.httpclient.HttpMethodDirector - I/O excepti= on (org.apache.commons.httpclient.NoHttpResponseException) caught when proc= essing request: The server www.server2.com failed to respond 12:34:12.020 [main] DEBUG o.a.c.httpclient.HttpMethodDirector - The server = www.server2.com failed to respond org.apache.commons.httpclient.NoHttpResponseException: The server www.serve= r2.com failed to respond =09at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMetho= dBase.java:1976) ~[commons-httpclient-3.1.jar:na] =09at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodB= ase.java:1735) ~[commons-httpclient-3.1.jar:na] =09at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.j= ava:1098) ~[commons-httpclient-3.1.jar:na] =09at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(Htt= pMethodDirector.java:398) [commons-httpclient-3.1.jar:na] =09at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMe= thodDirector.java:171) [commons-httpclient-3.1.jar:na] =09at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.jav= a:397) [commons-httpclient-3.1.jar:na] =09at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.jav= a:323) [commons-httpclient-3.1.jar:na] =09at org.apache.commons.vfs2.provider.http.HttpClientFactory.createConnect= ion(HttpClientFactory.java:148) [commons-vfs2-2.0-SNAPSHOT.jar:2.0-SNAPSHOT= ] =09at org.apache.commons.vfs2.provider.http.HttpClientFactory.createConnect= ion(HttpClientFactory.java:50) [commons-vfs2-2.0-SNAPSHOT.jar:2.0-SNAPSHOT] =09at org.apache.commons.vfs2.provider.http.HttpFileProvider.doCreateFileSy= stem(HttpFileProvider.java:83) [commons-vfs2-2.0-SNAPSHOT.jar:2.0-SNAPSHOT] =09at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.getF= ileSystem(AbstractOriginatingFileProvider.java:103) [commons-vfs2-2.0-SNAPS= HOT.jar:2.0-SNAPSHOT] =09at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.find= File(AbstractOriginatingFileProvider.java:81) [commons-vfs2-2.0-SNAPSHOT.ja= r:2.0-SNAPSHOT] =09at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.find= File(AbstractOriginatingFileProvider.java:65) [commons-vfs2-2.0-SNAPSHOT.ja= r:2.0-SNAPSHOT] =09at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(Def= aultFileSystemManager.java:693) [commons-vfs2-2.0-SNAPSHOT.jar:2.0-SNAPSHOT= ] =09at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(Def= aultFileSystemManager.java:649) [commons-vfs2-2.0-SNAPSHOT.jar:2.0-SNAPSHOT= ] =09at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(Def= aultFileSystemManager.java:605) [commons-vfs2-2.0-SNAPSHOT.jar:2.0-SNAPSHOT= ] =09at de.test.TestPgh.main(TestPgh.java:18) [classes/:na] 12:34:12.021 [main] INFO o.a.c.httpclient.HttpMethodDirector - Retrying re= quest 12:34:12.021 [main] DEBUG o.a.c.httpclient.HttpConnection - Open connection= to www.server2.com:80 12:34:12.021 [main] DEBUG httpclient.wire.header - >> "HEAD / HTTP/1.1[\r][= \n]" 12:34:12.021 [main] DEBUG o.a.c.httpclient.HttpMethodBase - Adding Host req= uest header 12:34:12.021 [main] DEBUG httpclient.wire.header - >> "User-Agent: Jakarta = Commons-HttpClient/3.1[\r][\n]" 12:34:12.022 [main] DEBUG httpclient.wire.header - >> "Host: www.server2.co= m[\r][\n]" 12:34:12.022 [main] DEBUG httpclient.wire.header - >> "[\r][\n]" 12:34:12.023 [main] DEBUG o.a.c.httpclient.HttpMethodDirector - Closing the= connection. 12:34:12.023 [main] INFO o.a.c.httpclient.HttpMethodDirector - I/O excepti= on (org.apache.commons.httpclient.NoHttpResponseException) caught when proc= essing request: The server www.server2.com failed to respond 12:34:12.023 [main] DEBUG o.a.c.httpclient.HttpMethodDirector - The server = www.server2.com failed to respond org.apache.commons.httpclient.NoHttpResponseException: The server www.serve= r2.com failed to respond =09at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMetho= dBase.java:1976) ~[commons-httpclient-3.1.jar:na] =09at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodB= ase.java:1735) ~[commons-httpclient-3.1.jar:na] =09at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.j= ava:1098) ~[commons-httpclient-3.1.jar:na] =09at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(Htt= pMethodDirector.java:398) [commons-httpclient-3.1.jar:na] =09at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMe= thodDirector.java:171) [commons-httpclient-3.1.jar:na] =09at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.jav= a:397) [commons-httpclient-3.1.jar:na] =09at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.jav= a:323) [commons-httpclient-3.1.jar:na] =09at org.apache.commons.vfs2.provider.http.HttpClientFactory.createConnect= ion(HttpClientFactory.java:148) [commons-vfs2-2.0-SNAPSHOT.jar:2.0-SNAPSHOT= ] =09at org.apache.commons.vfs2.provider.http.HttpClientFactory.createConnect= ion(HttpClientFactory.java:50) [commons-vfs2-2.0-SNAPSHOT.jar:2.0-SNAPSHOT] =09at org.apache.commons.vfs2.provider.http.HttpFileProvider.doCreateFileSy= stem(HttpFileProvider.java:83) [commons-vfs2-2.0-SNAPSHOT.jar:2.0-SNAPSHOT] =09at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.getF= ileSystem(AbstractOriginatingFileProvider.java:103) [commons-vfs2-2.0-SNAPS= HOT.jar:2.0-SNAPSHOT] =09at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.find= File(AbstractOriginatingFileProvider.java:81) [commons-vfs2-2.0-SNAPSHOT.ja= r:2.0-SNAPSHOT] =09at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.find= File(AbstractOriginatingFileProvider.java:65) [commons-vfs2-2.0-SNAPSHOT.ja= r:2.0-SNAPSHOT] =09at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(Def= aultFileSystemManager.java:693) [commons-vfs2-2.0-SNAPSHOT.jar:2.0-SNAPSHOT= ] =09at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(Def= aultFileSystemManager.java:649) [commons-vfs2-2.0-SNAPSHOT.jar:2.0-SNAPSHOT= ] =09at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(Def= aultFileSystemManager.java:605) [commons-vfs2-2.0-SNAPSHOT.jar:2.0-SNAPSHOT= ] =09at de.test.TestPgh.main(TestPgh.java:18) [classes/:na] 12:34:12.023 [main] INFO o.a.c.httpclient.HttpMethodDirector - Retrying re= quest 12:34:12.023 [main] DEBUG o.a.c.httpclient.HttpConnection - Open connection= to www.server2.com:80 12:34:12.024 [main] DEBUG httpclient.wire.header - >> "HEAD / HTTP/1.1[\r][= \n]" 12:34:12.024 [main] DEBUG o.a.c.httpclient.HttpMethodBase - Adding Host req= uest header 12:34:12.024 [main] DEBUG httpclient.wire.header - >> "User-Agent: Jakarta = Commons-HttpClient/3.1[\r][\n]" 12:34:12.024 [main] DEBUG httpclient.wire.header - >> "Host: www.server2.co= m[\r][\n]" 12:34:12.024 [main] DEBUG httpclient.wire.header - >> "[\r][\n]" 12:34:12.025 [main] DEBUG o.a.c.httpclient.HttpMethodDirector - Closing the= connection. 12:34:12.026 [main] INFO o.a.c.httpclient.HttpMethodDirector - I/O excepti= on (org.apache.commons.httpclient.NoHttpResponseException) caught when proc= essing request: The server www.server2.com failed to respond 12:34:12.026 [main] DEBUG o.a.c.httpclient.HttpMethodDirector - The server = www.server2.com failed to respond org.apache.commons.httpclient.NoHttpResponseException: The server www.serve= r2.com failed to respond =09at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMetho= dBase.java:1976) ~[commons-httpclient-3.1.jar:na] =09at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodB= ase.java:1735) ~[commons-httpclient-3.1.jar:na] =09at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.j= ava:1098) ~[commons-httpclient-3.1.jar:na] =09at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(Htt= pMethodDirector.java:398) [commons-httpclient-3.1.jar:na] =09at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMe= thodDirector.java:171) [commons-httpclient-3.1.jar:na] =09at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.jav= a:397) [commons-httpclient-3.1.jar:na] =09at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.jav= a:323) [commons-httpclient-3.1.jar:na] =09at org.apache.commons.vfs2.provider.http.HttpClientFactory.createConnect= ion(HttpClientFactory.java:148) [commons-vfs2-2.0-SNAPSHOT.jar:2.0-SNAPSHOT= ] =09at org.apache.commons.vfs2.provider.http.HttpClientFactory.createConnect= ion(HttpClientFactory.java:50) [commons-vfs2-2.0-SNAPSHOT.jar:2.0-SNAPSHOT] =09at org.apache.commons.vfs2.provider.http.HttpFileProvider.doCreateFileSy= stem(HttpFileProvider.java:83) [commons-vfs2-2.0-SNAPSHOT.jar:2.0-SNAPSHOT] =09at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.getF= ileSystem(AbstractOriginatingFileProvider.java:103) [commons-vfs2-2.0-SNAPS= HOT.jar:2.0-SNAPSHOT] =09at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.find= File(AbstractOriginatingFileProvider.java:81) [commons-vfs2-2.0-SNAPSHOT.ja= r:2.0-SNAPSHOT] =09at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.find= File(AbstractOriginatingFileProvider.java:65) [commons-vfs2-2.0-SNAPSHOT.ja= r:2.0-SNAPSHOT] =09at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(Def= aultFileSystemManager.java:693) [commons-vfs2-2.0-SNAPSHOT.jar:2.0-SNAPSHOT= ] =09at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(Def= aultFileSystemManager.java:649) [commons-vfs2-2.0-SNAPSHOT.jar:2.0-SNAPSHOT= ] =09at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(Def= aultFileSystemManager.java:605) [commons-vfs2-2.0-SNAPSHOT.jar:2.0-SNAPSHOT= ] =09at de.test.TestPgh.main(TestPgh.java:18) [classes/:na] 12:34:12.026 [main] INFO o.a.c.httpclient.HttpMethodDirector - Retrying re= quest 12:34:12.026 [main] DEBUG o.a.c.httpclient.HttpConnection - Open connection= to www.server2.com:80 12:34:12.027 [main] DEBUG httpclient.wire.header - >> "HEAD / HTTP/1.1[\r][= \n]" 12:34:12.027 [main] DEBUG o.a.c.httpclient.HttpMethodBase - Adding Host req= uest header 12:34:12.027 [main] DEBUG httpclient.wire.header - >> "User-Agent: Jakarta = Commons-HttpClient/3.1[\r][\n]" 12:34:12.027 [main] DEBUG httpclient.wire.header - >> "Host: www.server2.co= m[\r][\n]" 12:34:12.027 [main] DEBUG httpclient.wire.header - >> "[\r][\n]" 12:34:12.028 [main] DEBUG o.a.c.httpclient.HttpMethodDirector - Closing the= connection. 12:34:12.028 [main] DEBUG o.a.c.httpclient.HttpMethodDirector - Method retr= y handler returned false. Automatic recovery will not be attempted 12:34:12.029 [main] DEBUG o.a.c.httpclient.HttpConnection - Releasing conne= ction back to connection manager. 12:34:12.029 [main] DEBUG o.a.c.h.MultiThreadedHttpConnectionManager - Free= ing connection, hostConfig=3DHostConfiguration[host=3Dhttp://www.server2.co= m] 12:34:12.029 [main] DEBUG o.a.c.h.util.IdleConnectionHandler - Adding conne= ction at: 1423049652029 12:34:12.029 [main] DEBUG o.a.c.h.MultiThreadedHttpConnectionManager - Noti= fying no-one, there are no waiting threads Exception in thread "main" org.apache.commons.vfs2.FileSystemException: Cou= ld not connect to HTTP server on "server1.com". =09at org.apache.commons.vfs2.provider.http.HttpClientFactory.createConnect= ion(HttpClientFactory.java:152) =09at org.apache.commons.vfs2.provider.http.HttpClientFactory.createConnect= ion(HttpClientFactory.java:50) =09at org.apache.commons.vfs2.provider.http.HttpFileProvider.doCreateFileSy= stem(HttpFileProvider.java:83) =09at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.getF= ileSystem(AbstractOriginatingFileProvider.java:103) =09at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.find= File(AbstractOriginatingFileProvider.java:81) =09at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.find= File(AbstractOriginatingFileProvider.java:65) =09at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(Def= aultFileSystemManager.java:693) =09at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(Def= aultFileSystemManager.java:649) =09at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(Def= aultFileSystemManager.java:605) =09at de.test.TestPgh.main(TestPgh.java:18) Caused by: org.apache.commons.httpclient.NoHttpResponseException: The serve= r www.server2.com failed to respond =09at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMetho= dBase.java:1976) =09at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodB= ase.java:1735) =09at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.j= ava:1098) =09at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(Htt= pMethodDirector.java:398) =09at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMe= thodDirector.java:171) =09at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.jav= a:397) =09at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.jav= a:323) =09at org.apache.commons.vfs2.provider.http.HttpClientFactory.createConnect= ion(HttpClientFactory.java:148) =09... 9 more {noformat} > File can't be downloaded if HTTP HEAD on base url fails > ------------------------------------------------------- > > Key: VFS-560 > URL: https://issues.apache.org/jira/browse/VFS-560 > Project: Commons VFS > Issue Type: Bug > Affects Versions: 2.0 > Reporter: Patrick GH > > When i try to download a File via HTTP a HEAD-Request on the base url is = executed before the actual download. In my case the result is a redirect (H= TTP 302) to another server. This server is not available due to firewall re= strictions and so the following HEAD request fails. The actual GET request = to retrieve the file is never performed. > Example: > Url: http://server1.com/files/2015/image.jpg > 1. commons-vfs sends HEAD request to http://server1.com/ (not http://serv= er1.com/files/2015/image.jpg) > 2. Server returns HTTP 302 with redirect to http://server2.com/ > 3. commons-vfs sends HEAD request to http://server2.com/ > 4. Request fails because server2.com is not available (firewall) > 5. image.jpg is not downloaded=20 > Why is this HEAD request on the base url necessary? The file can be downl= oaded directly without problems. -- This message was sent by Atlassian JIRA (v6.3.4#6332)