| 1 |
#require no-msys |
| 2 |
|
| 3 |
$ hg init test |
| 4 |
$ cat >hgweb.cgi <<HGWEB |
| 5 |
> #!$PYTHON |
| 6 |
> from mercurial import demandimport; demandimport.enable() |
| 7 |
> from mercurial.hgweb import hgweb |
| 8 |
> from mercurial.hgweb import wsgicgi |
| 9 |
> application = hgweb(b"test", b"Empty test repository") |
| 10 |
> wsgicgi.launch(application) |
| 11 |
> HGWEB |
| 12 |
$ chmod 755 hgweb.cgi |
| 13 |
|
| 14 |
Check that non-ASCII bytes roundtrip correctly. |
| 15 |
|
| 16 |
$ . "$TESTDIR/cgienv" |
| 17 |
$ PATH_INFO="/rev/$(python -c 'import sys; sys.stdout.buffer.write(b"\xe2\x80\x94")')"; export PATH_INFO |
| 18 |
$ QUERY_STRING="style=raw"; export QUERY_STRING |
| 19 |
$ "$PYTHON" ./hgweb.cgi | grep error |
| 20 |
error: unknown revision '\xe2\x80\x94' (esc) |