Skip to content
Permalink
Browse files

28741644 problem in SERVICE/PKGDEPOT

  • Loading branch information
saurabh-vyas committed Mar 6, 2019
1 parent 813a1ae commit 23599cb61de8b9e3380bc6e5c67ab2ff948bdf91
Showing with 5 additions and 3 deletions.
  1. +5 −3 src/web/index.shtml
@@ -19,7 +19,7 @@
##
## CDDL HEADER END
##
## Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
## Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved.
##
<%!
import os.path
@@ -35,8 +35,7 @@
config = api.ConfigInterface(CLIENT_API_VERSION, base)
request = api.RequestInterface(CLIENT_API_VERSION, base)

# XXX default language if one can't be automatically determined,
# where to set this?
# Default to English, if one can't be automatically determined,
dlang = "en"

# First, get the list of desired languages from the request.
@@ -46,6 +45,9 @@
# 639(.1/.2) code or an l10n simple name) to see if a directory of
# content exists for it.
for rl in rlangs:
# Use absolute path to ensure we only look at known locale
# directories below the webroot.
rl = os.path.abspath(rl)
if os.path.exists(os.path.join(config.web_root, rl)):
dlang = rl
break

0 comments on commit 23599cb

Please sign in to comment.
You can’t perform that action at this time.