Mathias Panzenböck added the comment:

New patch. Instead of adding the data URL support to the doc as a recipe I 
added it to urllib.request directly. I think this is better and justified, 
because the old legacy URLopener had (some kind) of support for data URLs.

OT: I think that the legacy URLopener has bugs. It only unquotes the data if 
it's base64 encoded, but it should be unquoted in any case. Also it returns a 
StringIO and decodes the content as latin-1. This is wrong, the content is a 
binary string. It could be text encoded in any kind of charset or not text at 
all (e.g. an image).

----------
Added file: http://bugs.python.org/file27994/urllib.request-data-url.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16423>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to