[TriLUG] perl: GET'ing large file with LWP

Joseph Tate dragonstrider at gmail.com
Mon Sep 21 13:52:28 EDT 2009


It's not really two steps, GET re-requests the headers.  But it's such
a small amount of bandwidth to not be a nuisance.  Bonus points if you
can set LWP to keep the connection alive so you don't have to
establish two tcp connections to make the two requests.  (I don't know
if you can or not.)



On Mon, Sep 21, 2009 at 10:14 AM, Joseph Mack NA3T <jmack at wm7d.net> wrote:
> On Mon, 21 Sep 2009, Joseph Tate wrote:
>
> Thanks Joseph, Greg,
>
>> I'd use two requests; HEAD for the headers, then GET to get it
>> afterwards after processing the headers.  Yes, it's a bit redundant,
>> but otherwise you're writing the HTTP protocol yourself.
>
> I didn't realise I could do it in two steps. I thought you did a GET and
> then parsed everything from the response. Let me try it in two steps
>
> Joe
>
> --
> Joseph Mack NA3T EME(B,D), FM05lw North Carolina
> jmack (at) wm7d (dot) net - azimuthal equidistant map
> generator at http://www.wm7d.net/azproj.shtml
> Homepage http://www.austintek.com/ It's GNU/Linux!
> --
> TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
> TriLUG FAQ  : http://www.trilug.org/wiki/Frequently_Asked_Questions
>



-- 
Joseph Tate
Personal e-mail: jtate AT dragonstrider DOT com
Web: http://www.dragonstrider.com



More information about the TriLUG mailing list