Commit 70ec4f6
committed
merged branch jfsimon/issue-6928 (PR symfony#7378)
This PR was squashed before being merged into the 2.1 branch (closes symfony#7378).
Commits
-------
17dc2ff [HttpRequest] fixes Request::getLanguages() bug
Discussion
----------
[HttpRequest] fixes Request::getLanguages() bug
This PR adds to suported languages the first segment of all compouds languages codes.
When receiving `Accept-Language: en-us` header, accepted languages will now be `en, en_US`.
This should not be a BC break as most browsers already send the long **and** short versions of language codes... but some dont.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | symfony#6928File tree
2 files changed
+14
-3
lines changed- src/Symfony/Component/HttpFoundation
- Tests
2 files changed
+14
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1309 | 1309 | | |
1310 | 1310 | | |
1311 | 1311 | | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
1312 | 1317 | | |
1313 | 1318 | | |
1314 | 1319 | | |
1315 | 1320 | | |
1316 | 1321 | | |
1317 | 1322 | | |
1318 | 1323 | | |
1319 | | - | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
1320 | 1327 | | |
1321 | 1328 | | |
1322 | 1329 | | |
| |||
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
951 | 951 | | |
952 | 952 | | |
953 | 953 | | |
954 | | - | |
955 | | - | |
| 954 | + | |
| 955 | + | |
956 | 956 | | |
957 | 957 | | |
958 | 958 | | |
| |||
969 | 969 | | |
970 | 970 | | |
971 | 971 | | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
972 | 976 | | |
973 | 977 | | |
974 | 978 | | |
| |||
0 commit comments