Copy the proxy scheme from the target scheme.
[buildfarm-client.git] / EximBuild / WebTxn.pm
index 455cd45c818de7f76797914ed0d4e0d5a10db46d..1605fb9229a27a9b7c59f14d2575fe0da1d406ae 100644 (file)
@@ -8,10 +8,10 @@ See accompanying License file for license details
 
 
 Most of this code is imported from the older standalone script run_web_txn.pl
-which is now just a shell that calls the function below. It is now only 
+which is now just a shell that calls the function below. It is now only
 needed on older Msys installations (i.e. things running perl < 5.8).
 
-=cut 
+=cut
 
 use strict;
 use URI::Escape;
@@ -102,7 +102,7 @@ sub run_web_txn
       . "changed_since_success=$changed_since_success&"
       . 'branch=' . uri_escape($branch) . "&res=$status&stage=$stage&animal=$animal&ts=$ts"
       ."&log=$log_data&conf=$confsum";
-    my $sig= sha1_hex($content,$secret);
+    my $sig = sha1_hex($content,$secret);
 
     $content .= "&frozen_sconf=$frozen_sconf";
 
@@ -115,7 +115,9 @@ sub run_web_txn
     $ua->agent("Exim Build Farm Reporter");
     if (my $proxy = $ENV{BF_PROXY})
     {
-        $ua->proxy('http',$proxy);
+        # untested. Please notify hs@schlittermann.de, if you
+        # encounter any problem here:
+        $ua->proxy(URI->new($target)->scheme, $proxy);
     }
 
     my $request=HTTP::Request->new(POST => "$target/$sig");