diff --git a/mercurial/hgweb/wsgicgi.py b/mercurial/hgweb/wsgicgi.py --- a/mercurial/hgweb/wsgicgi.py +++ b/mercurial/hgweb/wsgicgi.py @@ -62,4 +62,6 @@ def launch(application): headers_set[:] = [status, response_headers] return write - application(environ, start_response) + content = application(environ, start_response) + for chunk in content: + write(chunk) diff --git a/tests/test-clone-cgi b/tests/test-clone-cgi new file mode 100755 --- /dev/null +++ b/tests/test-clone-cgi @@ -0,0 +1,62 @@ +#!/bin/sh +# This is a test of the wire protocol over CGI-based hgweb. + +echo % initialize repository +hg init test +cd test +echo a > a +hg ci -Ama +cd .. + +cat >hgweb.cgi <page1 2>&1 ; echo $? +python "$TESTDIR/md5sum.py" page1 + +exit 0 diff --git a/tests/test-clone-cgi.out b/tests/test-clone-cgi.out new file mode 100644 --- /dev/null +++ b/tests/test-clone-cgi.out @@ -0,0 +1,5 @@ +% initialize repository +adding a +% try hgweb request +0 +54086fe9a47b47d83204f38bda0b90c2 page1