#21078 closed Bug (fixed)
django.utils.translation.trans_real.parse_accept_lang_header raises ValueError for certain bad headers
Reported by: | jgmize | Owned by: | jgmize |
---|---|---|---|
Component: | Utilities | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
If the Accept-Language header is 'en; q=1,' parse_accept_lang_header raises a "ValueError: invalid literal for float(): 1,". We are seeing this in production on Django version 1.4.6, but this bug has been present in past versions (not sure how far back) and is currently present in master. I will follow up with a pull request that has a test and error handling shortly.
Change History (3)
comment:1 by , 11 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:3 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Merged in a52cc1c0888c2cedb07b2c0619c1a92a2f6e2c40
Note:
See TracTickets
for help on using tickets.
I've submittent https://github.com/django/django/pull/1606 to fix this.