comparison tests/test-clone-cgi.t @ 18552:e8efcc8ff5c0 stable

hgweb.cgi: fix internal WSGI emulation (issue3804) The internal WSGI emulation in wsgicgi.py was not fully WSGI compliant and assumed that all responses sent a body. With 3fbdbeab38cc that caused a real bug when using hgweb.cgi. wsgicgi.py will now make sure headers always are sent, using the pattern from PEP 333 and similar to how it is done in c007e5c54b16.
author Mads Kiilerich <madski@unity3d.com>
date Mon, 04 Feb 2013 23:25:25 +0100
parents 8b84d040d9f9
children 7a9cbb315d84
comparison
equal deleted inserted replaced
18549:12de53323e59 18552:e8efcc8ff5c0
27 $ . "$TESTDIR/cgienv" 27 $ . "$TESTDIR/cgienv"
28 $ QUERY_STRING="cmd=changegroup&roots=0000000000000000000000000000000000000000"; export QUERY_STRING 28 $ QUERY_STRING="cmd=changegroup&roots=0000000000000000000000000000000000000000"; export QUERY_STRING
29 $ python hgweb.cgi >page1 2>&1 29 $ python hgweb.cgi >page1 2>&1
30 $ python "$TESTDIR/md5sum.py" page1 30 $ python "$TESTDIR/md5sum.py" page1
31 1f424bb22ec05c3c6bc866b6e67efe43 page1 31 1f424bb22ec05c3c6bc866b6e67efe43 page1
32
33 make sure headers are sent even when there is no body
34
35 $ QUERY_STRING="cmd=listkeys&namespace=nosuchnamespace" python hgweb.cgi
36 Status: 200 Script output follows\r (esc)
37 Content-Type: application/mercurial-0.1\r (esc)
38 Content-Length: 0\r (esc)
39 \r (esc)