title: serve a zip file in tornado.web
body: <p>I'm new to tornado and I need to serve a zip file (made by python).</p>
  
  <p>So i added this code lines to my script, found <a href="https://groups.google.com/forum/#!topic/python-tornado/SqkMewV89wk" rel="nofollow">here</a>:</p>
  
  <pre><code>        zipname="clients_counter.zip"
          zf = zipfile.ZipFile(zipname, "w")
          for dirname, subdirs, files in os.walk("tozip"):
              zf.write(dirname)
              for filename in files:
                  zf.write(os.path.join(dirname, filename))
          zf.close()
          self.set_header('Content-Type', 'application/zip')
          self.write(zipname.getvalue())
          self.finish()
  </code></pre>
  
  <p>This just gives me a white page as a result, it doessn't start the download.  Does anyone a better advice to accomplish my goal?</p>