[docs] [issue16423] urllib data URL recipe
report at bugs.python.org
Fri Nov 16 04:45:11 CET 2012
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 <report at bugs.python.org>
More information about the docs