Opened 13 years ago
Closed 13 years ago
#18561 closed Bug (fixed)
HttpResponse.tell() fails if response contains non ascii characters
Description ¶
If HttpResponse instance contains non ascii characters (e.g. cyrillic), tell() method fails.
Error otput:
UnicodeEncodeError at / 'ascii' codec can't encode characters in position 2010-2015: ordinal not in range(128) Request Method: GET Request URL: http://localhost:8000/ Django Version: 1.4 Exception Type: UnicodeEncodeError Exception Value: 'ascii' codec can't encode characters in position 2010-2015: ordinal not in range(128) Exception Location: /usr/lib/python2.7/site-packages/django/http/__init__.py in tell, line 732 Python Executable: /usr/bin/python Python Version: 2.7.3 Python Path: ['/usr/bin', '/usr/lib/python2.7/site-packages/django_annoying-0.7.4-py2.7.egg', '/usr/lib/python2.7/site-packages/selenium-2.24.0-py2.7.egg', '/usr/lib/python2.7/site-packages/South-0.7.5-py2.7.egg', '/home/ghost/git/django-hello-world/django', '/usr/lib64/python27.zip', '/usr/lib64/python2.7', '/usr/lib64/python2.7/plat-linux2', '/usr/lib64/python2.7/lib-tk', '/usr/lib64/python2.7/lib-old', '/usr/lib64/python2.7/lib-dynload', '/usr/lib64/python2.7/site-packages', '/usr/lib64/python2.7/site-packages/PIL', '/usr/lib64/python2.7/site-packages/pbs', '/usr/lib64/python2.7/site-packages/gtk-2.0', '/usr/lib/python2.7/site-packages', '/usr/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg-info']
Change History (4)
comment:1 by , 13 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Triage Stage: | Unreviewed → Accepted |
by , 13 years ago
Attachment: | 18561.diff added |
---|
comment:2 by , 13 years ago
Has patch: | set |
---|
comment:3 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
Make tell() handle unicode content