Skip to content

Commit

Permalink
Don't set Range header on request when max_size is used [RT#17208]
Browse files Browse the repository at this point in the history
  • Loading branch information
gisle committed Jun 15, 2009
1 parent 06e3b04 commit 266c569
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions lib/LWP/UserAgent.pm
Expand Up @@ -209,13 +209,6 @@ sub prepare_request

$self->run_handlers("request_preprepare", $request);

my $max_size = $self->{max_size};
if (defined $max_size) {
my $last = $max_size - 1;
$last = 0 if $last < 0; # there is no way to actually request no content
$request->init_header('Range' => "bytes=0-$last");
}

if (my $def_headers = $self->{def_headers}) {
for my $h ($def_headers->header_field_names) {
$request->init_header($h => [$def_headers->header($h)]);
Expand Down

0 comments on commit 266c569

Please sign in to comment.