Mercurial > hg
comparison mercurial/hgweb/wsgicgi.py @ 4076:5a89c61c189c
Switch CGI stdout to binary on windows
Problem diagnosed by Andrei Vermel.
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Tue, 13 Feb 2007 06:50:00 -0200 |
parents | eb0b4a2d70a9 |
children | 7605da1c3b5c |
comparison
equal
deleted
inserted
replaced
4075:31a679ae7eef | 4076:5a89c61c189c |
---|---|
7 # | 7 # |
8 # This was originally copied from the public domain code at | 8 # This was originally copied from the public domain code at |
9 # http://www.python.org/dev/peps/pep-0333/#the-server-gateway-side | 9 # http://www.python.org/dev/peps/pep-0333/#the-server-gateway-side |
10 | 10 |
11 import os, sys | 11 import os, sys |
12 from mercurial import util | |
12 | 13 |
13 def launch(application): | 14 def launch(application): |
15 util.set_binary(sys.stdout) | |
14 | 16 |
15 environ = dict(os.environ.items()) | 17 environ = dict(os.environ.items()) |
16 environ['wsgi.input'] = sys.stdin | 18 environ['wsgi.input'] = sys.stdin |
17 environ['wsgi.errors'] = sys.stderr | 19 environ['wsgi.errors'] = sys.stderr |
18 environ['wsgi.version'] = (1, 0) | 20 environ['wsgi.version'] = (1, 0) |