Merge remote-tracking branch 'mlq/fix/httpserver-read-content-length' into testing

This commit is contained in:
Valentin Lorentz 2015-08-17 22:35:40 +02:00
commit f45e2904f5

View File

@ -251,7 +251,8 @@ class SupyHTTPRequestHandler(BaseHTTPRequestHandler):
'CONTENT_TYPE':self.headers['Content-Type'],
})
else:
form = self.rfile.read()
content_length = int(self.headers.get('Content-Length', '0'))
form = self.rfile.read(content_length)
self.do_X('doPost', form=form)
def do_HEAD(self):