diff options
author | Barry Warsaw <barry@python.org> | 2008-06-12 04:06:45 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2008-06-12 04:06:45 (GMT) |
commit | 820c1200597606f95bb996586be88a3283c6448c (patch) | |
tree | 1b914ab96ccc9cd81465a6c3e765c97f128fd464 /Lib/cgi.py | |
parent | 75f25f2c9a4646746efbc056b4d2a07b40f93964 (diff) | |
download | cpython-820c1200597606f95bb996586be88a3283c6448c.zip cpython-820c1200597606f95bb996586be88a3283c6448c.tar.gz cpython-820c1200597606f95bb996586be88a3283c6448c.tar.bz2 |
Patch for issue 2848, mostly by Humberto Diogenes, with a couple of
small fixes by Barry. This removes mimetools from the stdlib.
Diffstat (limited to 'Lib/cgi.py')
-rwxr-xr-x | Lib/cgi.py | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -249,6 +249,8 @@ def parse_multipart(fp, pdict): since it can call parse_multipart(). """ + import http.client + boundary = "" if 'boundary' in pdict: boundary = pdict['boundary'] @@ -266,8 +268,8 @@ def parse_multipart(fp, pdict): data = None if terminator: # At start of next part. Read headers first. - headers = mimetools.Message(fp) - clength = headers.getheader('content-length') + headers = http.client.parse_headers(fp) + clength = headers.get('content-length') if clength: try: bytes = int(clength) |