fix: spectre fails on Admin.pm because of env_proxy

This commit is contained in:
Graham Knop 2007-05-22 19:23:35 +00:00
parent 3b578658d2
commit c4ac66ce09
3 changed files with 17 additions and 3 deletions

View file

@ -24,6 +24,8 @@
http://www.plainblack.com/bugs/tracker/new-second-inactive-version-tag-when-duplicating-thread
- fix: Make WebGUI error out if there is a permissions problem while creating tar files
http://www.plainblack.com/bugs/tracker/webgui-hangs-on-package-export
- fix: spectre fails on Admin.pm because of env_proxy
http://www.plainblack.com/bugs/tracker/spectre-fails-on-admin.pm-because-of-env_proxy
7.3.17

View file

@ -38,7 +38,15 @@
# the WebGUI Runtime Environment, 81 might be a better choice to go
# directly at the mod_perl server.
"webguiPort" : 80
"webguiPort" : 80,
# Should we ignore the proxy environment variables? If your server
# uses a proxy to connect to the internet and you are running
# Spectre on the same server as WebGUI, you should set this to 1.
# It should be safe to set this to 1 any time spectre and WebGUI
# are running on the same server.
"ignoreEnvProxy" : 0
}

View file

@ -139,7 +139,9 @@ sub loadSiteData {
next if $key =~ m/^demo/;
$self->debug("Fetching site data for $key");
my $userAgent = new LWP::UserAgent;
$userAgent->env_proxy;
if (!$self->config->get('ignoreEnvProxy')) {
$userAgent->env_proxy;
}
$userAgent->agent("Spectre");
$userAgent->timeout(30);
my $url = "http://".$configs->{$key}->get("sitename")->[0].":".$self->{_config}->get("webguiPort").$configs->{$key}->get("gateway")."?op=spectreGetSiteData";
@ -244,7 +246,9 @@ sub runTests {
next if $key =~ m/^demo/;
print "Testing $key\n";
my $userAgent = new LWP::UserAgent;
$userAgent->env_proxy;
if (!$config->get('ignoreEnvProxy')) {
$userAgent->env_proxy;
}
$userAgent->agent("Spectre");
$userAgent->timeout(30);
my $url = "http://".$configs->{$key}->get("sitename")->[0].":".$config->get("webguiPort").$configs->{$key}->get("gateway")."?op=spectreTest";