django.utils.translation.trans_real.parse_accept_lang_header raises ValueError for certain bad headers
|Reported by:||jgmize||Owned by:||jgmize|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||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.