Page MenuHomeDevCentral

Get accepted languages from HTTP request

Authored by dereckson on Apr 30 2018, 12:27.



Allow to parse a list with quality values formatted as strings
per RFC 7231, section 5.3.1.

e.g. "a,b;q=0.1,c;q=0.4" is parsed as a list of WeightedValue:

  • (a, 1.0)
  • (b, 0.1)
  • (c, 0.4)

This is the format used for the ACCEPT_LANGUAGE HTTP header.

Test Plan

Unit tests provided

Diff Detail

rKOT Keruald OmniTools
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

dereckson requested review of this revision.Apr 30 2018, 12:27
dereckson created this revision.
dereckson updated this revision to Diff 4172.Apr 30 2018, 12:28

Prune unused

dereckson accepted this revision.Apr 30 2018, 12:29
This revision is now accepted and ready to land.Apr 30 2018, 12:29
This revision was automatically updated to reflect the committed changes.