You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
mimeparse.parse_media_range('*/*;q=0')
Expected Output: ('*', '*', {'q': '0'})
Actual Output: ('*', '*', {'q': '1'})
I encountered this while parsing an request Accept header with
'application/xml,*/*;q=0' and the only acceptable type on the
server is application/json. It freely let the server return a
JSON representation, but should have failed since the user agent
explicitly defined a quality of 0 for all other mimetypes. The
value of 0 for */* was being overwritten with 1.
56c56,57
< float(params['q']) > 1 or float(params['q']) < 0:
---
> not float(params['q']) or float(params['q']) > 1\
> or float(params['q']) < 0:
What version of the product are you using? On what operating system?
Python version of mimeparse 0.1.3
Using Python 2.7.1
Original issue reported on code.google.com by [email protected] on 12 Feb 2012 at 2:57
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 12 Feb 2012 at 2:57The text was updated successfully, but these errors were encountered: