Skip to content
GitLab
Projects Groups 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
    • Contributors
    • Graph
    • Compare
  • Issues 61
    • Issues 61
    • 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
  • #910
Closed
Open
Issue created Jun 02, 2020 by Fabrice Gangler@fgangler🎨Owner

Langue du navigateur non 'fr' / non 'en' : page d'erreur

bug relatif à #908 (closed)

pour reproduire (2 méthodes) :

  • modifier la langue par défaut du navigateur (par exemple en allemand) et ouvrir la page racine /, qui redirige vers /de/ (pour suivre notre exemple) ---> page 404 Not Found
  • utiliser CURL en indiquant l'entête HTTP Accept-Language :

Actuellement

redirection vers une URL qui n'existe pas.

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: ko" http://localhost:8282/
     HTTP/1.1 301 Moved Permanently
     Location: http://localhost:8282/ko/ ----> error 404

curl -i -H "Accept-Language: de" http://localhost:8282/
     HTTP/1.1 301 Moved Permanently
     Location: http://localhost:8282/de/ ----> error 404

Comportement attendu

redirection vers l'URL de la langue si elle existe, sinon rediriger vers la langue anglaise.

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: ko" http://localhost:8282/
     HTTP/1.1 301 Moved Permanently
     Location: http://localhost:8282/en/   

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

bug complémentaire #913

Edited Jun 03, 2020 by Fabrice Gangler
Assignee
Assign to
Time tracking