[issue3244] multipart/form-data encoding
Forest Bond
report at bugs.python.org
Fri Jun 4 15:11:06 CEST 2010
Forest Bond <forest at alittletooquiet.net> added the comment:
Hm, there is one issue. The example in the docstring wouldn't work.
You have to get the headers *after* the body, because the boundary isn't generated until the body has been. So this would work:
body = msg.get_body()
headers = dict(msg)
But this won't:
headers = dict(msg)
body = msg.get_body()
I'm not sure what the best way to deal with this is. Maybe instead of get_body we should have get_request_data which returns both headers and body. That would provide simpler semantics.
Thoughts?
Thanks,
Forest
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3244>
_______________________________________
More information about the Python-bugs-list
mailing list