Skip Menu |

This queue is for tickets about the libwww-perl CPAN distribution.

Report information
The Basics
Id: 76907
Status: resolved
Priority: 0/
Queue: libwww-perl

People
Owner: Nobody in particular
Requestors: jianing [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: setting max_size after a useragent has been used to send a request has no effect on subsequent requests
Date: Mon, 30 Apr 2012 14:09:49 -0700
To: bug-libwww-perl [...] rt.cpan.org
From: Jianing Hu <jianing [...] gmail.com>
Once a useragent has been used to send requests, changing its max_size doesn't seem to affect the Range header being sent with subsequent requests. In the sample code below, both requests are sent with the Range header as "bytes=0-2097151". my $ua = new LWP::UserAgent(max_size => 2048 * 1024); my $req = new HTTP::Request(GET => $url); my $response = $ua->request($req); $ua->max_size(undef); $response = $ua->request($req);
Subject: Re: [rt.cpan.org #76907] AutoReply: setting max_size after a useragent has been used to send a request has no effect on subsequent requests
Date: Mon, 30 Apr 2012 14:37:13 -0700
To: bug-libwww-perl [...] rt.cpan.org
From: Jianing Hu <jianing [...] gmail.com>
Looks like the issue is that the useragent doesn't set (or clear) the range header in the request object if it already has one. On Mon, Apr 30, 2012 at 2:09 PM, Bugs in libwww-perl via RT <bug-libwww-perl@rt.cpan.org> wrote: Show quoted text
> > Greetings, > > This message has been automatically generated in response to the > creation of a trouble ticket regarding: >        "setting max_size after a useragent has been used to send a request has no effect on subsequent requests", > a summary of which appears below. > > There is no need to reply to this message right now.  Your ticket has been > assigned an ID of [rt.cpan.org #76907].  Your ticket is accessible > on the web at: > >    https://rt.cpan.org/Ticket/Display.html?id=76907 > > Please include the string: > >         [rt.cpan.org #76907] > > in the subject line of all future correspondence about this issue. To do so, > you may reply to this message. > >                        Thank you, >                        bug-libwww-perl@rt.cpan.org > > ------------------------------------------------------------------------- > Once a useragent has been used to send requests, changing its max_size > doesn't seem to affect the Range header being sent with subsequent > requests. In the sample code below, both requests are sent with the > Range header as "bytes=0-2097151". > >    my $ua = new LWP::UserAgent(max_size => 2048 * 1024); >    my $req = new HTTP::Request(GET => $url); >    my $response = $ua->request($req); >    $ua->max_size(undef); >    $response = $ua->request($req); >