Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
assignee='https://github.com/orsenthil'closed_at=<Date2017-05-08.12:09:05.956>created_at=<Date2017-04-04.08:58:51.066>labels= ['3.7', 'type-bug', 'library']
title='cgi.parse_multipart is not consistent with FieldStorage'updated_at=<Date2019-11-17.22:09:31.631>user='https://github.com/PierreQuentel'
In the cgi module, the parse_multipart() function duplicates code from FieldStorage, and the result is not compliant with that of FieldStorage for requests sent with multipart/form-data : for non-file fields, the value associated with a key is a list of *bytes* in parse_multipart() and a list of *strings* for FieldStorage (the bytes decoded with the argument "encoding" passed to FieldStorage()).
I will propose a PR on the Github repo with a version of parse_multipart that uses FieldStorage and returns the same result (values as strings). The function will take an additional argument "encoding".