En Thu, 11 Mar 2010 07:30:24 -0300, Neil Blue <neil.b...@biowisdom.com> escribió:

I have a basic http.server instance running (class
HTTPHandler(http.server.BaseHTTPRequestHandler), with python 3.1, and I
would like to upload files with multipart forms.

def do_POST(self):
        ctype, pdict = cgi.parse_header(self.headers['Content-Type'])
        if ctype=='multipart/form-data':
                print('parsing...')
                query=cgi.parse_multipart(self.rfile, pdict)
                print(query)

However the file never seems to finish being parsed. There are no errors,
but the call hangs at: query=cgi.parse_multipart(self.rfile, pdict)

This may be related to this bug:

http://bugs.python.org/issue8077

reported last week by Mitchell L. Model in this thread:

http://groups.google.com/group/comp.lang.python/t/8a7752bd79d5f5d6/

--
Gabriel Genellina

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to