"Håkan Persson" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> 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?

I'm not an expert on this subject, but I am in the process of looking at the 
code in BaseHTTPServer and other related modules.  What I see used is 
normally self.rfile.readline() and that makes more sense to me (intuitively) 
than read().  Have you tried that? 


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

Reply via email to