Skip to content

lib/api: /svc/lang disregards the passed quality values #9670

Closed

Description

@acolomb

What happened?

The GUI loads its locale preference list from the browser's settings through the /svc/lang API endpoint. The HTTP header value is however treated as being specified in reducing preference order, with the q= quality values being discarded.

It should be sorted by decreasing q value (where omission means q=1), according to the specification at https://httpwg.org/specs/rfc9110.html#field.accept-language

Different browsers may send the HTTP header value with different ordering. Therefore the sorting should be done in the backend API service.

Syncthing version

v1.27.10

Platform & operating system

n/a

Browser version

Header varies by browser, but service should sort the result

Relevant log output

No response

Activity

  1. added
    bug
    needs-triage
    on Aug 31, 2024
  2. changed the title [-]api: /svc/lang disregards the passed quality values[/-] [+]lib/api: /svc/lang disregards the passed quality values[/+] on Aug 31, 2024
  3. added
    api
    ui
    on Sep 1, 2024
  4. self-assigned this
    on Sep 1, 2024
  5. added a commit that references this issue on Sep 11, 2024
    b30ca15
  6. added this to the v1.27.13 milestone on Sep 11, 2024
  7. added
    frozen-due-to-age
    on Sep 2, 2025
  8. locked and limited conversation to collaborators on Sep 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

apibugfrozen-due-to-ageneeds-triageui

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions