Feature Proposal: LWP::UserAgent finer control
Motivation
Behind a firewall, LWP::UserAgent may need extra parameters and settings.
Description and Documentation
Introduce the following configuration parameters
-
$TWiki::cfg{PROXY}{Protocols} (an array reference)
If provided, it's passed as the first argument of the proxy method. There are cases where proxy handling of HTTPS requests needs to be done outside LWP. In that case, proxy(['http'], $proxyURL) instead of proxy(['http', 'https'], $proxyURL) needs to be called.
-
$TWiki::cfg{LWPUserAgent}{Params} (a hash reference)
If provided, it becomes the base of the parameters handed to LWP::UserAgent::new(). Parameter values provided may be overridden by httpHandler and others.
Examples
$TWiki::cfg{PROXY}{Protocols} = [qw(http)];
$TWiki::cfg{LWPUserAgent}{Params} = {ssl_opts => { verify_hostname => 0 }};
Impact
Implementation
--
Contributors:
Hideyo Imazu - 2013-02-25
Discussion
Looks good.
--
Peter Thoeny - 2013-02-25