This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kxrob
Recipients James Edington, ethan.furman, kxrob
Date 2020-09-03.13:42:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1599140562.53.0.529873346349.issue39727@roundup.psfhosted.org>
In-reply-to
Content
Would this patch already solve? :

https://github.com/python/cpython/pull/19130

There seems to be another bug: The strange 'latin-1' default encoding of cgi.parse(), which only has effect in non-mulitpart:

    if hasattr(fp,'encoding'):
        encoding = fp.encoding
    else:
        encoding = 'latin-1'


( cgi.FieldStorage and the other functions in cgi and urllib.parse use a 'utf-8' default correctly - and do not try fp.encoding, which is usually not present and not reasonable in form handling WSGI. And 'application/x-www-form-urlencoded' implies  utf-8. )

=> that default should possibly become utf-8. Optionally cgi.parse() could take an extra parameter encoding=None  .
History
Date User Action Args
2020-09-03 13:42:42kxrobsetrecipients: + kxrob, ethan.furman, James Edington
2020-09-03 13:42:42kxrobsetmessageid: <1599140562.53.0.529873346349.issue39727@roundup.psfhosted.org>
2020-09-03 13:42:42kxroblinkissue39727 messages
2020-09-03 13:42:41kxrobcreate