[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#604025: sitesummary-upload: Fail when $http_proxy exist and is empty



Package: sitesummary-client
Version: 0.0.66
Severity: serious
Tags: patch pending

I ran into this when I installed a minimal Debian Edu/squeeze profile
on a new virtual machine.  The host did not get any proxy setting, and
ended up with http_proxy= in /etc/environment.  This caused
sitesummary-client to fail.

The problem can be reproduced like this:
  root@gnashbuild0:~# env|grep http
  root@gnashbuild0:~# echo | http_proxy= sitesummary-upload
  unrecognized http_proxy at /usr/sbin/sitesummary-upload line 36.
  root@gnashbuild0:~# echo | sitesummary-upload
  cannot connect to localhost:80 at /usr/sbin/sitesummary-upload line 60.
  root@gnashbuild0:~#

Note how it fails with "unrecognized http_proxy" when no value is set,
while it do not when the variable is unset.

I've commited this fix to svn, and believe it is important to get it
included in Squeeze.  Not quite sure if it should be considered
release critical for Debian or not, as it only will affect those using
Debian Edu without a proxy on the local network, but I believe it is
release critical for Debian Edu.  Setting severity serious for now.

Modified: trunk/src/sitesummary/sitesummary-upload
===================================================================
--- trunk/src/sitesummary/sitesummary-upload    2010-11-19 12:27:47 UTC (rev 71290)
+++ trunk/src/sitesummary/sitesummary-upload    2010-11-19 13:48:44 UTC (rev 71291)
@@ -31,7 +31,7 @@
 my ($http_proxy,$proxy,$port,$remote);

 $http_proxy=$ENV{'http_proxy'};
-if (defined($http_proxy))
+if (defined($http_proxy) && $http_proxy)
 {
   $http_proxy =~ m{http://([^:]*)(?::([0-9]+))?}
         or die ("unrecognized http_proxy");

Happy hacking,
-- 
Petter Reinholdtsen



Reply to: