develooper Front page | perl.libwww | Postings from February 2003

Re: Getting the last 1 kb of a file

Thread Previous | Thread Next
Gisle Aas
February 15, 2003 13:08
Re: Getting the last 1 kb of a file
Message ID:
"Octavian Rasnita" <> writes:

> Please tell me how to get the last 1 kb of the file avoiding to download all
> the file.
> I've read the POD documentation for LWP::UserAgent, but I couldn't find
> anything helpful.

You need to read the HTTP spec[1] or some other source decribing the HTTP protocol.
This should work on servers that implement it:

   my $res = $ua->get("http://....",
                      Range => "bytes=-1024",


> Thank you very much.

Your welcome!


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About