Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add PERL_LWP_ENV_PROXY env variable to enable env_proxy globally

  • Loading branch information...
commit 859a3ef8fe4bb2bd5a072db866c7061b9d582fcb 1 parent 0a9516a
@monken monken authored committed
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/LWP/UserAgent.pm
View
4 lib/LWP/UserAgent.pm
@@ -65,6 +65,7 @@ sub new
my $max_redirect = delete $cnf{max_redirect};
$max_redirect = 7 unless defined $max_redirect;
my $env_proxy = delete $cnf{env_proxy};
+ $env_proxy = $ENV{PERL_LWP_ENV_PROXY} unless defined $env_proxy;
my $cookie_jar = delete $cnf{cookie_jar};
my $conn_cache = delete $cnf{conn_cache};
@@ -1432,6 +1433,9 @@ environment variable normally picked up by env_proxy(). Because of
this C<HTTP_PROXY> is not honored for CGI scripts. The
C<CGI_HTTP_PROXY> environment variable can be used instead.
+You can also set the C<PERL_LWP_ENV_PROXY> environment variable to
+enable C<env_proxy> globally.
+
=back
=head2 Handlers
Please sign in to comment.
Something went wrong with that request. Please try again.