Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#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


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 jgmize, 11 years ago

Owner: changed from nobody to jgmize
Status: newassigned

comment:2 by jgmize, 11 years ago

Has patch: set

I've submitted to fix this.

Last edited 11 years ago by jgmize (previous) (diff)

comment:3 by Tim Graham, 11 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.
Back to Top