SimpleHTTPRequestHandler close connection before returning from do_POST method
<p>I'm writing a simple webserver in python. here follows a simplified version of my code:</p>

<pre><code>class StreamerHandler(SimpleHTTPRequestHandler):
    def do_POST(self):
        try:
            length = int(self.headers.getheader('content-length'))
            data = self.rfile.read(length)
            self.send_response(200, "OK")
            #process_data(data, self.client_address)
        except Exception as inst:
            logging.error(type(self).__name__ + "/"  + type(inst).__name__ + " (" + inst.__str__() + ")")

class Streamer(TCPServer):
    def __init__(self, overlay):
        self.allow_reuse_address = True
        TCPServer.__init__(self, ("", port), StreamerHandler)
</code></pre>

<p>What I would like to do is to send the response close the TCP connection and then run the process_data method which may take a long time to complete.</p>

<p>Is there way to achieve this? The only solution I can think is to use a dedicated thread to handle the processing.</p>
