[Debian-l10n-devel] SSL support for the services on i18n.debian.net
Nicolas François
nicolas.francois at centraliens.net
Thu Aug 7 18:05:54 UTC 2008
On Thu, Aug 07, 2008 at 07:18:25PM +0200, Martijn van Oosterhout wrote:
> On Thu, Aug 7, 2008 at 5:25 PM, Nicolas François
> <nicolas.francois at centraliens.net> wrote:
> > Hello Martijn,
> >
> > DDTSS has some hardcoded links using HTTP. Could you check if it's
> > possible to dynamically use HTTP or HTTPS depending on the user requests?
>
> I'm sure it's possible, but I'm not sure how. I use $ENV{HTTP_HOST}
> and $ENV{SCRIPT_NAME} to construct the URLs but how do I tell if the
> user is coming through HTTPS rather than HTTP?
I'm really not used to CGI, so all this could be crap.
Reading /usr/share/perl/5.8.8/CGI.pm, I had these ideas:
* using $self->url ()
* using $self->protocol ()
* SERVER_PORT could help. But it looks more like a hack.
Otherwise, it should be possible to avoid specifying the base URL, and
always build href links relatively to the root.
Cheers,
--
Nekral
More information about the Debian-l10n-devel
mailing list