mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-23 23:50:03 -06:00
language as a list
Now parsing the list of languages set in the http header, and selecting the first. Handles weighting as well.
This commit is contained in:
parent
8b4a0adcee
commit
4f2f016dd5
@ -35,6 +35,7 @@ from ipalib.compat import json
|
||||
from wsgiref.util import shift_path_info
|
||||
import base64
|
||||
import os
|
||||
import string
|
||||
_not_found_template = """<html>
|
||||
<head>
|
||||
<title>404 Not Found</title>
|
||||
@ -195,7 +196,8 @@ class WSGIExecutioner(Executioner):
|
||||
lang= os.environ['LANG']
|
||||
try:
|
||||
if ('HTTP_ACCEPT_LANGUAGE' in environ):
|
||||
os.environ['LANG']=environ['HTTP_ACCEPT_LANGUAGE']
|
||||
os.environ['LANG']=string.split(
|
||||
environ['HTTP_ACCEPT_LANGUAGE'],",")[0].split(';')[0]
|
||||
if (
|
||||
environ.get('CONTENT_TYPE', '').startswith(self.content_type)
|
||||
and environ['REQUEST_METHOD'] == 'POST'
|
||||
|
Loading…
Reference in New Issue
Block a user