Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Comptoir-srv Comptoir-srv
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 62
    • Issues 62
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ComptoirComptoir
  • Comptoir-srvComptoir-srv
  • Issues
  • #913
Closed
Open
Issue created Jun 03, 2020 by Fabrice Gangler@fgangler🎨Owner

Langue du navigateur : ne prend en compte que la 1er langue déclaré

bug relatif à #908 (closed) et #910 (closed)

Actuellement

Actuellement, seul la 1er langue déclarée dans l'entête HTTP Accept-Language est pris en compte :

curl -i -H "Accept-Language: fr" http://localhost:8282/
     HTTP/1.1 301 Moved Permanently
     Location: http://localhost:8282/fr/

curl -i -H "Accept-Language: de,fr-CA;q=0.9" http://localhost:8282/
     HTTP/1.1 301 Moved Permanently
     Location: http://localhost:8282/en/

curl -i -H "Accept-Language: de,fr-CA;q=0.9,fr;q=0.8" http://localhost:8282/
     HTTP/1.1 301 Moved Permanently
     Location: http://localhost:8282/en/

Comportement attendu

Utiliser comme langue de l'application une des langues de la liste présente dans l'entête HTTP Accept-Language et ne pas regarder uniquement la 1er langue déclarée :

curl -i -H "Accept-Language: fr" http://localhost:8282/
     HTTP/1.1 301 Moved Permanently
     Location: http://localhost:8282/fr/

curl -i -H "Accept-Language: de,fr-CA;q=0.9" http://localhost:8282/
     HTTP/1.1 301 Moved Permanently
     Location: http://localhost:8282/fr/

curl -i -H "Accept-Language: de,fr-CA;q=0.9,fr;q=0.8" http://localhost:8282/
     HTTP/1.1 301 Moved Permanently
     Location: http://localhost:8282/fr/
Assignee
Assign to
Time tracking