CPANPLUS
view release on metacpan or search on metacpan
inc/bundle/HTTP/Tiny.pm view on Meta::CPAN
if ( defined $self->{proxy} ) {
$self->_split_proxy( 'generic proxy' => $self->{proxy} ); # validate
}
else {
delete $self->{proxy};
}
# http proxy
if (! exists $self->{http_proxy} ) {
# under CGI, bypass HTTP_PROXY as request sets it from Proxy header
local $ENV{HTTP_PROXY} = ($ENV{CGI_HTTP_PROXY} || "") if $ENV{REQUEST_METHOD};
$self->{http_proxy} = $ENV{http_proxy} || $ENV{HTTP_PROXY} || $self->{proxy};
}
if ( defined $self->{http_proxy} ) {
$self->_split_proxy( http_proxy => $self->{http_proxy} ); # validate
$self->{_has_proxy}{http} = 1;
}
else {
delete $self->{http_proxy};
}
inc/bundle/HTTP/Tiny.pm view on Meta::CPAN
HTTP::Tiny can proxy both C<http> and C<https> requests. Only Basic proxy
authorization is supported and it must be provided as part of the proxy URL:
C<http://user:pass@proxy.example.com/>.
HTTP::Tiny supports the following proxy environment variables:
=over 4
=item *
http_proxy or HTTP_PROXY
=item *
https_proxy or HTTPS_PROXY
=item *
all_proxy or ALL_PROXY
=back
If the C<REQUEST_METHOD> environment variable is set, then this might be a CGI
process and C<HTTP_PROXY> would be set from the C<Proxy:> header, which is a
security risk. If C<REQUEST_METHOD> is set, C<HTTP_PROXY> (the upper case
variant only) is ignored, but C<CGI_HTTP_PROXY> is considered instead.
Tunnelling C<https> over an C<http> proxy using the CONNECT method is
supported. If your proxy uses C<https> itself, you can not tunnel C<https>
over it.
Be warned that proxying an C<https> connection opens you to the risk of a
man-in-the-middle attack by the proxy server.
The C<no_proxy> environment variable is supported in the format of a
comma-separated list of domain extensions proxy should not be used for.
( run in 0.625 second using v1.01-cache-2.11-cpan-d7a12ab2c7f )