1
0
mirror of https://github.com/django/django.git synced 2025-07-04 01:39:20 +00:00

unicode: Fixed decoding problems in POST when a form upload was part of a form.

git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5373 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick 2007-05-28 11:54:05 +00:00
parent 1e8d1c808b
commit c6694dcdee

View File

@ -69,7 +69,7 @@ def parse_file_upload(header_dict, post_data):
raw_message = '\r\n'.join(['%s:%s' % pair for pair in header_dict.items()]) raw_message = '\r\n'.join(['%s:%s' % pair for pair in header_dict.items()])
raw_message += '\r\n\r\n' + post_data raw_message += '\r\n\r\n' + post_data
msg = email.message_from_string(raw_message) msg = email.message_from_string(raw_message)
POST = MultiValueDict() POST = QueryDict('', mutable=True)
FILES = MultiValueDict() FILES = MultiValueDict()
for submessage in msg.get_payload(): for submessage in msg.get_payload():
if submessage and isinstance(submessage, email.Message.Message): if submessage and isinstance(submessage, email.Message.Message):