python http server - content in multiple packet
<p>I create a http server in python while I learn the http protocol. I ran into a problem. I want to send the content to browser in multiple packets. I tried this:</p>

<pre><code>conn.send("HTTP/1.0 200 OK")
conn.send("\r\n")
conn.send("Content-Type: application/force-download")
conn.send("\r\n")
conn.send("Content-Disposition: attachment; filename=file.txt")
conn.send("\r\n")
conn.send("Content-length: "+str(file_length))
conn.send("\r\n\r\n")

c = 0
while download_data[c]:
  conn.send(download_data[c])
</code></pre>

<p>but it does not work. Browser receives only the first packet. Thanks for the advice.</p>
