A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2011-January/107301.html below:

[Python-Dev] PEP 3333: wsgi_string() function

[Python-Dev] PEP 3333: wsgi_string() function [Python-Dev] PEP 3333: wsgi_string() functionJames Y Knight foom at fuhm.net
Fri Jan 7 15:43:25 CET 2011
On Jan 7, 2011, at 6:51 AM, Victor Stinner wrote:
> I don't understand why you are attached to this horrible hack
> (bytes-in-unicode). It introduces more work and more confusing than
> using raw bytes unchanged.
> 
> It doesn't work and so something has to be changed.

It's gross but it does work. This has been discussed ad-nausium on web-sig over a period of years.

I'd like to reiterate that it is only even a potential issue for the PATH_INFO/SCRIPT_NAME keys. Those two keys are required to have been urldecoded already, into byte-data in some encoding. For all the other keys (including the ones from os.environ), they are either *properly* decoded in 8859-1 or are just ascii (possibly still urlencoded, so the app needs to urldecode and decode into a string with the correct encoding).

James
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4