HomeDevCentral

Get accepted languages from HTTP request

Description

Get accepted languages from HTTP request

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

Reviewers: dereckson

Reviewed By: dereckson

Differential Revision: https://devcentral.nasqueron.org/D1634

Details

Provenance
derecksonAuthored on Apr 30 2018, 12:24
derecksonPushed on Feb 19 2022, 22:15
Parents
rKERUALD578204647d90: Implement a weighted list
Branches
Unknown
Tags
Unknown

Event Timeline