How to read POSTed data

Håkan Persson hakan at zyberit.com
Sat Feb 5 12:01:50 EST 2005


Hi.

I am trying to set up a simple HTTP-server but I have problems reading 
data that is beeing POSTed.

class httpServer(BaseHTTPServer.BaseHTTPRequestHandler):
    def do_POST(self):
        input = self.rfile.read()

The self.rfile.read() will hang on the
data = self._sock.recv(recv_size)
line in the read() function in socket.py.

Is there another way to read the data?

Thanks,
Håkan Persson




More information about the Python-list mailing list