742N/A## You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
742N/A## file and include the License file at usr/src/OPENSOLARIS.LICENSE.
742N/A import pkg.server.api as api
742N/A import pkg.server.api_errors as api_errors
742N/A config = api.ConfigInterface(CLIENT_API_VERSION, base)
742N/A request = api.RequestInterface(CLIENT_API_VERSION, base)
742N/A rlangs = request.get_accepted_languages()
742N/A rpath = request.path_info.strip("/")
2028N/A rpath = rpath.replace(pub, "").strip("/")
2222N/A if pub and not request.path_info.endswith("/"):
742N/A rpath = "index.shtml"
3158N/A raise api_errors.RedirectException("{0}{1}/{2}".format(