[Debian-l10n-commits] [ddtp] 07/07: Fix base so you stay in HTTPS once there.

Martijn van Oosterhout kleptog-guest at moszumanska.debian.org
Mon Jan 6 23:31:50 UTC 2014


This is an automated email from the git hooks/post-receive script.

kleptog-guest pushed a commit to branch master
in repository ddtp.

commit 756d7ea6b15139b6713c2cb2a7578aedc23a3656
Author: Martijn van Oosterhout <kleptog at svana.org>
Date:   Mon Jan 6 16:11:38 2014 +0000

    Fix base so you stay in HTTPS once there.
---
 ddtss/ddtss-cgi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ddtss/ddtss-cgi b/ddtss/ddtss-cgi
index 3e9ad80..363cf63 100755
--- a/ddtss/ddtss-cgi
+++ b/ddtss/ddtss-cgi
@@ -70,6 +70,7 @@ my $path = $ENV{PATH_INFO} || '/';
 # Later $self is overwritten for the per language page, so keep a copy of the real thing
 my $self = $ENV{SCRIPT_NAME} || 'local';
 my $http_host = $ENV{HTTP_HOST} || 'local';
+my $http_proto = $ENV{HTTPS} ? "https" : "http";
 
 if( defined $q->param("_charset_") and uc($q->param("_charset_")) ne "UTF-8" )
 {
@@ -697,7 +698,7 @@ sub main_display
   DDTSS_Close($db);
   
   print $q->header( -type =>'text/html', -charset => "UTF-8", -refresh => "240; url=$self", -expires => '+10s', -cookie => $usercookie ),
-        $q->start_html( -title => "DDTSS ($lang)", @html_headers, -xbase => "http://$http_host$self/" );
+        $q->start_html( -title => "DDTSS ($lang)", @html_headers, -xbase => "$http_proto://$http_host$self/" );
 
   print $q->h1("DDTSS for $lang");
 #  print $q->p({-style=>'color: #ff0000'}, "Scheduled downtime: 08:00-10:00 UTC on 5 June 2011");

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-l10n/ddtp.git



More information about the Debian-l10n-commits mailing list