Opened 19 years ago
Last modified 18 years ago
#192 closed defect
FileUploads with builtin HTTPServer and wsgi-handler won't works — at Version 2
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | Core (Other) | Version: | 1.1 |
Severity: | major | Keywords: | file upload |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
utils/httpwrappers.py, Line 40: ------------------------- msg = email.message_from_string(raw_message) # *** POST = datastructures.MultiValueDict() FILES = datastructures.MultiValueDict() for submessage in msg.get_payload(): if isinstance(submessage, email.Message.Message): # **** -------------------------
Description:
msg.is_multipart() at (*) marker is always False (coz raw_message haven't content-type header, look at core/handlers/wsgi.py, Line 31), so msg.get_payload() at () is always a String, not email.Message !
Change History (2)
comment:1 by , 19 years ago
comment:2 by , 19 years ago
Description: | modified (diff) |
---|
Note:
See TracTickets
for help on using tickets.
The solution is to add after Line 32 in core/handlers/wsgi.py: