Page MenuHomeDevCentral

Get accepted languages from HTTP request
ClosedPublic

Authored by dereckson on Apr 30 2018, 12:27.
Tags
None
Referenced Files
F7765436: D1634.id4172.diff
Fri, May 2, 11:58
F7739899: D1634.diff
Fri, May 2, 00:53
Unknown Object (File)
Mon, Apr 28, 20:28
Unknown Object (File)
Sat, Apr 26, 10:32
Unknown Object (File)
Fri, Apr 25, 08:29
Unknown Object (File)
Thu, Apr 24, 01:08
Unknown Object (File)
Tue, Apr 22, 00:50
Unknown Object (File)
Mon, Apr 21, 21:26
Subscribers
None

Details

Summary

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

Repository
rKOT Keruald OmniTools
Lint
Lint Passed
Unit
Tests Passed
Branch
AcceptedLanguages (branched from master)
Build Status
Buildable 2563
Build 2811: arc lint + arc unit

Event Timeline

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