libwww-perl / WWW-Mechanize

Handy web browsing in a Perl object
https://metacpan.org/pod/WWW::Mechanize
Other
68 stars 53 forks source link

No automatic use of env_proxy after cloning #166

Open spazm opened 7 years ago

spazm commented 7 years ago

Dr.Marti...@gmail.com reported on Nov 17, 2009

What steps will reproduce the problem?
1. set http_proxy in environment and export
2. $mech=WWW::Mechanize->new;
3. $mech->get("http://www.example.org"); # Get the page via proxy
4. $mechclone = $mech->clone;
5. $mechclone->get("http://www.example.org"); # proxy not used anymore

What is the expected output? What do you see instead?
Expect $mechclone to honor the proxy.
$mechclone does not use proxy.

What version of the product are you using? On what operating system?

1.60

Please provide any additional information below.

Can fixed by adding 
 $self->env_proxy() unless $self->{noproxy};
in clone subroutine after 
 $clone->cookie_jar( $self->cookie_jar );

Details

Imported from Google Code issue 138 via archive

Comments

oscar...@gmail.com commented on May 19, 2010 :

Please consider fixing this.

Also $m->proxy(...) should carry into clones (as well as $m->env_proxy()).

petda...@gmail.com commented on Apr 24, 2011 :

(No comment was entered for this change.)