Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.python
Re: How to handle file uploads with http.server
Gabriel Genellina
3/17/2010 2:08:00 AM
En Thu, 11 Mar 2010 07:30:24 -0300, Neil Blue <Neil.Blue@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...
reported last week by Mitchell L. Model in this thread:
http://groups.google.com/group/comp.lang.python/t/8a7752b...
--
Gabriel Genellina
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: How to handle file uploads with http.server
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password