[prev in list] [next in list] [prev in thread] [next in thread] 

List:       httpclient-users
Subject:    Re: Possible to use HttpClient wget-ish?
From:       Roland Weber <ROLWEBER () de ! ibm ! com>
Date:       2005-05-23 6:40:51
Message-ID: OF070B7067.592D486F-ONC125700A.0023F29B-C125700A.0024A83F () de ! ibm ! com
[Download RAW message or body]

--=_alternative 0024A538C125700A_=
Content-Type: text/plain; charset="US-ASCII"

Hello Thomas,

yes and no. It is possible to achieve the same behaviour with
HttpClient. But not by calling HttpClient as if you'd download
a new file.

Your application would have to detect the partially downloaded
file by itself, and set an appropriate HTTP header "Range". It
would also have to deal with status codes 200 as well as 206 in
the response. Check out RFC 2616, chapter 14.35 for details.

In general, HttpClient will take care only of the HTTP protocol
used for downloading. Saving to a file and detecting a file with
a partial download is the responsibility of the application that
uses HttpClient.

hope that helps,
  Roland





Thomas Perl <thp@perli.net> 
21.05.2005 11:53
Please respond to
"HttpClient User Discussion"


To
httpclient-user@jakarta.apache.org
cc

Subject
Possible to use HttpClient wget-ish?






Hello!

I'm currently using Runtime.exec() for calling wget in my Java 
application like this:

wget -c -t0 http://www.server.com/file.jpg /home/username/file.jpg

Is it possible to do this with Jakarta HttpClient? What I want to get is 
when i cancel the download and i call HttpClient as if I'd download a 
new file it should continue the download because the target file already 
exists but is smaller than the to-be-downloaded file. Is this possible?

Thanks,
Thomas

PS: Please CC to my e-mail address because I'm currently not subscribed 
to this list.

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



--=_alternative 0024A538C125700A_=--

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic