Hi,

I am trying to implement a local server for storing and retrieving
numerical data.
So I use BaseHTTPServer as follows:

---------------------------------------------------------
    from BaseHTTPServer import *

    class Handler(BaseHTTPRequestHandler):

        def do_POST(self):

            print "POST"
            self.send_response(200)


    httpd = HTTPServer(("",8000), Handler)
    httpd.serve_forever()
---------------------------------------------------------

For testing I use:

---------------------------------------------------------

    import httplib


    data = "123456789o" * 100

    conn = httplib.HTTPConnection("localhost:8000")
    print conn.request("POST", "/", data)

---------------------------------------------------------------

Executing this client, the server says:

    error(10053, 'Software caused connection abort')

If I add "conn.getresponse()" at the end of the test script, the
message disapears, but the server hangs.

Where is my mistake ?

Greetings, Uwe.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to