From: Michael Tremer Date: Fri, 22 Aug 2008 10:14:45 +0000 (+0200) Subject: Catched a possible error in the redirector. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a793fc55fbf6a52783cb033a6aa22057ae4e6928;p=ipfire.org.git Catched a possible error in the redirector. --- diff --git a/www/index.py b/www/index.py index 6b954ad1..58d57366 100755 --- a/www/index.py +++ b/www/index.py @@ -12,10 +12,13 @@ sites = ( ) # Check language... -if re.search(re.compile("^de(.*)"), os.environ["HTTP_ACCEPT_LANGUAGE"]): - language = "de" -else: - language = "en" +language = "en" +try: + if re.search(re.compile("^de(.*)"), os.environ["HTTP_ACCEPT_LANGUAGE"]): + language = "de" +except KeyError: + pass + print "Status: 302 Moved" print "Pragma: no-cache"