[
https://issues.apache.org/jira/browse/VFS-560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16951538#comment-16951538
]
abiral shrestha commented on VFS-560:
-------------------------------------
Hi [~b.eckenfels]
I am facing similar issue despite the base URL responding correctly.
Example:
Url: [http://server1.com/files/2015/image.jpg]
1. *Jakarta Commons-HttpClient/3.1* sends HEAD request to [http://server1.com/]
(not [http://server1.com/files/2015/image.jpg])
2. Server responds to the HEAD request.
3. commons-vfs sends HEAD request to [http://server1.com/files/2015/image.jpg]
4. GET request is never received.
5. image.jpg is not downloaded
I can not upgrade to the fixed version mentioned above due to some reason.
Please do let me know if I can modify response from
[http://server1.com/|http://server1.com/files/2015/image.jpg] in such a way
that GET request is send after HEAD.
Thanks and regards,
> 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
> Assignee: Bernd Eckenfels
> Priority: Major
> Fix For: 2.1
>
>
> 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
> (HTTP 302) to another server. This server is not available due to firewall
> restrictions 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://server1.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
> Why is this HEAD request on the base url necessary? The file can be
> downloaded directly without problems.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)