Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the WWW-Mechanize CPAN distribution.

Report information
The Basics
Id: 1719
Status: resolved
Priority: 0/
Queue: WWW-Mechanize

People
Owner: Nobody in particular
Requestors: book [...] cpan.org
Cc:
AdminCc:

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



Subject: Forgot to update uri in _do_request
Hi, In _do_request, in WWW::Mechanize 0.32, the _do_request method does not update $self->{uri}, contrary to what the documentation says. Included is a small patch to correct this. (I also change the order of some arguments to follow the doc order) Thanks, Philippe 'BooK' Bruhat.
--- WWW-Mechanize-0.32/lib/WWW/Mechanize.pm 2002-10-24 06:12:42.000000000 +0200 +++ WWW-Mechanize/lib/WWW/Mechanize.pm 2002-10-25 16:07:54.000000000 +0200 @@ -388,9 +388,10 @@ $self->{req}->header( $h => $WWW::Mechanize::headers{$h} ); } $self->{res} = $self->request($self->{req}); + $self->{uri} = $self->{req}->uri; $self->{status} = $self->{res}->code; - $self->{base} = $self->{res}->base; $self->{ct} = $self->{res}->content_type || ""; + $self->{base} = $self->{res}->base; $self->{content} = $self->{res}->content; if ($self->{ct} eq 'text/html') {
I don't see this as broken. The two places where _do_request() is called has {uri} and {req} set. I put in some tests in t/follow.t to make sure it was getting set right as well.