Mercurial > public > mercurial-scm > hg-stable
diff mercurial/hgweb/hgweb_mod.py @ 11585:5d907fbb9703
protocol: unify stream_out command
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 14 Jul 2010 16:19:27 -0500 |
parents | 1af96b090116 |
children | d054cc5c7737 |
line wrap: on
line diff
--- a/mercurial/hgweb/hgweb_mod.py Wed Jul 14 15:43:20 2010 -0500 +++ b/mercurial/hgweb/hgweb_mod.py Wed Jul 14 16:19:27 2010 -0500 @@ -49,7 +49,10 @@ break self.req.write(z.compress(chunk)) self.req.write(z.flush()) - + def sendstream(self, source): + self.req.respond(HTTP_OK, HGTYPE) + for chunk in source: + self.req.write(chunk) def respond(self, s): self.req.respond(HTTP_OK, HGTYPE, length=len(s)) self.response = s