diff -r 41ef02ba329b -r 8cdb671dbd0b mercurial/hgweb/protocol.py --- a/mercurial/hgweb/protocol.py Mon Jan 08 19:41:47 2018 +0530 +++ b/mercurial/hgweb/protocol.py Mon Jan 15 15:20:02 2018 -0800 @@ -175,10 +175,7 @@ req.respond(HTTP_OK, HGTYPE, body=rsp) return [] elif isinstance(rsp, wireproto.streamres): - if rsp.reader: - gen = iter(lambda: rsp.reader.read(32768), '') - else: - gen = rsp.gen + gen = rsp.gen # This code for compression should not be streamres specific. It # is here because we only compress streamres at the moment.