From eee4df90582a9db684617a338a7b60b019c99bac Mon Sep 17 00:00:00 2001 From: "Simon L. B. Nielsen" <simon@FreeBSD.org> Date: Sun, 23 Jul 2006 22:35:12 +0000 Subject: [PATCH] When checking HTTP_HOST to determine if we should use relative or absolute base path, do the check case insensitive to handle if HTTP_HOST e.g. comes in as FreeBSD.org. Break a rather long line (being changed anyway) to improve readability. --- en/cgi/cgi-style.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/en/cgi/cgi-style.pl b/en/cgi/cgi-style.pl index d752be65cb..a03183b2b7 100644 --- a/en/cgi/cgi-style.pl +++ b/en/cgi/cgi-style.pl @@ -1,4 +1,4 @@ -# $FreeBSD: www/en/cgi/cgi-style.pl,v 1.31 2006/05/08 23:15:37 kuriyama Exp $ +# $FreeBSD: www/en/cgi/cgi-style.pl,v 1.32 2006/07/23 18:36:53 simon Exp $ # # Perl routines to encapsulate various elements of HTML page style. @@ -13,7 +13,9 @@ if (!defined($hsty_base)) { # serve their local copy instead of going to the main site. # However, if we aren't running as a cgi, or if we're # running on cgi, hub, docs or people, use the absolute home path. - if (!defined($ENV{'HTTP_HOST'}) || $ENV{'HTTP_HOST'} =~ /(cgi|hub|docs|people).freebsd.org/) { + if (!defined($ENV{'HTTP_HOST'}) || + $ENV{'HTTP_HOST'} =~ /(cgi|hub|docs|people).freebsd.org/i) { + $hsty_base = 'http://www.FreeBSD.org' } else { $hsty_base = '..';