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

Re: getting the last N bytes of something over HTTP

Thread Previous | Thread Next
March 13, 2003 07:52
Re: getting the last N bytes of something over HTTP
Message ID:
>>>>> "Sean" == Sean M Burke <> writes:

Sean> As I was setting up this RSS feed the other day
Sean> I had occasion to want to request the last N bytes of a particular URL.
Sean> And this is how I did it, with LWP:

From rfc2068:

   A suffix-byte-range-spec is used to specify the suffix of the
   entity-body, of a length given by the suffix-length value. (That is,
   this form specifies the last N bytes of an entity-body.) If the
   entity is shorter than the specified suffix-length, the entire
   entity-body is used.

     o  The final 500 bytes (byte offsets 9500-9999, inclusive):


So, you went to a lot of extra work.  Could have done it in
one hit.

Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<> <URL:>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See for onsite and open-enrollment Perl training!

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